Function
Static Public Summary | ||
public |
async asyncIteratorToArray(asyncIterator: AsyncIterator<any>): Promise<any[]> Spreads an asynchronous iterator inside a new array. |
Static Public
public async asyncIteratorToArray(asyncIterator: AsyncIterator<any>): Promise<any[]> source
import {asyncIteratorToArray} from '@async-iterable-iterator/async-iterator-to-array/src/index.js'
Spreads an asynchronous iterator inside a new array.
TODO Could be abstracted further with asyncIteratorForEach.
Params:
Name | Type | Attribute | Description |
asyncIterator | AsyncIterator<any> | the input iterator. |