source: trip-planner-front/node_modules/rxjs/internal/observable/merge.js@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[6a3a178]1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var Observable_1 = require("../Observable");
4var isScheduler_1 = require("../util/isScheduler");
5var mergeAll_1 = require("../operators/mergeAll");
6var fromArray_1 = require("./fromArray");
7function merge() {
8 var observables = [];
9 for (var _i = 0; _i < arguments.length; _i++) {
10 observables[_i] = arguments[_i];
11 }
12 var concurrent = Number.POSITIVE_INFINITY;
13 var scheduler = null;
14 var last = observables[observables.length - 1];
15 if (isScheduler_1.isScheduler(last)) {
16 scheduler = observables.pop();
17 if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
18 concurrent = observables.pop();
19 }
20 }
21 else if (typeof last === 'number') {
22 concurrent = observables.pop();
23 }
24 if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable_1.Observable) {
25 return observables[0];
26 }
27 return mergeAll_1.mergeAll(concurrent)(fromArray_1.fromArray(observables, scheduler));
28}
29exports.merge = merge;
30//# sourceMappingURL=merge.js.map
Note: See TracBrowser for help on using the repository browser.