You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
752 B
1 lines
752 B
{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nexport function pairwise() {\n return source => source.lift(new PairwiseOperator());\n}\n\nclass PairwiseOperator {\n call(subscriber, source) {\n return source.subscribe(new PairwiseSubscriber(subscriber));\n }\n\n}\n\nclass PairwiseSubscriber extends Subscriber {\n constructor(destination) {\n super(destination);\n this.hasPrev = false;\n }\n\n _next(value) {\n let pair;\n\n if (this.hasPrev) {\n pair = [this.prev, value];\n } else {\n this.hasPrev = true;\n }\n\n this.prev = value;\n\n if (pair) {\n this.destination.next(pair);\n }\n }\n\n} //# sourceMappingURL=pairwise.js.map","map":null,"metadata":{},"sourceType":"module"}
|