Skip to content

unzipAsync

unzipAsync<T>(tuples, signal?): Promise<Unzipped<T>>

Defined in: packages/core/src/iterable/async/unzip.ts:17

Splits an iterable of tuples into one array per tuple position — the inverse of zipAsync.

The async counterpart of unzip, and eager for the same reason: a column cannot be produced without reading every row.

Time complexity: O(n × width).

T extends readonly unknown[]

MaybeAsyncIterable<T>

The tuples to split, sync or async.

AbortSignal

Aborts the read.

Promise<Unzipped<T>>

The columns. Empty when the input is.