
async
A JavaScript utility library of helper functions for running asynchronous code in Node.js or the browser.
- Stars
- 28.1k
- Forks
- 2.4k
- Licence
- MIT
- Language
- JavaScript
- Last update
- 4 days ago
- Type
- Library
What it is
Async is a JavaScript utility module that provides functions for working with asynchronous code, such as running many tasks over a list of items, with or without a concurrency limit. It was originally designed for Node.js, installed with npm, and can also be used directly in the browser. The README shows examples using Node-style callbacks and ES2017 async functions.
- Read several config files in parallel and combine them into one object once all reads finish
- Fetch a list of URLs with a fixed concurrency limit, such as 5 at a time, and collect the results
- Process an array of items asynchronously with a callback that runs when all items are done
Great for
- JavaScript developers who need to run many asynchronous operations over a collection of items
- Node.js projects that use callback-style code and want helper functions for it
- Developers who want to limit how many asynchronous tasks run at the same time
- Projects bundling with Webpack or Rollup that can use the included ESM build
Not ideal for
- Developers working only with native Promises and async/await who may not need an extra library; the README does not compare these approaches
- Non-programmers, since the project is a code library with no end-user interface
- Projects that need documentation beyond the linked site, since the README itself points to external docs
How to get it
- 1
Install with a package manager
You'll need: Node.js (version not specified in the README) · npm
Install from npm
npm i async - 2
Run it
- Install the package with npm i async in your project folder.
- Add var async = require("async"); at the top of your Node.js file.
- Call a helper such as async.mapLimit or async.forEachOf with your data and a callback.
- Run your script with node and check the results in the callback.
- 3
Get the most out of it
- Use async.mapLimit to cap concurrent work, as shown in the README's URL-fetching example
- Use the pure ESM build via the async-es package if your project is ESM-only
- Consult the official documentation at caolan.github.io/async for the full list of functions
- Use the ESM/MJS build in the main package with Webpack or Rollup for tree-shaking
Downloads
Strengths
- Provides ready-made helpers for common async patterns over collections, as shown in the README examples
- Works in Node.js and the browser, and includes an ESM/MJS build for modern bundlers
- Released under the MIT license with a large community (about 28,000 stars)
Trade-offs
- The README is truncated and does not describe the full list of functions; the linked documentation holds the details
- The latest release listed is v2.3.0, while the docs link points to a v3 path, so version guidance is unclear from the README alone
- Examples mix callback and async-function styles, so beginners may need to learn both patterns
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| async (this) | 28.1k | Library | intermediate | 4 days ago | JavaScript developers who need to run many asynchronous operations over a collection of items |
| bluebird | 20.5k | Library | beginner | 2.0 years ago | Maintainers of legacy codebases that already depend on Bluebird |
| react-loadable | 16.5k | Library | intermediate | 2.3 years ago | React developers whose main JavaScript bundle has grown large |
| fastapi | 105k | Library | beginner | 4 days ago | Python developers building JSON APIs or back-end services |
| query | 50.5k | Library | intermediate | 4 days ago | Frontend developers building apps that load data from a server |
| ava | 20.8k | Dev tool | beginner | 5 days ago | Node.js developers who want a small, straightforward test runner |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.