Options
All
  • Public
  • Public/Protected
  • All
Menu

Module everyValue

Index

References

Functions Object

References

Renames and re-exports everyValue

Object Functions

  • everyValue<T>(object: PlainObject<T>, predicate: CollectionIteratee<T, boolean>): boolean
  • 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.

    since

    5.11.0

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

    Type parameters

    • T

    Parameters

    • 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.