UNPKG

rxjs

Version:

Reactive Extensions for modern JavaScript

13 lines 567 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.filter = void 0; var lift_1 = require("../util/lift"); var OperatorSubscriber_1 = require("./OperatorSubscriber"); function filter(predicate, thisArg) { return lift_1.operate(function (source, subscriber) { var index = 0; source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); })); }); } exports.filter = filter; //# sourceMappingURL=filter.js.map