UNPKG

422 BJavaScriptView Raw
1import { AsyncIterableX } from './asynciterablex';
2export class OfAsyncIterable extends AsyncIterableX {
3 constructor(args) {
4 super();
5 this._args = args;
6 }
7 async *[Symbol.asyncIterator]() {
8 for (const item of this._args) {
9 yield item;
10 }
11 }
12}
13/** @nocollapse */
14export function of(...args) {
15 return new OfAsyncIterable(args);
16}
17
18//# sourceMappingURL=of.mjs.map