UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

20 lines 417 B
//#region src/array/has.d.ts /** * `has(array, value)` * * Returns `true` if `array` contains `value`, otherwise returns `false`. * * ```ts * has([1, 2, 3, 4], 3); // true * ``` * * ```ts * pipe([1, 2, 3, 4], has(3)); // true * ``` */ declare const has: { <T>(value: NoInfer<T>): (target: readonly T[]) => boolean; <T>(target: readonly T[], value: NoInfer<T>): boolean; }; //#endregion export { has };