asyncCollect
Callable
Type parameters
- T
The element type.
Parameters
xs: AsyncTraversable<T>
The values to map over.
Returns Promise<T[]>
An array with the values from the async generator.
- T
The element type.
The values to map over.
An array with the values from the async generator.
Collect the values from an AsyncTraversable and return them as an array.
Example
Alternatives
Proposals
Array.prototype.fromAsync
AsyncIterator.prototype.toArray