everyWhere()

Determines whether a specific test passes for all of the items in an array.

This function is valid in v2.23.0. This function has been downloaded 2 times.

Parameters

{Array} array
The array whose values should be checked against all of the rules.
{…Array} ruleX
An array containing (1) the path, (2) optionally the comparator as a string and (3) the value to check the variable at that path against. Each part of the path should be a separate item in the array. For example [\"details\", \"age\", \">=\", 18] can be used to make sure that array[index].details.age >= 18 occurs. If no comparator is supplied === will be used. If one of the paths doesn't exist the entire test will fail.

Returns

{boolean}
Returns true if all of the values in array match all of the given rules. Otherwise false is returned.

Required Functions

This function directly requires the following functions which are included automatically:

  • notEveryWhere()
    Determines whether a specific test does not pass for all of the items in an array.
  • noWhere()
    Determines whether a specific test doesn't pass for any of the items in an array.
  • slice()
    Slice does not modify the original array, but instead returns a shallow copy of elements from the original array.
  • someWhere()
    Determines whether a specific test passes for at least one of the items in an array.
  • testFor()
    Creates functions for testing values.
  • testForNot()
    Creates functions for testing values.
  • where()
    Retrieves a new array of all of the items in an array which match a list of rules.
  • whereNot()
    Retrieves a new array of all of the items in an array which do not match a list of rules.

Requiring Functions

This function is directly required by the following functions:

  • notEveryWhere()
    Determines whether a specific test does not pass for all of the items in an array.
  • noWhere()
    Determines whether a specific test doesn't pass for any of the items in an array.
  • someWhere()
    Determines whether a specific test passes for at least one of the items in an array.
  • where()
    Retrieves a new array of all of the items in an array which match a list of rules.
  • whereNot()
    Retrieves a new array of all of the items in an array which do not match a list of rules.
  • zip()
    Takes one or more arrays and does a kind of matrix inverse option on them.