1 line
3.4 KiB
JSON
1 line
3.4 KiB
JSON
{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nexport function filter(predicate, thisArg) {\n return function filterOperatorFunction(source) {\n return source.lift(new FilterOperator(predicate, thisArg));\n };\n}\n\nclass FilterOperator {\n constructor(predicate, thisArg) {\n this.predicate = predicate;\n this.thisArg = thisArg;\n }\n\n call(subscriber, source) {\n return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));\n }\n\n}\n\nclass FilterSubscriber extends Subscriber {\n constructor(destination, predicate, thisArg) {\n super(destination);\n this.predicate = predicate;\n this.thisArg = thisArg;\n this.count = 0;\n }\n\n _next(value) {\n let result;\n\n try {\n result = this.predicate.call(this.thisArg, value, this.count++);\n } catch (err) {\n this.destination.error(err);\n return;\n }\n\n if (result) {\n this.destination.next(value);\n }\n }\n\n}","map":{"version":3,"names":["Subscriber","filter","predicate","thisArg","filterOperatorFunction","source","lift","FilterOperator","constructor","call","subscriber","subscribe","FilterSubscriber","destination","count","_next","value","result","err","error","next"],"sources":["D:/MobileDev/WRB/WrenchBoard2023a/node_modules/rxjs/_esm2015/internal/operators/filter.js"],"sourcesContent":["import { Subscriber } from '../Subscriber';\nexport function filter(predicate, thisArg) {\n return function filterOperatorFunction(source) {\n return source.lift(new FilterOperator(predicate, thisArg));\n };\n}\nclass FilterOperator {\n constructor(predicate, thisArg) {\n this.predicate = predicate;\n this.thisArg = thisArg;\n }\n call(subscriber, source) {\n return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));\n }\n}\nclass FilterSubscriber extends Subscriber {\n constructor(destination, predicate, thisArg) {\n super(destination);\n this.predicate = predicate;\n this.thisArg = thisArg;\n this.count = 0;\n }\n _next(value) {\n let result;\n try {\n result = this.predicate.call(this.thisArg, value, this.count++);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n if (result) {\n this.destination.next(value);\n }\n }\n}\n"],"mappings":"AAAA,SAASA,UAAT,QAA2B,eAA3B;AACA,OAAO,SA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