@arrows/array
Version:
Functional tools for JS arrays
15 lines (14 loc) • 450 B
TypeScript
declare type _Has_ = (index: number, arr: unknown[]) => boolean;
declare type _Has2_ = (index: number) => (arr: unknown[]) => boolean;
declare type Has_ = _Has_ & _Has2_;
/**
* Determines whether an array has a certain index,
* returning true or false as appropriate.
*
* @param index Specific index
* @param arr Initial array
* @returns True if index exists, false otherwise
*/
declare const has_: Has_;
export { has_ };
export default has_;