Skip to content

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
5 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
Step-by-step guide: how to use asyncInstall, first run, examples, tips and FAQs

How to get it

  1. 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. 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. 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

ProjectStarsTypeLevelUpdatedBest for
async (this)28.1kLibraryintermediate5 days agoJavaScript developers who need to run many asynchronous operations over a collection of items
bluebird20.5kLibrarybeginner2.0 years agoMaintainers of legacy codebases that already depend on Bluebird
react-loadable16.5kLibraryintermediate2.3 years agoReact developers whose main JavaScript bundle has grown large
fastapi105kLibrarybeginner4 days agoPython developers building JSON APIs or back-end services
query50.5kLibraryintermediate4 days agoFrontend developers building apps that load data from a server
ava20.8kDev toolbeginner5 days agoNode.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.