</>PackageGraphPackageGraph

p-limit

npmv7.3.2TypeScript

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

1
Direct dependencies

Runtime packages this one declares itself.

1
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

15 KB
Install size

Unpacked size of this package plus its entire runtime tree.

1
Tree depth

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.

PackageWeekly downloadsDependentsLicenseLast release
p-limitthis page293.1M5MIT9 days ago
p-map01MIT1 day ago
p-locate216.9M1MIT1 day ago
throat02MIT1 day ago
cross-fetch32.9M2MIT1 day ago
await-lock01MIT1 day ago

Dependencies

Declared by p-limit v7.3.2. Runtime dependencies are installed with the package; dev dependencies are not.

Runtime (1)

yocto-queue ^1.2.1

Dev (6)

ava ^6.4.1in-range ^3.0.0random-int ^3.0.0time-span ^5.1.0tsd ^0.33.0xo ^1.2.1

Used by

Popular packages that depend on p-limit.

Relationship graph

Dependencies (left) and dependents (right) of p-limit.

Frequently installed together

Release history

8 releases in the last two years, typically about 107 days apart.

Recent versions of p-limit
VersionPublishedSizeLicense
7.3.2latest9 days ago15 KBMIT
7.3.11 month ago15 KBMIT
7.3.07 months ago15 KBMIT
7.2.010 months ago11 KBMIT
7.1.11 year ago11 KBMIT
7.1.01 year ago11 KBMIT
7.0.01 year ago11 KBMIT
6.2.01 year ago10 KBMIT
6.1.02 years ago8.0 KBMIT
6.0.02 years ago7.5 KBMIT
5.0.02 years ago7.6 KBMIT
4.0.05 years ago7.6 KBMIT
3.1.05 years ago7.6 KBMIT
3.0.26 years ago7.7 KBMIT
3.0.16 years ago7.7 KBMIT

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

Keywords

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.