Skip to content

some

Array.some(array, predicate)

Returns true if at least one element in array satisfies the provided predicate function, otherwise returns false.

Example

ts
import { Array } from "@monstermann/array";

Array.some([1, 2, 3, 4], (x) => x > 3); // true
ts
import { Array } from "@monstermann/array";

pipe(
    [1, 2, 3, 4],
    Array.some((x) => x > 3),
); // true