iteragain
Version:
Javascript Iterable/Iterator/Generator-function utilities.
9 lines • 441 B
TypeScript
import type { IteratorOrIterable } from './types';
/**
* Iterates and finds the element at `index`. Returns undefined if not found.
* @param index The index to find. Only supports positive indices.
*/
export declare function nth<T>(arg: IteratorOrIterable<T>, index: number): T | undefined;
export declare function nth<T>(index: number): (arg: IteratorOrIterable<T>) => T | undefined;
export default nth;
//# sourceMappingURL=nth.d.ts.map