# sindresorhus/p-limit

Run multiple promise-returning & async functions with limited concurrency

Repository: https://github.com/sindresorhus/p-limit
Canonical: https://ross.abutalabs.com/products/p-limit
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2026-07-20T20:18:50+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 93, release rhythm 81, longevity 100
- inputs: {"age_days": 3603, "days_push": 44, "days_rel": 44, "gap_med": 79.5, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2919, forks 141 (observed 2026-08-28T04:07:30.155017+00:00)

## What it is
A tiny JavaScript library that limits the concurrency of promise-returning and async functions, so only a fixed number run at once. It works in Node.js and browsers and provides queue introspection, dynamic concurrency adjustment, and batch mapping helpers.

## Use cases
- limit concurrent http requests to avoid rate limits
- run async tasks with a maximum of N at a time
- throttle promise-based function calls in node
- process a batch of items with limited parallelism
- control how many database queries run concurrently
- queue async jobs and clear pending ones on shutdown

## When to choose
- you need simple, dependency-free concurrency limiting for promises in Node.js or the browser
- you want queue counts, dynamic limit changes, or a map helper for batched async work

## When to avoid
- you need full job queues with retries, persistence, or workers (use a task queue library)
- you need rate limiting by time window rather than concurrency
- you're not using promises/async functions

## Facets
- artifact type: library
- maturity: stable
- function: concurrency, rate-limiting, developer-tools
- domain: developer-tools, web-development, backend
- platform: browser, cross-platform
- tags: promise, async, throttle, task-queue, batch-processing, npm, automation, nodejs, javascript

## Member repositories
- sindresorhus/p-limit (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:30.155017+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:48:12.155275+00:00, confidence not recorded.
  - readme: https://github.com/sindresorhus/p-limit (fetched 2026-08-28T04:07:30.155017+00:00, sha de38c80a88f5)
  - registry_npm: https://registry.npmjs.org/p-limit (fetched 2026-08-29T09:49:28.151210+00:00, sha 6df0bc7ff485)
- Data as of 2026-08-30T08:39:29.467469+00:00.
