If you have multiple async function calls that you want to run in parallel and collect all their results in an array, this is the module for you.
It's like after-all with a build in results aggregator.
npm install after-all-results
First require the module:
var afterAll = ;
Then initialize with a callback that should be called once all the async stuff is done:
var next =;
next function is essentially just a smart
callback-generator. The after-all-results module will wait and not call
the all-done function until all the generated callbacks have been
Note: It is important that all
next() calls are done on the same
tick as the inital call to
Bonus: Inception mode
var next =;async;async;