Array
Index
Accessor
at
Return an item at the
indexposition
size
Return the length of the array
Constructor
empty
Always returns an empty array
generate
Generate an array of
lengthusingmapFn(index)on each element
of
Returns a new array from a set of items.
Predicate
every
Determines whether all the members of an array satisfy the specified test.
includes
Determines whether an array includes a certain item, returning true or false as appropriate.
isEmpty
Return true if the size of the array is 0
some
Determines whether the specified callback function returns true for any item of an array.
Type
hasInstance
Alias to
Array.isArray()
Other
concat
Concatenate all elements of arrays Equivalent to
[...array, ...extension[0], ...extension[1], ...],
deleteAt
Return an array excluding the item at the
index
filter
Returns the items of an array that meet the condition specified in a callback function.
find
Returns the value of the first element in the array where predicate is true, and Option.None otherwise.
findIndex
Returns the index of the first element in the array where predicate is true, and Option.None otherwise.
findLast
Returns the value of the last element in the array where predicate is true, and Option.None otherwise.
findLastIndex
Returns the index of the last element in the array where predicate is true, and Option.None otherwise.
flatMap
Calls a defined callback function on each item of an array. Each calls should return an array. The final result is the concatenation of each arrays.
fromAsync
Creates an array from an async iterator or iterable object.
indexOf
Returns the index of the first occurrence of
searchItemin an array.
insertAt
Add
itemat theindexin the array
lastIndexOf
Returns the index of the last occurrence of a specified
searchItemin an array.
map
Calls a defined callback function on each item of an array, and returns an array that contains the results.
reduce
Calls the specified callback function for all the items in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
reduceRight
Calls the specified callback function for all the items in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
reverse
Return a reversed array
setAt
Replace
itemat theindexin the array
slice
Returns a section of an array.
sort
Return a sorted array using
compareFn
splice
Add
itemat theindexin the array
A collection of functions to manipulate readonly arrays.