Module

x/lodash_es/src/array.js

lodash for deno use
Latest
import * as mod from "https://dotland.deno.dev/x/lodash_es@v0.0.2/src/array.js";

Variables

Creates an array of array values not included in the other given arrays using SameValueZero for equality comparisons. The order and references of result values are determined by the first array.

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 they're compared. The order and references of result values are determined by the first array. The iteratee is invoked with one argument: (value).

This method is like _.difference except that it accepts comparator which is invoked to compare elements of array to values. The order and references of result values are determined by the first array. The comparator is invoked with two arguments: (arrVal, othVal).

Creates an array of unique values that are included in all given arrays using SameValueZero for equality comparisons. The order and references of result values are determined by the first array.

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 they're compared. The order and references of result values are determined by the first array. The iteratee is invoked with one argument: (value).

This method is like _.intersection except that it accepts comparator which is invoked to compare elements of arrays. The order and references of result values are determined by the first array. The comparator is invoked with two arguments: (arrVal, othVal).

Removes all given values from array using SameValueZero for equality comparisons.

Removes elements from array corresponding to indexes and returns an array of removed elements.

Creates an array of unique values, in order, from all given arrays using SameValueZero for equality comparisons.

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. Result values are chosen from the first array in which the value occurs. The iteratee is invoked with one argument: (value).

This method is like _.union except that it accepts comparator which is invoked to compare elements of arrays. Result values are chosen from the first array in which the value occurs. The comparator is invoked with two arguments: (arrVal, othVal).

Creates an array excluding all given values using SameValueZero for equality comparisons.

Creates an array of unique values that is the symmetric difference of the given arrays. The order of result values is determined by the order they occur in the arrays.

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 by which they're compared. The order of result values is determined by the order they occur in the arrays. The iteratee is invoked with one argument: (value).

This method is like _.xor except that it accepts comparator which is invoked to compare elements of arrays. The order of result values is determined by the order they occur in the arrays. The comparator is invoked with two arguments: (arrVal, othVal).

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.

This method is like _.zip except that it accepts iteratee to specify how grouped values should be combined. The iteratee is invoked with the elements of each group: (...group).

Functions

Creates an array of elements split into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements.

Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are falsey.

Creates a new array concatenating array with any additional arrays and/or values.

Creates a slice of array with n elements dropped from the beginning.

Creates a slice of array with n elements dropped from the end.

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).

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).

Fills elements of array with value from start up to, but not including, end.

This method is like _.find except that it returns the index of the first element predicate returns truthy for instead of the element itself.

This method is like _.findIndex except that it iterates over elements of collection from right to left.

Gets the first element of array.

Flattens array a single level deep.

Recursively flattens array.

Recursively flatten array up to depth times.

The inverse of _.toPairs; this method returns an object composed from key-value pairs.

Gets 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.

Gets all but the last element of array.

Converts all elements in array into a string separated by separator.

Gets the last element of array.

This method is like _.indexOf except that it iterates over elements of array from right to left.

Gets the element at index n of array. If n is negative, the nth element from the end is returned.

This method is like _.pull except that it accepts an array of values to remove.

This method is like _.pullAll except that it accepts iteratee which is invoked for each element of array and values to generate the criterion by which they're compared. The iteratee is invoked with one argument: (value).

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).

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).

Reverses array so that the first element becomes the last, the second element becomes the second to last, and so on.

Creates a slice of array from start up to, but not including, end.

Uses a binary search to determine the lowest index at which value should be inserted into array in order to maintain its sort order.

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).

This method is like _.indexOf except that it performs a binary search on a sorted array.

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.

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).

This method is like _.lastIndexOf except that it performs a binary search on a sorted array.

This method is like _.uniq except that it's designed and optimized for sorted arrays.

This method is like _.uniqBy except that it's designed and optimized for sorted arrays.

Gets all but the first element of array.

Creates a slice of array with n elements taken from the beginning.

Creates a slice of array with n elements taken from the end.

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).

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).

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 order of result values is determined by the order they occur in the 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 order of result values is determined by the order they occur in the array. The iteratee is invoked with one argument: (value).

This method is like _.uniq except that it accepts comparator which is invoked to compare elements of array. The order of result values is determined by the order they occur in the array.The comparator is invoked with two arguments: (arrVal, othVal).

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.

This method is like _.unzip except that it accepts iteratee to specify how regrouped values should be combined. The iteratee is invoked with the elements of each group: (...group).

This method is like _.fromPairs except that it accepts two arrays, one of property identifiers and one of corresponding values.

This method is like _.zipObject except that it supports property paths.