Deployed the page to Github Pages.
This commit is contained in:
parent
1d79754e93
commit
2c89899458
62797 changed files with 6551425 additions and 15279 deletions
39
node_modules/rxjs/_esm2015/internal/operators/skipWhile.js
generated
vendored
Normal file
39
node_modules/rxjs/_esm2015/internal/operators/skipWhile.js
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
import { Subscriber } from '../Subscriber';
|
||||
export function skipWhile(predicate) {
|
||||
return (source) => source.lift(new SkipWhileOperator(predicate));
|
||||
}
|
||||
class SkipWhileOperator {
|
||||
constructor(predicate) {
|
||||
this.predicate = predicate;
|
||||
}
|
||||
call(subscriber, source) {
|
||||
return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));
|
||||
}
|
||||
}
|
||||
class SkipWhileSubscriber extends Subscriber {
|
||||
constructor(destination, predicate) {
|
||||
super(destination);
|
||||
this.predicate = predicate;
|
||||
this.skipping = true;
|
||||
this.index = 0;
|
||||
}
|
||||
_next(value) {
|
||||
const destination = this.destination;
|
||||
if (this.skipping) {
|
||||
this.tryCallPredicate(value);
|
||||
}
|
||||
if (!this.skipping) {
|
||||
destination.next(value);
|
||||
}
|
||||
}
|
||||
tryCallPredicate(value) {
|
||||
try {
|
||||
const result = this.predicate(value, this.index++);
|
||||
this.skipping = Boolean(result);
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=skipWhile.js.map
|
Loading…
Add table
Add a link
Reference in a new issue