ix
Version:
The Interactive Extensions for JavaScript
15 lines (13 loc) • 632 B
JavaScript
import { FlattenConcurrentAsyncIterable } from './_flatten.mjs';
/**
* Merges elements from all inner async-iterable sequences into a single async-iterable sequence.
*
* @template TSource The type of the elements in the source sequences.
* @returns {OperatorAsyncFunction<AsyncIterable<TSource>, TSource>} The async-iterable sequence that merges the elements of the inner sequences.
*/
export function mergeAll(concurrent = Infinity) {
return function mergeAllOperatorFunction(source) {
return new FlattenConcurrentAsyncIterable(source, (s) => s, concurrent, false);
};
}
//# sourceMappingURL=mergeall.mjs.map