This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/rxjs/_esm2015/internal/operators/skipUntil.js
2019-08-11 20:48:02 +02:00

38 lines
No EOL
1.2 KiB
JavaScript

import { OuterSubscriber } from '../OuterSubscriber';
import { InnerSubscriber } from '../InnerSubscriber';
import { subscribeToResult } from '../util/subscribeToResult';
export function skipUntil(notifier) {
return (source) => source.lift(new SkipUntilOperator(notifier));
}
class SkipUntilOperator {
constructor(notifier) {
this.notifier = notifier;
}
call(destination, source) {
return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
}
}
class SkipUntilSubscriber extends OuterSubscriber {
constructor(destination, notifier) {
super(destination);
this.hasValue = false;
const innerSubscriber = new InnerSubscriber(this, undefined, undefined);
this.add(innerSubscriber);
this.innerSubscription = innerSubscriber;
subscribeToResult(this, notifier, undefined, undefined, innerSubscriber);
}
_next(value) {
if (this.hasValue) {
super._next(value);
}
}
notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
this.hasValue = true;
if (this.innerSubscription) {
this.innerSubscription.unsubscribe();
}
}
notifyComplete() {
}
}
//# sourceMappingURL=skipUntil.js.map