Buckets:
| import { operate } from '../util/lift'; | |
| import { createOperatorSubscriber } from './OperatorSubscriber'; | |
| import { noop } from '../util/noop'; | |
| import { innerFrom } from '../observable/innerFrom'; | |
| export function distinct(keySelector, flushes) { | |
| return operate(function (source, subscriber) { | |
| var distinctKeys = new Set(); | |
| source.subscribe(createOperatorSubscriber(subscriber, function (value) { | |
| var key = keySelector ? keySelector(value) : value; | |
| if (!distinctKeys.has(key)) { | |
| distinctKeys.add(key); | |
| subscriber.next(value); | |
| } | |
| })); | |
| flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop)); | |
| }); | |
| } | |
| //# sourceMappingURL=distinct.js.map |
Xet Storage Details
- Size:
- 811 Bytes
- Xet hash:
- 95f31dfb25096db07a56522fbe4adc9a10f4a0c9be82d684d684cf158f8c498c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.