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

Package detail

promessinha

eptaccio2MIT1.0.0

Resolves an array of promises in parallel and return an object with an array of 'successes' and an array of 'errors'.

promise, await, async, promises

readme

promessinha

Resolves an array of promises in parallel and return an object with an array of 'successes' and an array of 'errors'.

Install

npm i all-promises-resolver --save or yarn add all-promises-resolver

Usage example

const promiseAll = require('promessinha')

const myPromises = anyList.map(id => httpRequest(id))

const result = await promiseAll(myPromises)

console.log(result)
/**
   {
     successes: [{ successReponse }, { successReponse }],
     errors: [{ errorReponse }]
   }
*/