unzip
unzip<
T>(tuples):Unzipped<T>
Defined in: packages/core/src/iterable/unzip.ts:22
Splits an iterable of tuples into one array per tuple position — the inverse
of zip.
Eager, unlike most of this directory: a column cannot be produced without reading every row.
Ragged input is tolerated. The result has as many columns as the longest tuple seen, and a tuple shorter than that contributes nothing to the columns it does not reach, so those columns end up shorter rather than padded.
Time complexity: O(n × width).
Type Parameters
Section titled “Type Parameters”T extends readonly unknown[]
Parameters
Section titled “Parameters”tuples
Section titled “tuples”Iterable<T>
The tuples to split.
Returns
Section titled “Returns”Unzipped<T>
The columns. Empty when the input is.