Converts the input sync iterable to an array. Returns a function that accepts an input sync iterable and returns an array of the elements from the input sync iterable.
A function that accepts an input sync iterable and returns an array.
const input = iterableOf([1, 2, 3, 4, 5]);const result = toArraySync()(input); // [1, 2, 3, 4, 5]
Available as toArray when imported from peter-piper/sync.
toArray
peter-piper/sync
The type of elements in the input sync iterable.
Generated using TypeDoc
Converts the input sync iterable to an array. Returns a function that accepts an input sync iterable and returns an array of the elements from the input sync iterable.
Returns
A function that accepts an input sync iterable and returns an array.
Example
Remarks
Available as
toArray
when imported frompeter-piper/sync
.