Code coverage report for cjs/operators/skipUntil.js

Statements: 96.55% (56 / 58)      Branches: 70% (14 / 20)      Functions: 100% (16 / 16)      Lines: 100% (50 / 50)      Ignored: none     

All files » cjs/operators/ » 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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94    1 1   1   2   45   1   1   1 15     1 1 15   15     1 15     1     1 1   1 15   15 15 15 15 15     1 44 2       1 8 4   8     1     1 1   1 15   15 15 15 15         1 4     1 3 3     1 7     1     1  
'use strict';
 
exports.__esModule = true;
exports['default'] = skipUntil;
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
 
function _inherits(subClass, superClass) { Iif (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); Eif (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
function _classCallCheck(instance, Constructor) { Iif (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
 
var _Subscriber3 = require('../Subscriber');
 
var _Subscriber4 = _interopRequireDefault(_Subscriber3);
 
function skipUntil(total) {
    return this.lift(new SkipUntilOperator(total));
}
 
var SkipUntilOperator = (function () {
    function SkipUntilOperator(notifier) {
        _classCallCheck(this, SkipUntilOperator);
 
        this.notifier = notifier;
    }
 
    SkipUntilOperator.prototype.call = function call(subscriber) {
        return new SkipUntilSubscriber(subscriber, this.notifier);
    };
 
    return SkipUntilOperator;
})();
 
var SkipUntilSubscriber = (function (_Subscriber) {
    _inherits(SkipUntilSubscriber, _Subscriber);
 
    function SkipUntilSubscriber(destination, notifier) {
        _classCallCheck(this, SkipUntilSubscriber);
 
        _Subscriber.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 _next(value) {
        if (this.notificationSubscriber.hasValue) {
            this.destination.next(value);
        }
    };
 
    SkipUntilSubscriber.prototype._complete = function _complete() {
        if (this.notificationSubscriber.hasCompleted) {
            this.destination.complete();
        }
        this.notificationSubscriber.unsubscribe();
    };
 
    return SkipUntilSubscriber;
})(_Subscriber4['default']);
 
var NotificationSubscriber = (function (_Subscriber2) {
    _inherits(NotificationSubscriber, _Subscriber2);
 
    function NotificationSubscriber(parent) {
        _classCallCheck(this, NotificationSubscriber);
 
        _Subscriber2.call(this, null);
        this.parent = parent;
        this.hasValue = false;
        this.hasCompleted = false;
    }
 
    //# sourceMappingURL=skipUntil.js.map
 
    NotificationSubscriber.prototype._next = function _next(unused) {
        this.hasValue = true;
    };
 
    NotificationSubscriber.prototype._error = function _error(err) {
        this.parent.error(err);
        this.hasValue = true;
    };
 
    NotificationSubscriber.prototype._complete = function _complete() {
        this.hasCompleted = true;
    };
 
    return NotificationSubscriber;
})(_Subscriber4['default']);
 
module.exports = exports['default'];
//# sourceMappingURL=skipUntil.js.map