1 | import { AsyncIterableX } from './asynciterablex';
|
2 | export class EndWithAsyncIterable extends AsyncIterableX {
|
3 | constructor(source, args) {
|
4 | super();
|
5 | this._source = source;
|
6 | this._args = args;
|
7 | }
|
8 | async *[Symbol.asyncIterator]() {
|
9 | for await (let item of this._source) {
|
10 | yield item;
|
11 | }
|
12 | for (let x of this._args) {
|
13 | yield x;
|
14 | }
|
15 | }
|
16 | }
|
17 | export function endWith(source, ...args) {
|
18 | return new EndWithAsyncIterable(source, args);
|
19 | }
|
20 |
|
21 | //# sourceMappingURL=endwith.mjs.map
|