groupBy
Creates an object composed of keys generated from the results of running each element of collection through iteratee. The order of grouped values is determined by the order they occur in collection.
Category
Utilities for working with collections and iterables
12 utilities available
Creates an object composed of keys generated from the results of running each element of collection through iteratee. The order of grouped values is determined by the order they occur in collection.
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.
Creates an array of elements split into two groups, the first of which contains elements predicate returns truthy for, the second of which contains elements predicate returns falsy for.
Creates an array of elements, sorted in ascending order by the results of running each element through each iteratee. This method performs a stable sort.
This method is like sortBy except that it allows specifying the sort orders of the iteratees. If orders is unspecified, all values are sorted in ascending order.
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.
Creates an array of shuffled values, using a version of the Fisher-Yates shuffle.
Gets a random element from collection.
Gets n random elements at unique keys from collection up to the size of collection.
Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate returns falsy.
Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate returns truthy.
Checks if value is in collection. If collection is a string, it's checked for a substring of value.