Skip to main content


Chainable iterators (sync and async) for TypeScript, with support for opt-in, bounded parallelism
interface ParallelMapOptions
import { type ParallelMapOptions } from "";

Passing this to the map() function indicates that you want to map values


parallel: number

The maximum number of map functions to run in parallel. This gives you bounded parallelism so that you don't overwhelm whatever resource you're mapping with. (ex: fetch, exec, write, etc.)

mapper: (t: T) => Promise<Out>

The async mapping function to run in parallel.

ordered: boolean

Should we maintain the input ordering in the output?

This is the least-surprising behavior, but it comes at the cost of potential head-of-line blocking.

Default: true