Every new change
This commit is contained in:
31
node_modules/rxjs/_esm2015/internal/operators/buffer.js
generated
vendored
Normal file
31
node_modules/rxjs/_esm2015/internal/operators/buffer.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
export function buffer(closingNotifier) {
|
||||
return function bufferOperatorFunction(source) {
|
||||
return source.lift(new BufferOperator(closingNotifier));
|
||||
};
|
||||
}
|
||||
class BufferOperator {
|
||||
constructor(closingNotifier) {
|
||||
this.closingNotifier = closingNotifier;
|
||||
}
|
||||
call(subscriber, source) {
|
||||
return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
|
||||
}
|
||||
}
|
||||
class BufferSubscriber extends OuterSubscriber {
|
||||
constructor(destination, closingNotifier) {
|
||||
super(destination);
|
||||
this.buffer = [];
|
||||
this.add(subscribeToResult(this, closingNotifier));
|
||||
}
|
||||
_next(value) {
|
||||
this.buffer.push(value);
|
||||
}
|
||||
notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
const buffer = this.buffer;
|
||||
this.buffer = [];
|
||||
this.destination.next(buffer);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=buffer.js.map
|
Reference in New Issue
Block a user