@arrows/array
Version:
Functional tools for JS arrays
15 lines (14 loc) • 487 B
TypeScript
declare type _Includes = <T>(element: T, arr: T[]) => boolean;
declare type _Includes2 = <T>(element: T) => (arr: T[]) => boolean;
declare type Includes = _Includes & _Includes2;
/**
* Determines whether an array includes a certain element,
* returning true or false as appropriate.
*
* @param element Searched element
* @param arr Initial array
* @returns True if element exists, false otherwise
*/
declare const includes: Includes;
export { includes };
export default includes;