mergeSequences()function
mergeSequences(...sequences: AsyncIterable<T>[]): AsyncIterable<T>
| Param | Type | |
|---|---|---|
sequences | AsyncIterable<T>[] | The sequences to merge, drained one after another in order. required |
| Return | |
|---|---|
AsyncIterable<T> | An async iterable that yields every item from each sequence in turn. |
Merge several sequences (calls the sequences in series).
- Yields all items from the first sequence, then all items from the second, and so on.
Examples
for await (const item of mergeSequences(a, b)) use(item); // all of `a`, then all of `b`