@casual-simulation/aux-common
Version:
Common library for AUX projects
14 lines • 515 B
TypeScript
export declare function first<T>(iterator: Iterable<T>): T;
/**
* Gets the last value from the given iterator.
* Returns undefined if the iterator contains no values.
* @param iterator The iterator.
*/
export declare function last<T>(iterator: Iterable<T>): T;
/**
* Gets the item at the given index in the iterator.
* @param iterator The iterator.
* @param item The index of the item to get.
*/
export declare function nth<T>(iterator: Iterable<T>, item: number): T;
//# sourceMappingURL=Iterators.d.ts.map