1.0.0 • Published 5 years ago
await-to-all v1.0.0
await-to-all
Promise.all wrapper for easier error handling when using async/await
Install
\$ npm install await-to-all
Usage
const toAll = require('await-to-all')
async function someAsyncFunction() {
const [error, data] = await toAll([Promise, Promise, Promise])
if (error) {
console.error(error)
}
console.log(data)
}
See Also
License
MIT
1.0.0
5 years ago