filterOut()

Creates a new object or a new array based on the specified object array. This new array will only have the values which fail the test function.

This function is valid in v2.23.0 to v2.24.3. This function has been downloaded 34 times.

Parameters

{Array|Object} arrOrObj
Array (or array-like object) or object which will be duplicated with only the values that fail the test function.
{Function} test
Function that will be called for every value in arrOrObj and whose return value for each call will be coerced to a boolean and used to determine if the value will be kept in the resulting array or object returned by filter(). Only return values that are false-ish will be kept. The first argument passed will be the value that is being tested. The second argument passed will be the index or key of the value that is being tested. The third argument passed will be arrOrObj. The this keyword will reference opt_this.
{*=} opt_this Optional, Default:global
If not given or undefined or null, the global object will be used. If given as a primitive, the object version of the value will be used. This object will be used as this within test().

Returns

{Array|Object}
If arrOrObj is an array (or an array-like object) then an array with the filtered values will be returned. Otherwise an object with the filtered values will be returned.

Required Function

This function directly requires the following function which is included automatically:

  • filter()
    Creates a new object or a new array based on the specified object array. This new array will only have the values which pass the test function.

Requiring Function

This function is directly required by the following function:

  • filter()
    Creates a new object or a new array based on the specified object array. This new array will only have the values which pass the test function.