after-all-results alternatives and similar modules
Based on the "Callbacks" category.
Alternatively, view after-all-results alternatives based on common mentions on social networks and blogs.
-
Neo-Async
Neo-Async is thought to be used as a drop-in replacement for Async, it almost fully covers its functionality and runs faster -
async-chainable
An extension to Async adding better handling of mixed Series / Parallel tasks via object chaining
AWS Cloud-aware infrastructure-from-code toolbox [NEW]
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of after-all-results or a related project?
README
after-all-results
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.
Installation
npm install after-all-results
Usage
First require the module:
var afterAll = require('after-all-results');
Then initialize with a callback that should be called once all the async stuff is done:
var next = afterAll(function (err, results) {
// all done!
console.log(results);
});
The returned 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
called:
someAsyncFunction(next());
anotherAsyncFunction(next());
Note: It is important that all next()
calls are done on the same
tick as the inital call to afterAll()
!
Bonus: Inception mode
var next = afterAll(function (err, results) {
// results will be an array of `arg1` from below
console.log('Done with everything!');
});
async(next(function (err, arg1, arg2) {
console.log('Done with first call to async');
});
async(next(function (err, arg1, arg2) {
console.log('Done with second call to async');
});
License
MIT
*Note that all licence references and agreements mentioned in the after-all-results README section above
are relevant to that project's source code only.