fx-flow v0.7.0 / pipe/strict / toArray
Function: toArray()
toArray<
A
>(iterable
):ArrayReturnValue
<A
>
Convert iterable/asyncIterable to an array.
Type parameters
• A extends UniversalIterable
Parameters
• iterable: A
Returns
Example
typescript
pipe(
[1, 2, 3, 4, 5],
map((a) => a + 10),
filter((a) => a % 2 === 0),
toArray
) // [12, 14]