@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.
25 lines • 659 B
JavaScript
/**
* @module Collection
*/
import {} from "../../../../collection/contracts/_module-exports.js";
/**
* @internal
*/
export class RepeatIterable {
collection;
amount;
makeCollection;
constructor(collection, amount, makeCollection) {
this.collection = collection;
this.amount = amount;
this.makeCollection = makeCollection;
}
*[Symbol.iterator]() {
let collection = this.makeCollection([]);
for (let index = 0; index < this.amount; index++) {
collection = collection.append(this.collection);
}
yield* collection;
}
}
//# sourceMappingURL=repeat-iterable.js.map