Function everyValue

  • Checks if predicate returns truthy for all properties of object. Iteration is stopped once predicate returns falsey. The predicate is invoked with three arguments: (value, key, object).

    Note: This method returns true for empty objects because everything is true of elements of empty objects.

    Type Parameters

    • T


    • object: PlainObject<T>

      The object to iterate over.

    • predicate: CollectionIteratee<T, boolean>

      The function invoked per iteration.

    Returns boolean

    Returns true if all properties pass the predicate check, else false.




    everyValue({ 'a': 0, 'b': 'yes', 'c': false }, Boolean)
    // => false