UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

26 lines (24 loc) 599 B
import { ArrayPredicate } from "./internals/types.js"; //#region src/array/some.d.ts /** * `some(array, predicate)` * * Returns `true` if at least one element in `array` satisfies the provided `predicate` function, otherwise returns `false`. * * ```ts * some([1, 2, 3, 4], (x) => x > 3); // true * ``` * * ```ts * pipe( * [1, 2, 3, 4], * some((x) => x > 3), * ); // true * ``` */ declare const some: { <T>(predicate: ArrayPredicate<T>): (target: readonly T[]) => boolean; <T>(target: readonly T[], predicate: ArrayPredicate<T>): boolean; }; //#endregion export { some };