Iterates over the elements of an Iterable in pairs.
The behavior for pairSize < 1 is not defined.
pairSize < 1
Iterate in pairs
const iterable = [1, 2, 3];const pairIterable = pairwise()(iterable);console.log(pairIterable); // [[1,2], [2,3]]
chunk and zip for similar operations.
the tuple emitting Iterable
the length of the tuple
the optional length of the emitted tuples
Generated using TypeDoc
Iterates over the elements of an Iterable in pairs.
Remarks
The behavior for
pairSize < 1is not defined.Example
Iterate in pairs
See
chunk and zip for similar operations.
Returns
the tuple emitting Iterable