Zips values together by index, into an array, while all sources continue emitting.
import {pipe, zip} from 'iter-ops';const i = pipe( [1, 2, 3], zip('hello') // <- any number of arguments);console.log(...i); //=> [1, 'h'], [2, 'e'], [3, 'l'] Copy
import {pipe, zip} from 'iter-ops';const i = pipe( [1, 2, 3], zip('hello') // <- any number of arguments);console.log(...i); //=> [1, 'h'], [2, 'e'], [3, 'l']
The operator takes any number of iterable or iterator arguments.
TypeError: 'Value at index X is not iterable: ...' when a non-iterable value encountered.
TypeError: 'Value at index X is not iterable: ...'
Zips values together by index, into an array, while all sources continue emitting.
The operator takes any number of iterable or iterator arguments.