Have ideas to improve npm?Join in the discussion! »

await-to-all

1.0.0 • Public • Published

await-to-all

npm Travis (.com) branch npm npm bundle size code style: prettier

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

await-to-js

License

MIT

Install

npm i await-to-all

DownloadsWeekly Downloads

98

Version

1.0.0

License

MIT

Unpacked Size

2.98 kB

Total Files

4

Last publish

Collaborators

  • avatar