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(function (source, subscriber) { | |
| var currentBuffer = []; | |
| source.subscribe(createOperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () { | |
| subscriber.next(currentBuffer); | |
| subscriber.complete(); | |
| })); | |
| innerFrom(closingNotifier).subscribe(createOperatorSubscriber(subscriber, function () { | |
| var b = currentBuffer; | |
| currentBuffer = []; | |
| subscriber.next(b); | |
| }, noop)); | |
| return function () { | |
| currentBuffer = null; | |
| }; | |
| }); | |
| } | |
| //# sourceMappingURL=buffer.js.map |
Xet Storage Details
- Size:
- 876 Bytes
- Xet hash:
- aa1f28c7fc555e7980b5eef50dcb3cc74ea821068221f3e40af30bbc831b58a4
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.