Skip to content

Function.mapSeries

github-actions[bot] edited this page Aug 21, 2026 · 27 revisions

umt / mapSeries

Function: mapSeries()

mapSeries<T, U>(items, function_): Promise<U[]>

Defined in: Async/mapSeries.ts:10

Maps over items sequentially, awaiting each async function before the next

Type Parameters

T

T

U

U

Parameters

items

T[]

The items to process

function_

(item, index) => Promise<U>

The async mapper

Returns

Promise<U[]>

Results in the same order as the input items

Example

const results = await mapSeries([1, 2, 3], async (n) => n * 2);
// [2, 4, 6]

API

Classes

Interfaces

Type Aliases

Variables

Functions

Clone this wiki locally