@daiso-tech/core
Version:
The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.
26 lines • 765 B
JavaScript
/**
* @module Collection
*/
import {} from "../../../../collection/contracts/_module-exports.js";
import {} from "../../../../utilities/_module-exports.js";
/**
* @internal
*/
export class AsyncRepeatIterable {
collection;
amount;
makeAsyncCollection;
constructor(collection, amount, makeAsyncCollection) {
this.collection = collection;
this.amount = amount;
this.makeAsyncCollection = makeAsyncCollection;
}
async *[Symbol.asyncIterator]() {
let collection = this.makeAsyncCollection([]);
for (let index = 0; index < this.amount; index++) {
collection = collection.append(this.collection);
}
yield* collection;
}
}
//# sourceMappingURL=async-repeat-iterable.js.map