iter-over
Version:
Sugary iteration utilities and interfaces.
3 lines (2 loc) • 732 B
JavaScript
Object.defineProperty(exports,"__esModule",{value:!0}),exports.AbstractIterator=void 0;class AbstractIterator{forEachRemaining(t){for(;this.hasNext();)t(this.next())}remove(){throw new Error("ERR | #remove() operation is not supported for this implementation of AbstractIterator.")}reset(){throw new Error("ERR | #reset() operation is not supported for this implementation of AbstractIterator.")}[Symbol.iterator](){return new class{constructor(t){this.iterator=t}[Symbol.iterator](){return this}next(){return{done:!this.iterator.hasNext(),value:this.iterator.next()}}}(this)}getIterableIterator(){return this[Symbol.iterator]()}}exports.AbstractIterator=AbstractIterator;
//# sourceMappingURL=abstract-iterator.js.map
;