wishthis/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js
2022-04-07 09:06:43 +02:00

20 lines
No EOL
964 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.skipUntil = void 0;
var lift_1 = require("../util/lift");
var OperatorSubscriber_1 = require("./OperatorSubscriber");
var innerFrom_1 = require("../observable/innerFrom");
var noop_1 = require("../util/noop");
function skipUntil(notifier) {
return lift_1.operate(function (source, subscriber) {
var taking = false;
var skipSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () {
skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe();
taking = true;
}, noop_1.noop);
innerFrom_1.innerFrom(notifier).subscribe(skipSubscriber);
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); }));
});
}
exports.skipUntil = skipUntil;
//# sourceMappingURL=skipUntil.js.map