hugoWebsite/node_modules/rxjs/dist/esm/internal/operators/every.js
Jeremy Nusser 0ab675d92b Initial commit... 🎉🎉🎉
2022-10-28 17:20:35 -05:00

17 lines
No EOL
598 B
JavaScript

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