Skip to content

mapBounded

mapBounded<T, R>(items, limit, fn): Promise<R[]>

Defined in: src/map-bounded.ts:4

Order-preserving bounded-concurrency map: at most limit fns run at once. Use instead of an unbounded Promise.all when each fn spawns a subprocess or hits a rate-limited API (e.g. one gh api call per item over a large list).

T

R

readonly T[]

number

(item) => Promise<R>

Promise<R[]>