await-to-all
v1.0.0
Published
Promise.all wrapper for easier error handling when using async/await
Downloads
2
Maintainers
Readme
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