flatten()
flatten<
T>(input):Iter<T>
Defined in: src/Flatten.ts:15
An operator that turns an iteration of arrays into an iteration of their
items. Usually used as the chain method flatten().
Type Parameters
T
T
Parameters
input
Iter<T[]>
Returns
Iter<T>
Example
const result = await chain([[1, 2], [3], [4, 5]])
.flatten()
.toArray();
// => [1, 2, 3, 4, 5]