Code coverage report for cjs/operator/skipUntil.js

Statements: 98.25% (56 / 57)      Branches: 80% (12 / 15)      Functions: 100% (17 / 17)      Lines: 98.15% (53 / 54)      Ignored: none     

All files » cjs/operator/ » skipUntil.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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 771 4 2 2   1 1 18   1 1 1 18   1 18   1   1 1 1 18 18 18 18 18   1 50 2     1 3   1 9 5   9   1 16 3   13 13 13           1   1 1 1 18 18 18 18   1 4   1 3 3   1 8   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');
function skipUntil(notifier) {
    return this.lift(new SkipUntilOperator(notifier));
}
exports.skipUntil = skipUntil;
var SkipUntilOperator = (function () {
    function SkipUntilOperator(notifier) {
        this.notifier = notifier;
    }
    SkipUntilOperator.prototype.call = function (subscriber) {
        return new SkipUntilSubscriber(subscriber, this.notifier);
    };
    return SkipUntilOperator;
})();
var SkipUntilSubscriber = (function (_super) {
    __extends(SkipUntilSubscriber, _super);
    function SkipUntilSubscriber(destination, notifier) {
        _super.call(this, destination);
        this.notifier = notifier;
        this.notificationSubscriber = null;
        this.notificationSubscriber = new NotificationSubscriber(this);
        this.add(this.notifier.subscribe(this.notificationSubscriber));
    }
    SkipUntilSubscriber.prototype._next = function (value) {
        if (this.notificationSubscriber.hasValue) {
            this.destination.next(value);
        }
    };
    SkipUntilSubscriber.prototype._error = function (err) {
        this.destination.error(err);
    };
    SkipUntilSubscriber.prototype._complete = function () {
        if (this.notificationSubscriber.hasCompleted) {
            this.destination.complete();
        }
        this.notificationSubscriber.unsubscribe();
    };
    SkipUntilSubscriber.prototype.unsubscribe = function () {
        if (this._isUnsubscribed) {
            return;
        }
        else Eif (this._subscription) {
            this._subscription.unsubscribe();
            this._isUnsubscribed = true;
        }
        else {
            _super.prototype.unsubscribe.call(this);
        }
    };
    return SkipUntilSubscriber;
})(Subscriber_1.Subscriber);
var NotificationSubscriber = (function (_super) {
    __extends(NotificationSubscriber, _super);
    function NotificationSubscriber(parent) {
        _super.call(this, null);
        this.parent = parent;
        this.hasValue = false;
        this.hasCompleted = false;
    }
    NotificationSubscriber.prototype._next = function (unused) {
        this.hasValue = true;
    };
    NotificationSubscriber.prototype._error = function (err) {
        this.parent.error(err);
        this.hasValue = true;
    };
    NotificationSubscriber.prototype._complete = function () {
        this.hasCompleted = true;
    };
    return NotificationSubscriber;
})(Subscriber_1.Subscriber);
//# sourceMappingURL=skipUntil.js.map