Function allPropsSatisfy

  • Example

    import * as P from "flurp/pojo";
    import * as N from "flurp/number";

    const allPositive = P.allPropsSatisfy<Record<string, number>>(N.isPositive);
    allPositive({ x: 3, y: 4, z: 5 }); // true
    allPositive({ x: 3, y: -4, z: 5 }); // false

    Type Parameters

    • T extends Readonly<Record<string, unknown>>

    Parameters

    • condition: ((x: T[keyof T]) => boolean)
        • (x: T[keyof T]): boolean
        • Parameters

          • x: T[keyof T]

          Returns boolean

    Returns ((obj: T) => boolean)

      • (obj: T): boolean
      • Parameters

        • obj: T

        Returns boolean