UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

25 lines (23 loc) 480 B
import { dfdlT } from "@monstermann/dfdl"; //#region src/array/none.ts /** * `none(array, predicate)` * * Returns `true` if no elements in `array` satisfy the provided `predicate` function, otherwise returns `false`. * * ```ts * none([1, 2, 3, 4], (x) => x > 10); // true * ``` * * ```ts * pipe( * [1, 2, 3, 4], * none((x) => x > 10), * ); // true * ``` */ const none = dfdlT((target, predicate) => { return !target.some(predicate); }, 2); //#endregion export { none };