UNPKG

iteragain

Version:

Javascript Iterable/Iterator/Generator-function utilities.

10 lines 612 B
import type { IterSource, IteratorOrIterable } from './types'; /** * Creates an iterator that cycles through the input iterator's values a certain number of times. * @param arg The input iterator. * @param times The number of times to cycle through the input iterator's values (default: Infinity). */ export declare function cycle<T extends IteratorOrIterable<any>>(times?: number): (arg: T) => IterableIterator<IterSource<T>>; export declare function cycle<T extends IteratorOrIterable<any>>(arg: T, times?: number): IterableIterator<IterSource<T>>; export default cycle; //# sourceMappingURL=cycle.d.ts.map