source: trip-planner-front/node_modules/rxjs/_esm5/internal/operators/skipUntil.js@ 8d391a1

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

initial commit

  • Property mode set to 100644
File size: 1.8 KB
Line 
1/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */
2import * as tslib_1 from "tslib";
3import { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';
4export function skipUntil(notifier) {
5 return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
6}
7var SkipUntilOperator = /*@__PURE__*/ (function () {
8 function SkipUntilOperator(notifier) {
9 this.notifier = notifier;
10 }
11 SkipUntilOperator.prototype.call = function (destination, source) {
12 return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
13 };
14 return SkipUntilOperator;
15}());
16var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
17 tslib_1.__extends(SkipUntilSubscriber, _super);
18 function SkipUntilSubscriber(destination, notifier) {
19 var _this = _super.call(this, destination) || this;
20 _this.hasValue = false;
21 var innerSubscriber = new SimpleInnerSubscriber(_this);
22 _this.add(innerSubscriber);
23 _this.innerSubscription = innerSubscriber;
24 var innerSubscription = innerSubscribe(notifier, innerSubscriber);
25 if (innerSubscription !== innerSubscriber) {
26 _this.add(innerSubscription);
27 _this.innerSubscription = innerSubscription;
28 }
29 return _this;
30 }
31 SkipUntilSubscriber.prototype._next = function (value) {
32 if (this.hasValue) {
33 _super.prototype._next.call(this, value);
34 }
35 };
36 SkipUntilSubscriber.prototype.notifyNext = function () {
37 this.hasValue = true;
38 if (this.innerSubscription) {
39 this.innerSubscription.unsubscribe();
40 }
41 };
42 SkipUntilSubscriber.prototype.notifyComplete = function () {
43 };
44 return SkipUntilSubscriber;
45}(SimpleOuterSubscriber));
46//# sourceMappingURL=skipUntil.js.map
Note: See TracBrowser for help on using the repository browser.