Creates an array with all falsey values removed.
The values false
, null
, 0
, ""
, undefined
, and NaN
are falsey.
array to compact.
Returns the new array of filtered values.
Creates a new array concatenating array with any additional arrays and/or values.
item or array to concatenate
Returns the new concatenated array.
Check if item is in array using indexOf
The array to inspect
The item to check
Return true
if item is in array
Creates an symmetric difference array of values not included in the other given arrays. The order and references of result values are determined by the first array.
The first array
The second array
Returns values not included in the other given arrays.
Filter items by predicate
Flattens array a single level deep.
The array to flatten.
Return Flattened array.
Iterate over array with callbackfn
Get index of item in array
-1 if item is not found
Check if argument is an array
Creates a duplicate-free version of an array,
using indexOf
for equality comparisons,
in which only the first occurrence of each element is kept.
The order of result values is determined by the order they occur in the array.
The array to inspect.
Duplicate free array
Creates an array excluding all given values using indexOf
for equality comparisons.
The array to inspect.
The array to exclude.
Returns the new array of filtered values.
Generated using TypeDoc
Return array from arguments