skipUntil.js 964 B

1234567891011121314151617181920
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.skipUntil = void 0;
  4. var lift_1 = require("../util/lift");
  5. var OperatorSubscriber_1 = require("./OperatorSubscriber");
  6. var innerFrom_1 = require("../observable/innerFrom");
  7. var noop_1 = require("../util/noop");
  8. function skipUntil(notifier) {
  9. return lift_1.operate(function (source, subscriber) {
  10. var taking = false;
  11. var skipSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () {
  12. skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe();
  13. taking = true;
  14. }, noop_1.noop);
  15. innerFrom_1.innerFrom(notifier).subscribe(skipSubscriber);
  16. source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); }));
  17. });
  18. }
  19. exports.skipUntil = skipUntil;
  20. //# sourceMappingURL=skipUntil.js.map