UNPKG

ts-prime

Version:

A utility library for JavaScript and Typescript.

19 lines 721 B
/** * Determines whether any predicate returns true for the input data. * @param data item * @param fns The list of predicates. * @signature * P.anyPass(data,fns) * @signature * P.anyPass(fns)(data) * @example * const isDivisibleBy3 = (x: number) => x % 3 === 0 * const isDivisibleBy4 = (x: number) => x % 4 === 0 * const fns = [isDivisibleBy3, isDivisibleBy4] * P.anyPass(fns)(8) // => true * P.anyPass(fns)(11) // => false * @category Array, Pipe */ export declare function anyPass<T>(data: T, fns: ReadonlyArray<(data: T) => boolean>): boolean; export declare function anyPass<T>(fns: ReadonlyArray<(data: T) => boolean>): (data: T) => boolean; //# sourceMappingURL=anyPass.d.ts.map