@reactivex/ix-esnext-esm
Version:
The Interactive Extensions for JavaScript
20 lines (18 loc) • 537 B
JavaScript
import { AsyncIterableX } from '../asynciterablex';
export class TimestampAsyncIterable extends AsyncIterableX {
constructor(source) {
super();
this._source = source;
}
async *[Symbol.asyncIterator]() {
for await (const item of this._source) {
yield { time: Date.now(), value: item };
}
}
}
export function timestamp() {
return function timestampOperatorFunction(source) {
return new TimestampAsyncIterable(source);
};
}
//# sourceMappingURL=timestamp.mjs.map