Utility functions for asynchronous JavaScript in Node.js and the browser
open sourceMITfree
Async is a JavaScript utility module of about 70 functions for working with asynchronous code: the usual functional ones (map, reduce, filter, each, with limit and series variants) and control-flow patterns such as parallel, series and waterfall. They take Node.js-style callbacks or ES2017 async functions. It was made for Node.js and also runs in the browser; the main async package includes an ESM build for bundlers such as Webpack and Rollup, and async-es is a pure ESM version.
Problems it solves
- run an async function over a list with at most 5 running at once in Node.js
- run several callback-based tasks in order, passing each result to the next
- wait for a set of asynchronous jobs to finish and collect their results
Features
- About 70 functions for asynchronous collections and control flow
- map, filter, reduce and each with concurrency-limited and series variants
- Control-flow patterns: parallel, series, waterfall and more
- Accepts Node.js-style callbacks or async functions
- Runs in Node.js and the browser, with an ESM build for bundlers
