Please refer to README.md
Returns true if all value in needles is contained in haystack,
by default using === semantics.
Returns true if array contains duplicate instances based on === equality checking.
Returns true if array contains duplicate values.
Returns true if all values in the array are the same. Uses value-based equality checking by default.
Returns a function that cycles through the contents of an array. By default starts at index 0.
Returns a copy of an array with specified length - padded or truncated as needed.
Returns two separate arrays of everything that filter returns true,
and everything it returns false on.
Yields elements from array that match a given predicate, and moreover are between
the given startIndex (inclusive) and endIndex (exclusive).
Returns a 'flattened' copy of array, un-nesting arrays one level
Computes the frequency of values by a grouping function.
Groups data by a function grouper, returning data as a map with string
keys and array values. Multiple values can be assigned to the same group.
Inserts values at position index, shuffling remaining
items further down and returning changed result.
Returns an interleaving of two or more arrays. All arrays must be the same length.
Returns the intersection of two arrays: the elements that are in common. Duplicates are removed in the process.
Returns true if the two arrays have the same length, and have the same items at the same indexes.
Returns true if arrays contain same value items, regardless of order. Will return false if arrays are of different length.
Returns the array.map() output, or a value if array
is not an array or empty.
Merges arrays left to right, using the provided
reconcile function to choose a winner when keys overlap.
Creates a moving window
As movingWindow but also allows access to context, namely you can access the window at any time without adding to it.
Yields pairs made up of overlapping items from the input array.
Reduces in a pairwise fashion.
Returns a random element of an array
Returns a random array index.
Removes an element at index index from data, returning the resulting array without modifying the original.
Removes items from input array that match predicate.
A modified array is returned along with the number of items removed.
Samples values from an array.
Returns a shuffled copy of the input array.
Sorts an array of objects in ascending order by the given property name, assuming it is a number.
Sorts an array of objects by some named property.
Combines the values of one or more arrays, removing duplicates.
Yields all items in the input array for as long as predicate returns true.
Returns an array with value(s) omitted.
Returns a copy of an input array with undefined values removed.
Zip combines the elements of two or more arrays based on their index.
Function that returns true if a and b are considered equal
Returns a result of a merged into b. B is always the 'newer' data that takes precedence.
Similar to Javascript's in-built Array.at function, but allows offsets to wrap.