Skip to content

flattenDeepAsync

flattenDeepAsync<T>(iterable): AsyncIterableIterator<T>

Defined in: packages/core/src/iterable/async/flatten-deep.ts:23

Lazily flattens nested iterables to any depth.

The async counterpart of flattenDeep, and it shares the rule that matters: a string is never descended into, even though it is iterable.

Time complexity: O(n) over the total number of leaves.

T

NestedAsyncIterable<T>

The nested iterable to flatten.

AsyncIterableIterator<T>

An iterator over the leaves, in order.