Lodash Functions
Classic utility functions: collections, objects, functional helpers and their edge cases.
1.Unique Array
Remove duplicate values from an array while keeping the first occurrence of each, in order.
2.Deep Clone
Make a deep copy of a JSON-like value so that no nested object or array is shared with the original.
3.Deep Equal
Decide whether two JSON-like values are structurally equal, comparing nested objects and arrays by content.
4.Flatten
Flatten a nested array to a given depth, recursively or with an explicit stack.
5.Get
Safely read a nested value from an object by a dot/bracket path, falling back to a default.
6.Group By
Group the elements of an array into arrays keyed by the result of an iteratee.
7.Chunk
Split an array into consecutive groups of a fixed size, with a shorter final group if needed.
8.Count By
Count how many elements of an array map to each key produced by an iteratee.
9.Difference
Return the elements of an array that do not appear in any of the other given arrays.
10.Max By
Return the element whose iteratee value is largest, skipping elements that produce no comparable value.
11.Min By
Return the element whose iteratee value is smallest, skipping elements that produce no comparable value.
12.Pick
Create a new object containing only the listed keys of a source object.
13.Range
Generate an array of numbers from start up to, but not including, end with an optional step.
14.Deep Merge
Recursively merge configuration objects without mutating the inputs, with clear rules for arrays and undefined.
15.Deep Omit
Remove the given keys from an object at every level of nesting, including inside arrays.
16.Has
Check whether an object has an own property at a nested path, even when the value is undefined.
17.Intersection
Return the unique values that appear in every one of the given arrays.
18.Is Empty
Decide whether a value is empty: no length, no size, or no own enumerable keys depending on its type.
19.Omit
Create a shallow copy of an object without the listed keys.
20.Set
Write a value at a nested path, creating missing objects and arrays along the way.
21.Union By
Merge several arrays into one list of unique elements, where uniqueness is decided by an iteratee.
22.Deep Clone II
Deep clone values with circular references, shared references, Date, RegExp, Map, Set, symbols and prototypes.
23.Clamp
Restrict a number to an inclusive range between a lower and an upper bound.
24.Compact
Return a new array with every falsy value removed.
25.Drop Right While
Drop trailing elements of an array for as long as a predicate holds, scanning from the end.
26.Drop While
Drop leading elements of an array for as long as a predicate holds, then keep the rest.
27.Fill
Overwrite a range of an array with a value, supporting negative start and end indices.
28.Find Index
Return the index of the first element that satisfies a predicate, starting from an optional index.
29.Find Last Index
Return the index of the last element that satisfies a predicate, searching backwards from an optional index.
30.From Pairs
Build an object from an array of [key, value] pairs, the inverse of Object.entries.
31.In Range
Check whether a number lies in a half-open range, with an optional start and swapped bounds.
32.Mean
Compute the arithmetic mean of an array of numbers, returning NaN for an empty array.