UNPKG

iteragain

Version:

Javascript Iterable/Iterator/Generator-function utilities.

14 lines 592 B
/** * Cycles through the input `iterator`'s values a certain number of `times`. So when the input iterator is done, the * next iterator result will cycle back to the first value of the input iterator. */ export declare class CycleIterator<T> implements IterableIterator<T> { protected iterator: Iterator<T>; protected times: number; protected values: T[]; constructor(iterator: Iterator<T>, times: number); [Symbol.iterator](): IterableIterator<T>; next(...args: any[]): IteratorResult<T>; } export default CycleIterator; //# sourceMappingURL=CycleIterator.d.ts.map