1 import { Subscriber } from '../Subscriber';
2 export function every(predicate, thisArg) {
3 return (source) => source.lift(new EveryOperator(predicate, thisArg, source));
6 constructor(predicate, thisArg, source) {
7 this.predicate = predicate;
8 this.thisArg = thisArg;
11 call(observer, source) {
12 return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));
15 class EverySubscriber extends Subscriber {
16 constructor(destination, predicate, thisArg, source) {
18 this.predicate = predicate;
19 this.thisArg = thisArg;
22 this.thisArg = thisArg || this;
24 notifyComplete(everyValueMatch) {
25 this.destination.next(everyValueMatch);
26 this.destination.complete();
31 result = this.predicate.call(this.thisArg, value, this.index++, this.source);
34 this.destination.error(err);
38 this.notifyComplete(false);
42 this.notifyComplete(true);
45 //# sourceMappingURL=every.js.map