Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

await-to-all

neosiae5MIT1.0.0

Promise.all wrapper for easier error handling when using async/await

promise, all, async, await, to, wrapper, error, handling

readme

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