Combines multiple iterables element-wise into tuples, stopping at the shortest.
If any input is an AsyncIterable, the result is a Promise<Array<…>>.
AsyncIterable
Promise<Array<…>>
zip([1, 2, 3], ['a', 'b', 'c'])// [[1, 'a'], [2, 'b'], [3, 'c']]zip([1, 2, 3], ['a', 'b'], [true, false, true])// [[1, 'a', true], [2, 'b', false]] // shortest wins Copy
zip([1, 2, 3], ['a', 'b', 'c'])// [[1, 'a'], [2, 'b'], [3, 'c']]zip([1, 2, 3], ['a', 'b'], [true, false, true])// [[1, 'a', true], [2, 'b', false]] // shortest wins
Combines multiple iterables element-wise into tuples, stopping at the shortest.
If any input is an
AsyncIterable, the result is aPromise<Array<…>>.