Every new change

This commit is contained in:
Luca Schwan
2020-03-25 11:05:34 +01:00
parent ff8491e75f
commit b4d041c5de
7164 changed files with 499221 additions and 135 deletions

48
node_modules/rxjs/_esm2015/internal/operators/count.js generated vendored Normal file
View File

@ -0,0 +1,48 @@
import { Subscriber } from '../Subscriber';
export function count(predicate) {
return (source) => source.lift(new CountOperator(predicate, source));
}
class CountOperator {
constructor(predicate, source) {
this.predicate = predicate;
this.source = source;
}
call(subscriber, source) {
return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
}
}
class CountSubscriber extends Subscriber {
constructor(destination, predicate, source) {
super(destination);
this.predicate = predicate;
this.source = source;
this.count = 0;
this.index = 0;
}
_next(value) {
if (this.predicate) {
this._tryPredicate(value);
}
else {
this.count++;
}
}
_tryPredicate(value) {
let result;
try {
result = this.predicate(value, this.index++, this.source);
}
catch (err) {
this.destination.error(err);
return;
}
if (result) {
this.count++;
}
}
_complete() {
this.destination.next(this.count);
this.destination.complete();
}
}
//# sourceMappingURL=count.js.map