aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testAppNevena/Front/node_modules/rxjs/internal/operators/mergeMap.js
diff options
context:
space:
mode:
authorNevena Bojovic <nenabojov@gmail.com>2022-03-01 22:05:25 +0100
committerNevena Bojovic <nenabojov@gmail.com>2022-03-01 22:05:25 +0100
commit6555fb80fdd8f6a5d201efadec3189d1244830a0 (patch)
treec1aa1c5aedc634ad1ea7fad4847884d559b51290 /sandbox/testAppNevena/Front/node_modules/rxjs/internal/operators/mergeMap.js
parent7d3640f824f46490b47bd95f1c5a16644f712068 (diff)
Izbrisala bin, obj i node-modules.
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/rxjs/internal/operators/mergeMap.js')
-rw-r--r--sandbox/testAppNevena/Front/node_modules/rxjs/internal/operators/mergeMap.js109
1 files changed, 0 insertions, 109 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/rxjs/internal/operators/mergeMap.js b/sandbox/testAppNevena/Front/node_modules/rxjs/internal/operators/mergeMap.js
deleted file mode 100644
index a20b0559..00000000
--- a/sandbox/testAppNevena/Front/node_modules/rxjs/internal/operators/mergeMap.js
+++ /dev/null
@@ -1,109 +0,0 @@
-"use strict";
-var __extends = (this && this.__extends) || (function () {
- var extendStatics = function (d, b) {
- extendStatics = Object.setPrototypeOf ||
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
- return extendStatics(d, b);
- }
- return function (d, b) {
- extendStatics(d, b);
- function __() { this.constructor = d; }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
- };
-})();
-Object.defineProperty(exports, "__esModule", { value: true });
-var map_1 = require("./map");
-var from_1 = require("../observable/from");
-var innerSubscribe_1 = require("../innerSubscribe");
-function mergeMap(project, resultSelector, concurrent) {
- if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }
- if (typeof resultSelector === 'function') {
- return function (source) { return source.pipe(mergeMap(function (a, i) { return from_1.from(project(a, i)).pipe(map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };
- }
- else if (typeof resultSelector === 'number') {
- concurrent = resultSelector;
- }
- return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };
-}
-exports.mergeMap = mergeMap;
-var MergeMapOperator = (function () {
- function MergeMapOperator(project, concurrent) {
- if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }
- this.project = project;
- this.concurrent = concurrent;
- }
- MergeMapOperator.prototype.call = function (observer, source) {
- return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
- };
- return MergeMapOperator;
-}());
-exports.MergeMapOperator = MergeMapOperator;
-var MergeMapSubscriber = (function (_super) {
- __extends(MergeMapSubscriber, _super);
- function MergeMapSubscriber(destination, project, concurrent) {
- if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }
- var _this = _super.call(this, destination) || this;
- _this.project = project;
- _this.concurrent = concurrent;
- _this.hasCompleted = false;
- _this.buffer = [];
- _this.active = 0;
- _this.index = 0;
- return _this;
- }
- MergeMapSubscriber.prototype._next = function (value) {
- if (this.active < this.concurrent) {
- this._tryNext(value);
- }
- else {
- this.buffer.push(value);
- }
- };
- MergeMapSubscriber.prototype._tryNext = function (value) {
- var result;
- var index = this.index++;
- try {
- result = this.project(value, index);
- }
- catch (err) {
- this.destination.error(err);
- return;
- }
- this.active++;
- this._innerSub(result);
- };
- MergeMapSubscriber.prototype._innerSub = function (ish) {
- var innerSubscriber = new innerSubscribe_1.SimpleInnerSubscriber(this);
- var destination = this.destination;
- destination.add(innerSubscriber);
- var innerSubscription = innerSubscribe_1.innerSubscribe(ish, innerSubscriber);
- if (innerSubscription !== innerSubscriber) {
- destination.add(innerSubscription);
- }
- };
- MergeMapSubscriber.prototype._complete = function () {
- this.hasCompleted = true;
- if (this.active === 0 && this.buffer.length === 0) {
- this.destination.complete();
- }
- this.unsubscribe();
- };
- MergeMapSubscriber.prototype.notifyNext = function (innerValue) {
- this.destination.next(innerValue);
- };
- MergeMapSubscriber.prototype.notifyComplete = function () {
- var buffer = this.buffer;
- this.active--;
- if (buffer.length > 0) {
- this._next(buffer.shift());
- }
- else if (this.active === 0 && this.hasCompleted) {
- this.destination.complete();
- }
- };
- return MergeMapSubscriber;
-}(innerSubscribe_1.SimpleOuterSubscriber));
-exports.MergeMapSubscriber = MergeMapSubscriber;
-exports.flatMap = mergeMap;
-//# sourceMappingURL=mergeMap.js.map \ No newline at end of file