The array to process.
The length of each chunk.
Returns the new array containing chunks.
Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are falsey.
The array to compact.
Returns the new array of filtered values.
Creates an array of unique array values not included in the other provided arrays using SameValueZero for equality comparisons.
The array to inspect.
The arrays of values to exclude.
Returns the new array of filtered values.
This method is like _.difference except that it accepts iteratee which is invoked for each element of array and values to generate the criterion by which uniqueness is computed. The iteratee is invoked with one argument: (value).
The array to inspect.
The values to exclude.
The iteratee invoked per element.
Returns the new array of filtered values.
Creates an array of unique array
values not included in the other
provided arrays using SameValueZero
for equality comparisons.
Returns the new array of filtered values.
Creates a slice of array with n elements dropped from the beginning.
The array to query.
The number of elements to drop.
Returns the slice of array.
Creates a slice of array with n elements dropped from the end.
The array to query.
The number of elements to drop.
Returns the slice of array.
Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate returns falsey. The predicate is invoked with three arguments: (value, index, array).
The array to query.
The function invoked per iteration.
Returns the slice of array.
Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate returns falsey. The predicate is invoked with three arguments: (value, index, array).
The array to query.
The function invoked per iteration.
Returns the slice of array.
Fills elements of array with value from start up to, but not including, end.
Note: This method mutates array.
The array to fill.
The value to fill array with.
Returns array.
This method is like _.find except that it returns the index of the first element predicate returns truthy for instead of the element itself.
The array to search.
The function invoked per iteration.
The index to search from.
Returns the index of the found element, else -1.
This method is like _.findIndex except that it iterates over elements of collection from right to left.
The array to search.
The function invoked per iteration.
The index to search from.
Returns the index of the found element, else -1.
Recursively flattens a nested array.
The array to recursively flatten.
Returns the new flattened array.
Recursively flatten array up to depth times.
The array to recursively flatten.
Returns the new flattened array.
The inverse of _.toPairs
; this method returns an object composed
from key-value pairs
.
The key-value pairs.
Returns the new object.
Gets the first element of array.
The array to query.
Returns the first element of array.
Gets the index at which the first occurrence of value
is found in array
using SameValueZero
for equality comparisons. If fromIndex
is negative, it's used as the offset
from the end of array
.
The array to search.
The value to search for.
Returns the index of the matched value, else -1
.
Gets all but the last element of array.
The array to query.
Returns the slice of array.
Creates an array of unique values that are included in all of the provided arrays using SameValueZero for equality comparisons.
The arrays to inspect.
Returns the new array of shared values.
This method is like _.intersection
except that it accepts iteratee
which is invoked for each element of each arrays
to generate the criterion
by which uniqueness is computed. The iteratee is invoked with one argument: (value).
Returns the new array of shared values.
Creates an array of unique array
values not included in the other
provided arrays using SameValueZero
for equality comparisons.
Returns the new array of filtered values.
Converts all elements in array
into a string separated by separator
.
The array to convert.
The element separator.
Returns the joined string.
Gets the last element of array.
The array to query.
Returns the last element of array.
This method is like _.indexOf except that it iterates over elements of array from right to left.
The array to search.
The value to search for.
The index to search from or true to perform a binary search on a sorted array.
Returns the index of the matched value, else -1.
Gets the element at index n
of array
. If n
is negative, the nth element from the end is returned.
array The array to query.
Returns the nth element of array
.
Removes all provided values from array using SameValueZero for equality comparisons.
Note: Unlike _.without, this method mutates array.
The array to modify.
The values to remove.
Returns array.
This method is like _.pull
except that it accepts an array of values to remove.
Note: Unlike _.difference
, this method mutates array
.
The array to modify.
The values to remove.
Returns array
.
This method is like _.pullAll
except that it accepts iteratee
which is
invoked for each element of array
and values
to to generate the criterion
by which uniqueness is computed. The iteratee is invoked with one argument: (value).
Note: Unlike _.differenceBy
, this method mutates array
.
The array to modify.
The values to remove.
Returns array
.
This method is like _.pullAll
except that it accepts comparator
which is
invoked to compare elements of array to values. The comparator is invoked with
two arguments: (arrVal, othVal).
Note: Unlike _.differenceWith
, this method mutates array
.
The array to modify.
The values to remove.
Returns array
.
Removes elements from array corresponding to the given indexes and returns an array of the removed elements. Indexes may be specified as an array of indexes or as individual arguments.
Note: Unlike _.at, this method mutates array.
The array to modify.
The indexes of elements to remove, specified as individual indexes or arrays of indexes.
Returns the new array of removed elements.
Removes all elements from array that predicate returns truthy for and returns an array of the removed elements. The predicate is invoked with three arguments: (value, index, array).
Note: Unlike _.filter, this method mutates array.
The array to modify.
The function invoked per iteration.
Returns the new array of removed elements.
Reverses array
so that the first element becomes the last, the second
element becomes the second to last, and so on.
Note: This method mutates array
and is based on
Array#reverse
.
Returns array
.
Creates a slice of array from start up to, but not including, end.
The array to slice.
The start position.
The end position.
Returns the slice of array.
Uses a binary search to determine the lowest index at which value
should
be inserted into array
in order to maintain its sort order.
The sorted array to inspect.
The value to evaluate.
Returns the index at which value
should be inserted into array
.
Uses a binary search to determine the lowest index at which value
should
be inserted into array
in order to maintain its sort order.
The sorted array to inspect.
The value to evaluate.
Returns the index at which value
should be inserted into array
.
This method is like _.sortedIndex
except that it accepts iteratee
which is invoked for value
and each element of array
to compute their
sort ranking. The iteratee is invoked with one argument: (value).
The sorted array to inspect.
The value to evaluate.
Returns the index at which value
should be inserted into array
.
This method is like _.indexOf
except that it performs a binary
search on a sorted array
.
The array to search.
The value to search for.
Returns the index of the matched value, else -1
.
This method is like _.sortedIndex
except that it returns the highest
index at which value
should be inserted into array
in order to
maintain its sort order.
The sorted array to inspect.
The value to evaluate.
Returns the index at which value
should be inserted into array
.
This method is like _.sortedLastIndex
except that it accepts iteratee
which is invoked for value
and each element of array
to compute their
sort ranking. The iteratee is invoked with one argument: (value).
The sorted array to inspect.
The value to evaluate.
Returns the index at which value
should be inserted into array
.
This method is like _.lastIndexOf
except that it performs a binary
search on a sorted array
.
The array to search.
The value to search for.
Returns the index of the matched value, else -1
.
This method is like _.uniq
except that it's designed and optimized
for sorted arrays.
The array to inspect.
Returns the new duplicate free array.
This method is like _.uniqBy
except that it's designed and optimized
for sorted arrays.
The array to inspect.
Returns the new duplicate free array.
Gets all but the first element of array.
The array to query.
Returns the slice of array.
Creates a slice of array with n elements taken from the beginning.
The array to query.
The number of elements to take.
Returns the slice of array.
Creates a slice of array with n elements taken from the end.
The array to query.
The number of elements to take.
Returns the slice of array.
Creates a slice of array with elements taken from the end. Elements are taken until predicate returns falsey. The predicate is invoked with three arguments: (value, index, array).
The array to query.
The function invoked per iteration.
Returns the slice of array.
Creates a slice of array with elements taken from the beginning. Elements are taken until predicate returns falsey. The predicate is invoked with three arguments: (value, index, array).
The array to query.
The function invoked per iteration.
Returns the slice of array.
Creates an array of unique values, in order, from all of the provided arrays using SameValueZero for equality comparisons.
The arrays to inspect.
Returns the new array of combined values.
This method is like _.union
except that it accepts iteratee
which is
invoked for each element of each arrays
to generate the criterion by which
uniqueness is computed. The iteratee is invoked with one argument: (value).
The arrays to inspect.
The iteratee invoked per element.
Returns the new array of combined values.
This method is like _.union
except that it accepts comparator
which
is invoked to compare elements of arrays
. The comparator is invoked
with two arguments: (arrVal, othVal).
Returns the new array of combined values.
Creates a duplicate-free version of an array, using
SameValueZero
for equality comparisons, in which only the first occurrence of each element
is kept.
The array to inspect.
Returns the new duplicate free array.
This method is like _.uniq
except that it accepts iteratee
which is
invoked for each element in array
to generate the criterion by which
uniqueness is computed. The iteratee is invoked with one argument: (value).
The array to inspect.
Returns the new duplicate free array.
This method is like _.uniq
except that it accepts comparator
which
is invoked to compare elements of array
. The comparator is invoked with
two arguments: (arrVal, othVal).
The array to inspect.
Returns the new duplicate free array.
This method is like _.zip except that it accepts an array of grouped elements and creates an array regrouping the elements to their pre-zip configuration.
Returns the new array of regrouped elements.
This method is like _.unzip except that it accepts an iteratee to specify how regrouped values should be combined. The iteratee is invoked with four arguments: (accumulator, value, index, group).
The array of grouped elements to process.
The function to combine regrouped values.
Returns the new array of regrouped elements.
Creates an array excluding all provided values using SameValueZero for equality comparisons.
The array to filter.
The values to exclude.
Returns the new array of filtered values.
Creates an array of unique values that is the symmetric difference of the provided arrays.
The arrays to inspect.
Returns the new array of values.
This method is like _.xor
except that it accepts iteratee
which is
invoked for each element of each arrays
to generate the criterion by which
uniqueness is computed. The iteratee is invoked with one argument: (value).
Returns the new array of values.
This method is like _.xor
except that it accepts comparator
which is
invoked to compare elements of arrays
. The comparator is invoked with
two arguments: (arrVal, othVal).
Returns the new array of values.
Creates an array of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the second elements of the given arrays, and so on.
Returns the new array of grouped elements.
This method is like _.fromPairs except that it accepts two arrays, one of property identifiers and one of corresponding values.
The property names.
The property values.
Returns the new object.
This method is like _.zipObject except that it supports property paths.
The property names.
The property values.
Returns the new object.
This method is like _.zip except that it accepts an iteratee to specify how grouped values should be combined. The iteratee is invoked with four arguments: (accumulator, value, index, group).
The arrays to process.
The function to combine grouped values.
Returns the new array of grouped elements.
Generated using TypeDoc
Creates an array of elements split into groups the length of size. If collection can’t be split evenly, the final chunk will be the remaining elements.