UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

19 lines (17 loc) 523 B
import { AsyncIterableX } from './asynciterablex'; class RangeAsyncIterable extends AsyncIterableX { constructor(start, count) { super(); this._start = start; this._count = count; } async *[Symbol.asyncIterator]() { for (let current = this._start, end = this._start + this._count; current < end; current++) { yield current; } } } export function range(start, count) { return new RangeAsyncIterable(start, count); } //# sourceMappingURL=range.mjs.map