Utilities
Chunk
Creates a List of elements split into groups the length of size
. If List
can't be split evenly, the final chunk will be the remaining elements
Arguments
list
(List): The array to process.[size=1]
(num): The length of each chunk
Returns
(List): Returns the new list of chunks.
Compact
Creates an array with all falsey values removed. The values false, null, 0, "", are falsey.
Arguments
list
(List): The array to compact.
Returns
(List): Returns the new array of filtered values.
Difference
Creates an array of array values not included in the other given list using SameValueZerofor equality comparisons. The order and references of result values are determined by the first list.
Arguments
list
(List): The array to inspect.[values]
(...List): The values to exclude.
Returns
(List): Returns the new list of filtered values.
DifferenceBy
Arguments
list
(List): The array to inspect.[values]
(...List): The values to exclude.[iteratee]
(Function): The iteratee invoked per element.
Returns
(List): Returns the new list of filtered values.
Drop
Creates a slice of List with n elements dropped from the beginning
Arguments
list
(List): The list to query.n=1
(num): The number of elements to drop.
Returns
(List): Returns the slice of list
.
DropRight
Creates a slice of List with n elements dropped from the end.
Arguments
list
(List): The list to query.n=1
(num): The number of elements to drop.
Returns
(List): Returns the slice of list
.
DropWhile
Creates a slice of list excluding elements dropped from the beginning.Elements are dropped until predicate returns falsey. The predicate is invoked with three arguments: (value, index, list).
Arguments
list
(List): The array to query.[predicate]
(Function): The function invoked per iteration.
Returns
(List): Returns the slice of list
.
Fill
Fills elements of a list with value from start up to, but not including, end.
Arguments
list
(List): The list to fill.value
(*): The value to filllist
with.[start=0]
(num): The start position.[end=list.length]
(num): The end position.
Returns
(List): Returns list
Last updated