@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.
22 lines • 551 B
JavaScript
/**
* @module Collection
*/
import {} from "../../../../collection/contracts/_module-exports.js";
/**
* @internal
*/
export class SkipIterable {
collection;
offset;
constructor(collection, offset) {
this.collection = collection;
this.offset = offset;
}
*[Symbol.iterator]() {
if (this.offset < 0) {
this.offset = this.collection.size() + this.offset;
}
yield* this.collection.skipWhile((_item, index) => index < this.offset);
}
}
//# sourceMappingURL=skip-iterable.js.map