1 | import { AsyncIterableX } from './asynciterablex';
|
2 | class RangeAsyncIterable extends AsyncIterableX {
|
3 | constructor(start, count) {
|
4 | super();
|
5 | this._start = start;
|
6 | this._count = count;
|
7 | }
|
8 | async *[Symbol.asyncIterator]() {
|
9 | for (let current = this._start, end = this._start + this._count; current < end; current++) {
|
10 | yield current;
|
11 | }
|
12 | }
|
13 | }
|
14 | export function range(start, count) {
|
15 | return new RangeAsyncIterable(start, count);
|
16 | }
|
17 |
|
18 | //# sourceMappingURL=range.mjs.map
|