wishthis/node_modules/rxjs/dist/cjs/internal/observable/merge.js
2022-06-08 12:36:39 +02:00

27 lines
No EOL
866 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.merge = void 0;
var mergeAll_1 = require("../operators/mergeAll");
var innerFrom_1 = require("./innerFrom");
var empty_1 = require("./empty");
var args_1 = require("../util/args");
var from_1 = require("./from");
function merge() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var scheduler = args_1.popScheduler(args);
var concurrent = args_1.popNumber(args, Infinity);
var sources = args;
return !sources.length
?
empty_1.EMPTY
: sources.length === 1
?
innerFrom_1.innerFrom(sources[0])
:
mergeAll_1.mergeAll(concurrent)(from_1.from(sources, scheduler));
}
exports.merge = merge;
//# sourceMappingURL=merge.js.map