merge.js 569 B

1234567891011121314
  1. import { operate } from '../util/lift';
  2. import { argsOrArgArray } from '../util/argsOrArgArray';
  3. import { mergeAll } from './mergeAll';
  4. import { popNumber, popScheduler } from '../util/args';
  5. import { from } from '../observable/from';
  6. export function merge(...args) {
  7. const scheduler = popScheduler(args);
  8. const concurrent = popNumber(args, Infinity);
  9. args = argsOrArgArray(args);
  10. return operate((source, subscriber) => {
  11. mergeAll(concurrent)(from([source, ...args], scheduler)).subscribe(subscriber);
  12. });
  13. }
  14. //# sourceMappingURL=merge.js.map