API Reference
p-all
Run promise-returning functions concurrently with optional concurrency cap.
Official Documentation ↗CompatibilityThis documentation covers version
v5.0.0. Check the official docs for the latest API surface.Installation
npm
npm install p-allpnpm
pnpm add p-allMethods
No methods match this filter.
p-all is run promise-returning functions concurrently with optional concurrency cap.
Key Features
- resilience: Designed for resilience scenarios with a focused API surface.
Installation
npm install p-all
Usage
API reference evidence
Fetched from official sources on 2026-11-08T18:24:00+08:00 via WebFetch https://raw.githubusercontent.com/sindresorhus/p-all/main/index.d.ts.
p-all.all→ signature from https://raw.githubusercontent.com/sindresorhus/p-all/main/index.d.ts; official text: “export default function pAll<Tasks extends ReadonlyArray<() => unknown>>( tasks: readonly […Tasks], options?: Options, ): Promise<{ [K in keyof Tasks]: Awaited<ReturnType<Tasks[K]>> }>;”
FAQ
- How does p-all handle concurrency?
- Pass { concurrency: N } in options to cap concurrent operations. Default runs all in parallel.
- Does p-all stop on the first rejection?
- Yes, by default the first rejection short-circuits. Use settle variants to collect all outcomes.
- Is p-all tree-shakeable?
- Yes, p-all ships ESM and named exports, enabling bundlers to tree-shake unused functions.
Report a problem with this API docOpens a pre-filled issue on GitHub.