flattenAsync
flattenAsync<
T>(iterable):AsyncIterableIterator<T>
Defined in: packages/core/src/iterable/async/flatten.ts:14
Lazily concatenates an iterable of iterables, one level deep.
The async counterpart of flatten. Both levels may be sync or async, so a
stream of arrays and an array of streams both flatten.
Time complexity: O(1) to construct; O(n) total across every inner iterable.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”iterable
Section titled “iterable”MaybeAsyncIterable<MaybeAsyncIterable<T>>
The iterable of iterables to flatten.
Returns
Section titled “Returns”AsyncIterableIterator<T>
An iterator over every element of every inner iterable, in order.