wishthis/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js

16 lines
744 B
JavaScript
Raw Normal View History

2022-06-08 10:36:39 +00:00
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { innerFrom } from '../observable/innerFrom';
import { noop } from '../util/noop';
export function skipUntil(notifier) {
return operate((source, subscriber) => {
let taking = false;
const skipSubscriber = createOperatorSubscriber(subscriber, () => {
skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe();
taking = true;
}, noop);
innerFrom(notifier).subscribe(skipSubscriber);
source.subscribe(createOperatorSubscriber(subscriber, (value) => taking && subscriber.next(value)));
});
}
//# sourceMappingURL=skipUntil.js.map