The collection to iterate over.
The function invoked per iteration.
Returns the composed aggregate object.
Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate returns falsey. The predicate is invoked with three arguments: (value, index|key, collection).
The collection to iterate over.
The function invoked per iteration.
Returns true if all elements pass the predicate check, else false.
Iterates over elements of collection, returning an array of all elements predicate returns truthy for. The predicate is invoked with three arguments: (value, index|key, collection).
The collection to iterate over.
The function invoked per iteration.
Returns the new filtered array.
Iterates over elements of collection, returning the first element predicate returns truthy for. The predicate is invoked with three arguments: (value, index|key, collection).
The collection to search.
The function invoked per iteration.
The index to search from.
Returns the matched element, else undefined.
This method is like _.find except that it iterates over elements of a collection from right to left.
Searches for a value in this list.
The function called per iteration.
The index to search from.
The found element, else undefined.
Creates an array of flattened values by running each element in collection through iteratee and concating its result to the other mapped values. The iteratee is invoked with three arguments: (value, index|key, collection).
The collection to iterate over.
Returns the new flattened array.
This method is like _.flatMap
except that it recursively flattens the
mapped results.
The collection to iterate over.
Returns the new flattened array.
This method is like _.flatMap
except that it recursively flattens the
mapped results up to depth
times.
The collection to iterate over.
Returns the new flattened array.
Iterates over elements of collection invoking iteratee for each element. The iteratee is invoked with three arguments: (value, index|key, collection). Iteratee functions may exit iteration early by explicitly returning false.
Note: As with other "Collections" methods, objects with a "length" property are iterated like arrays. To avoid this behavior _.forIn or _.forOwn may be used for object iteration.
The collection to iterate over.
The function invoked per iteration.
This method is like _.forEach except that it iterates over elements of collection from right to left.
The collection to iterate over.
The function called per iteration.
Creates an object composed of keys generated from the results of running each element of collection through iteratee. The corresponding value of each key is an array of the elements responsible for generating the key. The iteratee is invoked with one argument: (value).
The collection to iterate over.
The function invoked per iteration.
Returns the composed aggregate object.
Checks if target is in collection using SameValueZero for equality comparisons. If fromIndex is negative, it’s used as the offset from the end of collection.
The collection to search.
The value to search for.
The index to search from.
True if the target element is found, else false.
Invokes the method named by methodName on each element in the collection returning an array of the results of each invoked method. Additional arguments will be provided to each invoked method. If methodName is a function it will be invoked for, and this bound to, each element in the collection.
The collection to iterate over.
The name of the method to invoke.
Arguments to invoke the method with.
Creates an object composed of keys generated from the results of running each element of collection through iteratee. The corresponding value of each key is the last element responsible for generating the key. The iteratee function is invoked with one argument: (value).
The collection to iterate over.
The function invoked per iteration.
Returns the composed aggregate object.
Creates an array of values by running each element in collection through iteratee. The iteratee is invoked with three arguments: (value, index|key, collection).
Many lodash methods are guarded to work as iteratees for methods like _.every, _.filter, _.map, _.mapValues, _.reject, and _.some.
The guarded methods are: ary, callback, chunk, clone, create, curry, curryRight, drop, dropRight, every, fill, flatten, invert, max, min, parseInt, slice, sortBy, take, takeRight, template, trim, trimLeft, trimRight, trunc, random, range, sample, some, sum, uniq, and words
The collection to iterate over.
The function invoked per iteration.
Returns the new mapped array.
This method is like _.sortBy
except that it allows specifying the sort
orders of the iteratees to sort by. If orders
is unspecified, all values
are sorted in ascending order. Otherwise, specify an order of "desc" for
descending or "asc" for ascending sort order of corresponding values.
The collection to iterate over.
Returns the new sorted array.
Creates an array of elements split into two groups, the first of which contains elements predicate returns truthy for, while the second of which contains elements predicate returns falsey for. The predicate is invoked with three arguments: (value, index|key, collection).
The collection to iterate over.
The function called per iteration.
Returns the array of grouped elements.
Reduces a collection to a value which is the accumulated result of running each element in the collection through the callback, where each successive callback execution consumes the return value of the previous execution. If accumulator is not provided the first element of the collection will be used as the initial accumulator value. The callback is invoked with four arguments: (accumulator, value, index|key, collection).
The collection to iterate over.
The function called per iteration.
Initial value of the accumulator.
Returns the accumulated value.
This method is like _.reduce except that it iterates over elements of a collection from right to left.
The collection to iterate over.
The function called per iteration.
Initial value of the accumulator.
The accumulated value.
The opposite of _.filter; this method returns the elements of collection that predicate does not return truthy for.
The collection to iterate over.
The function invoked per iteration.
Returns the new filtered array.
Gets a random element from collection.
The collection to sample.
Returns the random element.
Gets n random elements at unique keys from collection up to the size of collection.
The collection to sample.
The number of elements to sample.
Returns the random elements.
Creates an array of shuffled values, using a version of the Fisher-Yates shuffle.
The collection to shuffle.
Returns the new shuffled array.
Gets the size of collection by returning its length for array-like values or the number of own enumerable properties for objects.
The collection to inspect.
Returns the size of collection.
Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate returns truthy. The predicate is invoked with three arguments: (value, index|key, collection).
The collection to iterate over.
The function invoked per iteration.
Returns true if any element passes the predicate check, else false.
Creates an array of elements, sorted in ascending order by the results of running each element in a collection through each iteratee. This method performs a stable sort, that is, it preserves the original sort order of equal elements. The iteratees are invoked with one argument: (value).
The collection to iterate over.
Returns the new sorted array.
Generated using TypeDoc
Creates an object composed of keys generated from the results of running each element of collection through iteratee. The corresponding value of each key is the number of times the key was returned by iteratee. The iteratee is invoked with one argument: (value).