
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
after-all-results
Advanced tools
Bundle results of async functions calls into one callback with all the 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.
npm install after-all-results
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()
!
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');
});
MIT
FAQs
Bundle results of async functions calls into one callback with all the results
The npm package after-all-results receives a total of 270,438 weekly downloads. As such, after-all-results popularity was classified as popular.
We found that after-all-results demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.