UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

20 lines 533 B
//#region src/array/hasAny.d.ts /** * `hasAny(array, values)` * * Returns `true` if `array` contains any of the `values`, otherwise returns `false`. Supports iterables for the `values` parameter. * * ```ts * hasAny([1, 2, 3, 4], [5, 6, 2]); // true * ``` * * ```ts * pipe([1, 2, 3, 4], hasAny([5, 6, 2])); // true * ``` */ declare const hasAny: { <T>(values: Iterable<NoInfer<T>>): (target: readonly T[]) => boolean; <T>(target: readonly T[], values: Iterable<NoInfer<T>>): boolean; }; //#endregion export { hasAny };