Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / rxjs / _esm2015 / internal / operators / buffer.js
1 import { OuterSubscriber } from '../OuterSubscriber';
2 import { subscribeToResult } from '../util/subscribeToResult';
3 export function buffer(closingNotifier) {
4     return function bufferOperatorFunction(source) {
5         return source.lift(new BufferOperator(closingNotifier));
6     };
7 }
8 class BufferOperator {
9     constructor(closingNotifier) {
10         this.closingNotifier = closingNotifier;
11     }
12     call(subscriber, source) {
13         return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
14     }
15 }
16 class BufferSubscriber extends OuterSubscriber {
17     constructor(destination, closingNotifier) {
18         super(destination);
19         this.buffer = [];
20         this.add(subscribeToResult(this, closingNotifier));
21     }
22     _next(value) {
23         this.buffer.push(value);
24     }
25     notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26         const buffer = this.buffer;
27         this.buffer = [];
28         this.destination.next(buffer);
29     }
30 }
31 //# sourceMappingURL=buffer.js.map