p-limit
npmv7.3.2TypeScriptRun multiple promise-returning & async functions with limited concurrency
Safe to adopt
Yes — p-limit scores well across adoption, maintenance, weight, supply chain, and licensing. 293.1M downloads per week and 5 known dependents. Last published 9 days ago. 8 releases in the last 2 years.
- AAdoption: grade A, Excellent.
293.1M downloads per week and 5 known dependents.
- AMaintenance: grade A, Excellent.
Last published 9 days ago. 8 releases in the last 2 years.
- AWeight: grade A, Excellent.
Pulls in 1 transitive package, about 15 KB installed (at least — some of the tree is still being crawled).
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding p-limit to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.
Compatibility
- Node.js
- node >=20
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the p-limit README.
import pLimit from 'p-limit';
const limit = pLimit(1);
const input = [
limit(() => fetchSomething('foo')),
limit(() => fetchSomething('bar')),
limit(() => doSomething())
];
// Only one promise is run at once
const result = await Promise.all(input);
console.log(result);p-limit vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| p-limitthis page | 293.1M | 5 | MIT | 9 days ago |
| p-map | 0 | 1 | MIT | 1 day ago |
| p-locate | 216.9M | 1 | MIT | 1 day ago |
| throat | 0 | 2 | MIT | 1 day ago |
| cross-fetch | 32.9M | 2 | MIT | 1 day ago |
| await-lock | 0 | 1 | MIT | 1 day ago |
Dependencies
Declared by p-limit v7.3.2. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (1)
Dev (6)
Used by
Popular packages that depend on p-limit.
Get the first fulfilled promise that satisfies the provided testing function
No description provided.
A module used internally by Jest to check which files have changed since you last committed in git or hg.
Framework for building one portable devtool integration that runs in any viewer.
[type-definitions]: https://github.com/jestjs/jest/blob/main/packages/jest-types/src/Circus.ts
Relationship graph
Dependencies (left) and dependents (right) of p-limit.
Frequently installed together
Simple yet powerful framework for building command-line apps.
Model Context Protocol implementation for TypeScript - Client package
Model Context Protocol implementation for TypeScript - Server package
A lightweight JavaScript debugging utility, forked from debug, featuring TypeScript and ESM support.
URL utils for humans
A tiny (2.8kB) and fast utility for getting a MIME type from an extension or filename
Minimal H(TTP) framework built for high performance and portability.
Missing ECMAScript module utils for Node.js
The modular and type safe schema library for validating structural data
Message based Two-way remote procedure call
Structured diagnostic code library
A fast and minimal alternative to globby and fast-glob
Release history
8 releases in the last two years, typically about 107 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 7.3.2latest | 9 days ago | 15 KB | MIT |
| 7.3.1 | 1 month ago | 15 KB | MIT |
| 7.3.0 | 7 months ago | 15 KB | MIT |
| 7.2.0 | 10 months ago | 11 KB | MIT |
| 7.1.1 | 1 year ago | 11 KB | MIT |
| 7.1.0 | 1 year ago | 11 KB | MIT |
| 7.0.0 | 1 year ago | 11 KB | MIT |
| 6.2.0 | 1 year ago | 10 KB | MIT |
| 6.1.0 | 2 years ago | 8.0 KB | MIT |
| 6.0.0 | 2 years ago | 7.5 KB | MIT |
| 5.0.0 | 2 years ago | 7.6 KB | MIT |
| 4.0.0 | 5 years ago | 7.6 KB | MIT |
| 3.1.0 | 5 years ago | 7.6 KB | MIT |
| 3.0.2 | 6 years ago | 7.7 KB | MIT |
| 3.0.1 | 6 years ago | 7.7 KB | MIT |
Overview
p-limit is an npm package that run multiple promise-returning & async functions with limited concurrency. It is extremely widely used, with about 293.1M downloads per week and 5 known dependents in the graph. The latest version is 7.3.2, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need run multiple promise-returning & async functions with limited concurrency and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (293.1M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use p-limit?
Yes — p-limit scores well across adoption, maintenance, weight, supply chain, and licensing. 293.1M downloads per week and 5 known dependents. Last published 9 days ago. 8 releases in the last 2 years.
How do I install p-limit?
Run `npm install p-limit` to add p-limit to your npm project.
How many dependencies does p-limit have?
p-limit declares 7 direct dependencies and pulls in 1 packages in total once its runtime tree is resolved totalling about 15 KB on disk.
What license is p-limit released under?
p-limit is distributed under the MIT license.
How popular is p-limit?
p-limit has approximately 293,138,841 downloads per week and 5 known dependent packages.
Is p-limit still maintained?
The most recent release of p-limit (v7.3.2) was published 9 days ago.
Does p-limit run install scripts?
No. p-limit does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.