blob: 3692a1c00e360d63f5dd7597ca9ead29171668b3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function every(predicate, thisArg) {
return operate((source, subscriber) => {
let index = 0;
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
if (!predicate.call(thisArg, value, index++, source)) {
subscriber.next(false);
subscriber.complete();
}
}, () => {
subscriber.next(true);
subscriber.complete();
}));
});
}
//# sourceMappingURL=every.js.map
|