zipLongestAsync
zipLongestAsync<
T,F>(iterables,fill):AsyncIterableIterator<ZippedLongest<T,F>>
Defined in: packages/core/src/iterable/async/zip-longest.ts:19
Yields tuples pairing the first element of every iterable, then the second,
and so on, continuing until the longest one runs out and substituting
fill for every iterable that has already ended.
The async counterpart of zipLongest. Each round advances every unexhausted
source concurrently.
Time complexity: O(1) per tuple, allocating one tuple per yield.
Type Parameters
Section titled “Type Parameters”T extends readonly MaybeAsyncIterable<unknown>[]
F
Parameters
Section titled “Parameters”iterables
Section titled “iterables”T
The iterables to advance in lockstep.
F
The value standing in for an iterable that has already ended.
Returns
Section titled “Returns”AsyncIterableIterator<ZippedLongest<T, F>>
An iterator over the tuples. Empty when no iterables were given.