Function toArray

Returns an array of values from an iterator.

const data = await toArray(adsrIterable(opts, 10));

Note: If the iterator is infinite, be sure to provide a count or the function will never return.

Asynchronous iterable

Number of items to return, by default all.

  • Type Parameters

    • V

    Parameters

    Returns Promise<V[]>

  • Type Parameters

    • V

    Parameters

    Returns V[]