Code coverage report for cjs/operator/takeUntil.js

Statements: 100% (42 / 42)      Branches: 71.43% (5 / 7)      Functions: 100% (14 / 14)      Lines: 100% (39 / 39)      Ignored: none     

All files » cjs/operator/ » takeUntil.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 531 4 2 2   1 1 1 16   1 1 1 16   1 16   1   1 1 1 16 16 16 16 16   1 3 3   1   1 1 1 16 16   1 5   1 2   1 2   1    
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) Eif (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Subscriber_1 = require('../Subscriber');
var noop_1 = require('../util/noop');
function takeUntil(notifier) {
    return this.lift(new TakeUntilOperator(notifier));
}
exports.takeUntil = takeUntil;
var TakeUntilOperator = (function () {
    function TakeUntilOperator(notifier) {
        this.notifier = notifier;
    }
    TakeUntilOperator.prototype.call = function (subscriber) {
        return new TakeUntilSubscriber(subscriber, this.notifier);
    };
    return TakeUntilOperator;
})();
var TakeUntilSubscriber = (function (_super) {
    __extends(TakeUntilSubscriber, _super);
    function TakeUntilSubscriber(destination, notifier) {
        _super.call(this, destination);
        this.notifier = notifier;
        this.notificationSubscriber = null;
        this.notificationSubscriber = new TakeUntilInnerSubscriber(destination);
        this.add(notifier.subscribe(this.notificationSubscriber));
    }
    TakeUntilSubscriber.prototype._complete = function () {
        this.destination.complete();
        this.notificationSubscriber.unsubscribe();
    };
    return TakeUntilSubscriber;
})(Subscriber_1.Subscriber);
var TakeUntilInnerSubscriber = (function (_super) {
    __extends(TakeUntilInnerSubscriber, _super);
    function TakeUntilInnerSubscriber(destination) {
        _super.call(this, null);
        this.destination = destination;
    }
    TakeUntilInnerSubscriber.prototype._next = function (unused) {
        this.destination.complete();
    };
    TakeUntilInnerSubscriber.prototype._error = function (err) {
        this.destination.error(err);
    };
    TakeUntilInnerSubscriber.prototype._complete = function () {
        noop_1.noop();
    };
    return TakeUntilInnerSubscriber;
})(Subscriber_1.Subscriber);
//# sourceMappingURL=takeUntil.js.map