Buckets:
| import { operate } from '../util/lift'; | |
| import { noop } from '../util/noop'; | |
| import { createOperatorSubscriber } from './OperatorSubscriber'; | |
| import { innerFrom } from '../observable/innerFrom'; | |
| export function buffer(closingNotifier) { | |
| return operate((source, subscriber) => { | |
| let currentBuffer = []; | |
| source.subscribe(createOperatorSubscriber(subscriber, (value) => currentBuffer.push(value), () => { | |
| subscriber.next(currentBuffer); | |
| subscriber.complete(); | |
| })); | |
| innerFrom(closingNotifier).subscribe(createOperatorSubscriber(subscriber, () => { | |
| const b = currentBuffer; | |
| currentBuffer = []; | |
| subscriber.next(b); | |
| }, noop)); | |
| return () => { | |
| currentBuffer = null; | |
| }; | |
| }); | |
| } | |
| //# sourceMappingURL=buffer.js.map |
Xet Storage Details
- Size:
- 836 Bytes
- Xet hash:
- 40607f41a65ad132b53da0e06787a32fd63f9d041a4fab9bc9a7a61aaade3c93
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.