"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "doc/README.md" between
lodash-4.17.20.tar.gz and lodash-4.17.21.tar.gz

About: lodash is a modern JavaScript utility library delivering modularity, performance, & extras. Tagged version.

README.md  (lodash-4.17.20):README.md  (lodash-4.17.21)
# <a href="https://lodash.com/">lodash</a> <span>v4.17.20</span> # <a href="https://lodash.com/">lodash</a> <span>v4.17.21</span>
<!-- div class="toc-container" --> <!-- div class="toc-container" -->
<!-- div --> <!-- div -->
## `Array` ## `Array`
* <a href="#_chunkarray-size1">`_.chunk`</a> * <a href="#_chunkarray-size1">`_.chunk`</a>
* <a href="#_compactarray">`_.compact`</a> * <a href="#_compactarray">`_.compact`</a>
* <a href="#_concatarray-values">`_.concat`</a> * <a href="#_concatarray-values">`_.concat`</a>
* <a href="#_differencearray-values">`_.difference`</a> * <a href="#_differencearray-values">`_.difference`</a>
skipping to change at line 418 skipping to change at line 418
<!-- div class="doc-container" --> <!-- div class="doc-container" -->
<!-- div --> <!-- div -->
## `“Array” Methods` ## `“Array” Methods`
<!-- div --> <!-- div -->
<h3 id="_chunkarray-size1"><code>_.chunk(array, [size=1])</code></h3> <h3 id="_chunkarray-size1"><code>_.chunk(array, [size=1])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L6861 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.chunk "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L6903 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.chunk "See the npm pa ckage") [&#x24C9;][1]
Creates an array of elements split into groups the length of `size`. 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 If `array` can't be split evenly, the final chunk will be the remaining
elements. elements.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to process. 1. `array` *(Array)*: The array to process.
skipping to change at line 449 skipping to change at line 449
_.chunk(['a', 'b', 'c', 'd'], 3); _.chunk(['a', 'b', 'c', 'd'], 3);
// => [['a', 'b', 'c'], ['d']] // => [['a', 'b', 'c'], ['d']]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_compactarray"><code>_.compact(array)</code></h3> <h3 id="_compactarray"><code>_.compact(array)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L6896 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.compact "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L6938 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.compact "See the npm package") [&#x24C9;][1]
Creates an array with all falsey values removed. The values `false`, `null`, Creates an array with all falsey values removed. The values `false`, `null`,
`0`, `""`, `undefined`, and `NaN` are falsey. `0`, `""`, `undefined`, and `NaN` are falsey.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to compact. 1. `array` *(Array)*: The array to compact.
skipping to change at line 475 skipping to change at line 475
_.compact([0, 1, false, 2, '', 3]); _.compact([0, 1, false, 2, '', 3]);
// => [1, 2, 3] // => [1, 2, 3]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_concatarray-values"><code>_.concat(array, [values])</code></h3> <h3 id="_concatarray-values"><code>_.concat(array, [values])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L6933 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.concat "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L6975 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.concat "See the npm p ackage") [&#x24C9;][1]
Creates a new array concatenating `array` with any additional arrays Creates a new array concatenating `array` with any additional arrays
and/or values. and/or values.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to concatenate. 1. `array` *(Array)*: The array to concatenate.
2. `[values]` *(...&#42;)*: The values to concatenate. 2. `[values]` *(...&#42;)*: The values to concatenate.
skipping to change at line 508 skipping to change at line 508
console.log(array); console.log(array);
// => [1] // => [1]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_differencearray-values"><code>_.difference(array, [values])</code></h3> <h3 id="_differencearray-values"><code>_.difference(array, [values])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L6969 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.difference "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7011 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.difference "See the n pm package") [&#x24C9;][1]
Creates an array of `array` values not included in the other given arrays Creates an array of `array` values not included in the other given arrays
using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevalu ezero) using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevalu ezero)
for equality comparisons. The order and references of result values are for equality comparisons. The order and references of result values are
determined by the first array. determined by the first array.
<br> <br>
<br> <br>
**Note:** Unlike `_.pullAll`, this method returns a new array. **Note:** Unlike `_.pullAll`, this method returns a new array.
#### Since #### Since
skipping to change at line 540 skipping to change at line 540
_.difference([2, 1], [2, 3]); _.difference([2, 1], [2, 3]);
// => [1] // => [1]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_differencebyarray-values-iteratee_identity"><code>_.differenceBy(array, [values], [iteratee=_.identity])</code></h3> <h3 id="_differencebyarray-values-iteratee_identity"><code>_.differenceBy(array, [values], [iteratee=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7001 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.differenceby "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7043 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.differenceby "See the npm package") [&#x24C9;][1]
This method is like `_.difference` except that it accepts `iteratee` which This method is like `_.difference` except that it accepts `iteratee` which
is invoked for each element of `array` and `values` to generate the criterion 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 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:<br> determined by the first array. The iteratee is invoked with one argument:<br>
*(value)*. *(value)*.
<br> <br>
<br> <br>
**Note:** Unlike `_.pullAllBy`, this method returns a new array. **Note:** Unlike `_.pullAllBy`, this method returns a new array.
skipping to change at line 578 skipping to change at line 578
_.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
// => [{ 'x': 2 }] // => [{ 'x': 2 }]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_differencewitharray-values-comparator"><code>_.differenceWith(array, [v alues], [comparator])</code></h3> <h3 id="_differencewitharray-values-comparator"><code>_.differenceWith(array, [v alues], [comparator])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7034 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.differencewith "See t he npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7076 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.differencewith "See t he npm package") [&#x24C9;][1]
This method is like `_.difference` except that it accepts `comparator` This method is like `_.difference` except that it accepts `comparator`
which is invoked to compare elements of `array` to `values`. The order and 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 references of result values are determined by the first array. The comparator
is invoked with two arguments: *(arrVal, othVal)*. is invoked with two arguments: *(arrVal, othVal)*.
<br> <br>
<br> <br>
**Note:** Unlike `_.pullAllWith`, this method returns a new array. **Note:** Unlike `_.pullAllWith`, this method returns a new array.
#### Since #### Since
skipping to change at line 613 skipping to change at line 613
_.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
// => [{ 'x': 2, 'y': 1 }] // => [{ 'x': 2, 'y': 1 }]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_droparray-n1"><code>_.drop(array, [n=1])</code></h3> <h3 id="_droparray-n1"><code>_.drop(array, [n=1])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7069 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.drop "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7111 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.drop "See the npm pac kage") [&#x24C9;][1]
Creates a slice of `array` with `n` elements dropped from the beginning. Creates a slice of `array` with `n` elements dropped from the beginning.
#### Since #### Since
0.5.0 0.5.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to query. 1. `array` *(Array)*: The array to query.
2. `[n=1]` *(number)*: The number of elements to drop. 2. `[n=1]` *(number)*: The number of elements to drop.
skipping to change at line 648 skipping to change at line 648
_.drop([1, 2, 3], 0); _.drop([1, 2, 3], 0);
// => [1, 2, 3] // => [1, 2, 3]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_droprightarray-n1"><code>_.dropRight(array, [n=1])</code></h3> <h3 id="_droprightarray-n1"><code>_.dropRight(array, [n=1])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7103 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.dropright "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7145 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.dropright "See the np m package") [&#x24C9;][1]
Creates a slice of `array` with `n` elements dropped from the end. Creates a slice of `array` with `n` elements dropped from the end.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to query. 1. `array` *(Array)*: The array to query.
2. `[n=1]` *(number)*: The number of elements to drop. 2. `[n=1]` *(number)*: The number of elements to drop.
skipping to change at line 683 skipping to change at line 683
_.dropRight([1, 2, 3], 0); _.dropRight([1, 2, 3], 0);
// => [1, 2, 3] // => [1, 2, 3]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_droprightwhilearray-predicate_identity"><code>_.dropRightWhile(array, [ predicate=_.identity])</code></h3> <h3 id="_droprightwhilearray-predicate_identity"><code>_.dropRightWhile(array, [ predicate=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7148 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.droprightwhile "See t he npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7190 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.droprightwhile "See t he npm package") [&#x24C9;][1]
Creates a slice of `array` excluding 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 Elements are dropped until `predicate` returns falsey. The predicate is
invoked with three arguments: *(value, index, array)*. invoked with three arguments: *(value, index, array)*.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to query. 1. `array` *(Array)*: The array to query.
skipping to change at line 729 skipping to change at line 729
_.dropRightWhile(users, 'active'); _.dropRightWhile(users, 'active');
// => objects for ['barney', 'fred', 'pebbles'] // => objects for ['barney', 'fred', 'pebbles']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_dropwhilearray-predicate_identity"><code>_.dropWhile(array, [predicate= _.identity])</code></h3> <h3 id="_dropwhilearray-predicate_identity"><code>_.dropWhile(array, [predicate= _.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7189 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.dropwhile "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7231 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.dropwhile "See the np m package") [&#x24C9;][1]
Creates a slice of `array` excluding elements dropped from the beginning. Creates a slice of `array` excluding elements dropped from the beginning.
Elements are dropped until `predicate` returns falsey. The predicate is Elements are dropped until `predicate` returns falsey. The predicate is
invoked with three arguments: *(value, index, array)*. invoked with three arguments: *(value, index, array)*.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to query. 1. `array` *(Array)*: The array to query.
skipping to change at line 775 skipping to change at line 775
_.dropWhile(users, 'active'); _.dropWhile(users, 'active');
// => objects for ['barney', 'fred', 'pebbles'] // => objects for ['barney', 'fred', 'pebbles']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_fillarray-value-start0-endarraylength"><code>_.fill(array, value, [star t=0], [end=array.length])</code></h3> <h3 id="_fillarray-value-start0-endarraylength"><code>_.fill(array, value, [star t=0], [end=array.length])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7224 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.fill "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7266 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.fill "See the npm pac kage") [&#x24C9;][1]
Fills elements of `array` with `value` from `start` up to, but not Fills elements of `array` with `value` from `start` up to, but not
including, `end`. including, `end`.
<br> <br>
<br> <br>
**Note:** This method mutates `array`. **Note:** This method mutates `array`.
#### Since #### Since
3.2.0 3.2.0
skipping to change at line 816 skipping to change at line 816
_.fill([4, 6, 8, 10], '*', 1, 3); _.fill([4, 6, 8, 10], '*', 1, 3);
// => [4, '*', '*', 10] // => [4, '*', '*', 10]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_findindexarray-predicate_identity-fromindex0"><code>_.findIndex(array, [predicate=_.identity], [fromIndex=0])</code></h3> <h3 id="_findindexarray-predicate_identity-fromindex0"><code>_.findIndex(array, [predicate=_.identity], [fromIndex=0])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7271 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.findindex "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7313 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.findindex "See the np m package") [&#x24C9;][1]
This method is like `_.find` except that it returns the index of the first This method is like `_.find` except that it returns the index of the first
element `predicate` returns truthy for instead of the element itself. element `predicate` returns truthy for instead of the element itself.
#### Since #### Since
1.1.0 1.1.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to inspect. 1. `array` *(Array)*: The array to inspect.
2. `[predicate=_.identity]` *(Function)*: The function invoked per iteration. 2. `[predicate=_.identity]` *(Function)*: The function invoked per iteration.
skipping to change at line 862 skipping to change at line 862
_.findIndex(users, 'active'); _.findIndex(users, 'active');
// => 2 // => 2
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_findlastindexarray-predicate_identity-fromindexarraylength-1"><code>_.f indLastIndex(array, [predicate=_.identity], [fromIndex=array.length-1])</code></ h3> <h3 id="_findlastindexarray-predicate_identity-fromindexarraylength-1"><code>_.f indLastIndex(array, [predicate=_.identity], [fromIndex=array.length-1])</code></ h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7318 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.findlastindex "See th e npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7360 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.findlastindex "See th e npm package") [&#x24C9;][1]
This method is like `_.findIndex` except that it iterates over elements This method is like `_.findIndex` except that it iterates over elements
of `collection` from right to left. of `collection` from right to left.
#### Since #### Since
2.0.0 2.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to inspect. 1. `array` *(Array)*: The array to inspect.
2. `[predicate=_.identity]` *(Function)*: The function invoked per iteration. 2. `[predicate=_.identity]` *(Function)*: The function invoked per iteration.
skipping to change at line 908 skipping to change at line 908
_.findLastIndex(users, 'active'); _.findLastIndex(users, 'active');
// => 0 // => 0
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_flattenarray"><code>_.flatten(array)</code></h3> <h3 id="_flattenarray"><code>_.flatten(array)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7347 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.flatten "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7389 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.flatten "See the npm package") [&#x24C9;][1]
Flattens `array` a single level deep. Flattens `array` a single level deep.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to flatten. 1. `array` *(Array)*: The array to flatten.
#### Returns #### Returns
skipping to change at line 933 skipping to change at line 933
_.flatten([1, [2, [3, [4]], 5]]); _.flatten([1, [2, [3, [4]], 5]]);
// => [1, 2, [3, [4]], 5] // => [1, 2, [3, [4]], 5]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_flattendeeparray"><code>_.flattenDeep(array)</code></h3> <h3 id="_flattendeeparray"><code>_.flattenDeep(array)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7366 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7408 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") [&#x24C9;][1]
Recursively flattens `array`. Recursively flattens `array`.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to flatten. 1. `array` *(Array)*: The array to flatten.
#### Returns #### Returns
skipping to change at line 958 skipping to change at line 958
_.flattenDeep([1, [2, [3, [4]], 5]]); _.flattenDeep([1, [2, [3, [4]], 5]]);
// => [1, 2, 3, 4, 5] // => [1, 2, 3, 4, 5]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_flattendeptharray-depth1"><code>_.flattenDepth(array, [depth=1])</code> </h3> <h3 id="_flattendeptharray-depth1"><code>_.flattenDepth(array, [depth=1])</code> </h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7391 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7433 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") [&#x24C9;][1]
Recursively flatten `array` up to `depth` times. Recursively flatten `array` up to `depth` times.
#### Since #### Since
4.4.0 4.4.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to flatten. 1. `array` *(Array)*: The array to flatten.
2. `[depth=1]` *(number)*: The maximum recursion depth. 2. `[depth=1]` *(number)*: The maximum recursion depth.
skipping to change at line 989 skipping to change at line 989
_.flattenDepth(array, 2); _.flattenDepth(array, 2);
// => [1, 2, 3, [4], 5] // => [1, 2, 3, [4], 5]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_frompairspairs"><code>_.fromPairs(pairs)</code></h3> <h3 id="_frompairspairs"><code>_.fromPairs(pairs)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7415 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.frompairs "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7457 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.frompairs "See the np m package") [&#x24C9;][1]
The inverse of `_.toPairs`; this method returns an object composed The inverse of `_.toPairs`; this method returns an object composed
from key-value `pairs`. from key-value `pairs`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `pairs` *(Array)*: The key-value pairs. 1. `pairs` *(Array)*: The key-value pairs.
skipping to change at line 1015 skipping to change at line 1015
_.fromPairs([['a', 1], ['b', 2]]); _.fromPairs([['a', 1], ['b', 2]]);
// => { 'a': 1, 'b': 2 } // => { 'a': 1, 'b': 2 }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_headarray"><code>_.head(array)</code></h3> <h3 id="_headarray"><code>_.head(array)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7445 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.head "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7487 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.head "See the npm pac kage") [&#x24C9;][1]
Gets the first element of `array`. Gets the first element of `array`.
#### Since #### Since
0.1.0 0.1.0
#### Aliases #### Aliases
*_.first* *_.first*
#### Arguments #### Arguments
skipping to change at line 1046 skipping to change at line 1046
_.head([]); _.head([]);
// => undefined // => undefined
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_indexofarray-value-fromindex0"><code>_.indexOf(array, value, [fromIndex =0])</code></h3> <h3 id="_indexofarray-value-fromindex0"><code>_.indexOf(array, value, [fromIndex =0])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7472 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.indexof "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7514 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.indexof "See the npm package") [&#x24C9;][1]
Gets the index at which the first occurrence of `value` is found in `array` Gets the index at which the first occurrence of `value` is found in `array`
using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevalu ezero) using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevalu ezero)
for equality comparisons. If `fromIndex` is negative, it's used as the for equality comparisons. If `fromIndex` is negative, it's used as the
offset from the end of `array`. offset from the end of `array`.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
skipping to change at line 1080 skipping to change at line 1080
_.indexOf([1, 2, 1, 2], 2, 2); _.indexOf([1, 2, 1, 2], 2, 2);
// => 3 // => 3
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_initialarray"><code>_.initial(array)</code></h3> <h3 id="_initialarray"><code>_.initial(array)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7498 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.initial "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7540 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.initial "See the npm package") [&#x24C9;][1]
Gets all but the last element of `array`. Gets all but the last element of `array`.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to query. 1. `array` *(Array)*: The array to query.
#### Returns #### Returns
skipping to change at line 1105 skipping to change at line 1105
_.initial([1, 2, 3]); _.initial([1, 2, 3]);
// => [1, 2] // => [1, 2]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_intersectionarrays"><code>_.intersection([arrays])</code></h3> <h3 id="_intersectionarrays"><code>_.intersection([arrays])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7520 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.intersection "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7562 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.intersection "See the npm package") [&#x24C9;][1]
Creates an array of unique values that are included in all given arrays Creates an array of unique values that are included in all given arrays
using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevalu ezero) using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevalu ezero)
for equality comparisons. The order and references of result values are for equality comparisons. The order and references of result values are
determined by the first array. determined by the first array.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
skipping to change at line 1133 skipping to change at line 1133
_.intersection([2, 1], [2, 3]); _.intersection([2, 1], [2, 3]);
// => [2] // => [2]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_intersectionbyarrays-iteratee_identity"><code>_.intersectionBy([arrays] , [iteratee=_.identity])</code></h3> <h3 id="_intersectionbyarrays-iteratee_identity"><code>_.intersectionBy([arrays] , [iteratee=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7550 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.intersectionby "See t he npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7592 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.intersectionby "See t he npm package") [&#x24C9;][1]
This method is like `_.intersection` except that it accepts `iteratee` This method is like `_.intersection` except that it accepts `iteratee`
which is invoked for each element of each `arrays` to generate the criterion 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 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:<br> determined by the first array. The iteratee is invoked with one argument:<br>
*(value)*. *(value)*.
#### Since #### Since
4.0.0 4.0.0
skipping to change at line 1167 skipping to change at line 1167
_.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
// => [{ 'x': 1 }] // => [{ 'x': 1 }]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_intersectionwitharrays-comparator"><code>_.intersectionWith([arrays], [ comparator])</code></h3> <h3 id="_intersectionwitharrays-comparator"><code>_.intersectionWith([arrays], [ comparator])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7585 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7627 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package") [&#x24C9;][1]
This method is like `_.intersection` except that it accepts `comparator` This method is like `_.intersection` except that it accepts `comparator`
which is invoked to compare elements of `arrays`. The order and references which is invoked to compare elements of `arrays`. The order and references
of result values are determined by the first array. The comparator is of result values are determined by the first array. The comparator is
invoked with two arguments: *(arrVal, othVal)*. invoked with two arguments: *(arrVal, othVal)*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
skipping to change at line 1199 skipping to change at line 1199
_.intersectionWith(objects, others, _.isEqual); _.intersectionWith(objects, others, _.isEqual);
// => [{ 'x': 1, 'y': 2 }] // => [{ 'x': 1, 'y': 2 }]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_joinarray-separator-"><code>_.join(array, [separator=','])</code></h3> <h3 id="_joinarray-separator-"><code>_.join(array, [separator=','])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7613 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.join "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7655 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.join "See the npm pac kage") [&#x24C9;][1]
Converts all elements in `array` into a string separated by `separator`. Converts all elements in `array` into a string separated by `separator`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to convert. 1. `array` *(Array)*: The array to convert.
2. `[separator=',']` *(string)*: The element separator. 2. `[separator=',']` *(string)*: The element separator.
skipping to change at line 1225 skipping to change at line 1225
_.join(['a', 'b', 'c'], '~'); _.join(['a', 'b', 'c'], '~');
// => 'a~b~c' // => 'a~b~c'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_lastarray"><code>_.last(array)</code></h3> <h3 id="_lastarray"><code>_.last(array)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7631 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.last "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7673 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.last "See the npm pac kage") [&#x24C9;][1]
Gets the last element of `array`. Gets the last element of `array`.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to query. 1. `array` *(Array)*: The array to query.
#### Returns #### Returns
skipping to change at line 1250 skipping to change at line 1250
_.last([1, 2, 3]); _.last([1, 2, 3]);
// => 3 // => 3
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_lastindexofarray-value-fromindexarraylength-1"><code>_.lastIndexOf(arra y, value, [fromIndex=array.length-1])</code></h3> <h3 id="_lastindexofarray-value-fromindexarraylength-1"><code>_.lastIndexOf(arra y, value, [fromIndex=array.length-1])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7657 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.lastindexof "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7699 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.lastindexof "See the npm package") [&#x24C9;][1]
This method is like `_.indexOf` except that it iterates over elements of This method is like `_.indexOf` except that it iterates over elements of
`array` from right to left. `array` from right to left.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to inspect. 1. `array` *(Array)*: The array to inspect.
2. `value` *(&#42;)*: The value to search for. 2. `value` *(&#42;)*: The value to search for.
skipping to change at line 1282 skipping to change at line 1282
_.lastIndexOf([1, 2, 1, 2], 2, 2); _.lastIndexOf([1, 2, 1, 2], 2, 2);
// => 1 // => 1
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_ntharray-n0"><code>_.nth(array, [n=0])</code></h3> <h3 id="_ntharray-n0"><code>_.nth(array, [n=0])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7693 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.nth "See the npm pack age") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7735 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.nth "See the npm pack age") [&#x24C9;][1]
Gets the element at index `n` of `array`. If `n` is negative, the nth Gets the element at index `n` of `array`. If `n` is negative, the nth
element from the end is returned. element from the end is returned.
#### Since #### Since
4.11.0 4.11.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to query. 1. `array` *(Array)*: The array to query.
2. `[n=0]` *(number)*: The index of the element to return. 2. `[n=0]` *(number)*: The index of the element to return.
skipping to change at line 1314 skipping to change at line 1314
_.nth(array, -2); _.nth(array, -2);
// => 'c'; // => 'c';
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_pullarray-values"><code>_.pull(array, [values])</code></h3> <h3 id="_pullarray-values"><code>_.pull(array, [values])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7720 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.pull "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7762 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.pull "See the npm pac kage") [&#x24C9;][1]
Removes all given values from `array` using Removes all given values from `array` using
[`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
for equality comparisons. for equality comparisons.
<br> <br>
<br> <br>
**Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
to remove elements from an array by predicate. to remove elements from an array by predicate.
#### Since #### Since
skipping to change at line 1349 skipping to change at line 1349
console.log(array); console.log(array);
// => ['b', 'b'] // => ['b', 'b']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_pullallarray-values"><code>_.pullAll(array, values)</code></h3> <h3 id="_pullallarray-values"><code>_.pullAll(array, values)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7742 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.pullall "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7784 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.pullall "See the npm package") [&#x24C9;][1]
This method is like `_.pull` except that it accepts an array of values to remove . This method is like `_.pull` except that it accepts an array of values to remove .
<br> <br>
<br> <br>
**Note:** Unlike `_.difference`, this method mutates `array`. **Note:** Unlike `_.difference`, this method mutates `array`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
skipping to change at line 1381 skipping to change at line 1381
console.log(array); console.log(array);
// => ['b', 'b'] // => ['b', 'b']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_pullallbyarray-values-iteratee_identity"><code>_.pullAllBy(array, value s, [iteratee=_.identity])</code></h3> <h3 id="_pullallbyarray-values-iteratee_identity"><code>_.pullAllBy(array, value s, [iteratee=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7771 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.pullallby "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7813 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.pullallby "See the np m package") [&#x24C9;][1]
This method is like `_.pullAll` except that it accepts `iteratee` which is This method is like `_.pullAll` except that it accepts `iteratee` which is
invoked for each element of `array` and `values` to generate the criterion 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)*. by which they're compared. The iteratee is invoked with one argument: *(value)*.
<br> <br>
<br> <br>
**Note:** Unlike `_.differenceBy`, this method mutates `array`. **Note:** Unlike `_.differenceBy`, this method mutates `array`.
#### Since #### Since
4.0.0 4.0.0
skipping to change at line 1416 skipping to change at line 1416
console.log(array); console.log(array);
// => [{ 'x': 2 }] // => [{ 'x': 2 }]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_pullallwitharray-values-comparator"><code>_.pullAllWith(array, values, [comparator])</code></h3> <h3 id="_pullallwitharray-values-comparator"><code>_.pullAllWith(array, values, [comparator])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7800 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.pullallwith "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7842 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.pullallwith "See the npm package") [&#x24C9;][1]
This method is like `_.pullAll` except that it accepts `comparator` which This method is like `_.pullAll` except that it accepts `comparator` which
is invoked to compare elements of `array` to `values`. The comparator is is invoked to compare elements of `array` to `values`. The comparator is
invoked with two arguments: *(arrVal, othVal)*. invoked with two arguments: *(arrVal, othVal)*.
<br> <br>
<br> <br>
**Note:** Unlike `_.differenceWith`, this method mutates `array`. **Note:** Unlike `_.differenceWith`, this method mutates `array`.
#### Since #### Since
4.6.0 4.6.0
skipping to change at line 1451 skipping to change at line 1451
console.log(array); console.log(array);
// => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_pullatarray-indexes"><code>_.pullAt(array, [indexes])</code></h3> <h3 id="_pullatarray-indexes"><code>_.pullAt(array, [indexes])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7830 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.pullat "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7872 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.pullat "See the npm p ackage") [&#x24C9;][1]
Removes elements from `array` corresponding to `indexes` and returns an Removes elements from `array` corresponding to `indexes` and returns an
array of removed elements. array of removed elements.
<br> <br>
<br> <br>
**Note:** Unlike `_.at`, this method mutates `array`. **Note:** Unlike `_.at`, this method mutates `array`.
#### Since #### Since
3.0.0 3.0.0
skipping to change at line 1487 skipping to change at line 1487
console.log(pulled); console.log(pulled);
// => ['b', 'd'] // => ['b', 'd']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_removearray-predicate_identity"><code>_.remove(array, [predicate=_.iden tity])</code></h3> <h3 id="_removearray-predicate_identity"><code>_.remove(array, [predicate=_.iden tity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7869 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.remove "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7911 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.remove "See the npm p ackage") [&#x24C9;][1]
Removes all elements from `array` that `predicate` returns truthy for Removes all elements from `array` that `predicate` returns truthy for
and returns an array of the removed elements. The predicate is invoked and returns an array of the removed elements. The predicate is invoked
with three arguments: *(value, index, array)*. with three arguments: *(value, index, array)*.
<br> <br>
<br> <br>
**Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
to pull elements from an array by value. to pull elements from an array by value.
#### Since #### Since
skipping to change at line 1527 skipping to change at line 1527
console.log(evens); console.log(evens);
// => [2, 4] // => [2, 4]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_reversearray"><code>_.reverse(array)</code></h3> <h3 id="_reversearray"><code>_.reverse(array)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7913 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.reverse "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7955 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.reverse "See the npm package") [&#x24C9;][1]
Reverses `array` so that the first element becomes the last, the second Reverses `array` so that the first element becomes the last, the second
element becomes the second to last, and so on. element becomes the second to last, and so on.
<br> <br>
<br> <br>
**Note:** This method mutates `array` and is based on **Note:** This method mutates `array` and is based on
[`Array#reverse`](https://mdn.io/Array/reverse). [`Array#reverse`](https://mdn.io/Array/reverse).
#### Since #### Since
4.0.0 4.0.0
skipping to change at line 1562 skipping to change at line 1562
console.log(array); console.log(array);
// => [3, 2, 1] // => [3, 2, 1]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_slicearray-start0-endarraylength"><code>_.slice(array, [start=0], [end= array.length])</code></h3> <h3 id="_slicearray-start0-endarraylength"><code>_.slice(array, [start=0], [end= array.length])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7933 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.slice "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L7975 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.slice "See the npm pa ckage") [&#x24C9;][1]
Creates a slice of `array` from `start` up to, but not including, `end`. Creates a slice of `array` from `start` up to, but not including, `end`.
<br> <br>
<br> <br>
**Note:** This method is used instead of **Note:** This method is used instead of
[`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
returned. returned.
#### Since #### Since
3.0.0 3.0.0
skipping to change at line 1589 skipping to change at line 1589
#### Returns #### Returns
*(Array)*: Returns the slice of `array`. *(Array)*: Returns the slice of `array`.
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_sortedindexarray-value"><code>_.sortedIndex(array, value)</code></h3> <h3 id="_sortedindexarray-value"><code>_.sortedIndex(array, value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7966 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sortedindex "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8008 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sortedindex "See the npm package") [&#x24C9;][1]
Uses a binary search to determine the lowest index at which `value` Uses a binary search to determine the lowest index at which `value`
should be inserted into `array` in order to maintain its sort order. should be inserted into `array` in order to maintain its sort order.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `array` *(Array)*: The sorted array to inspect. 1. `array` *(Array)*: The sorted array to inspect.
2. `value` *(&#42;)*: The value to evaluate. 2. `value` *(&#42;)*: The value to evaluate.
skipping to change at line 1616 skipping to change at line 1616
_.sortedIndex([30, 50], 40); _.sortedIndex([30, 50], 40);
// => 1 // => 1
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_sortedindexbyarray-value-iteratee_identity"><code>_.sortedIndexBy(array , value, [iteratee=_.identity])</code></h3> <h3 id="_sortedindexbyarray-value-iteratee_identity"><code>_.sortedIndexBy(array , value, [iteratee=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L7995 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sortedindexby "See th e npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8037 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sortedindexby "See th e npm package") [&#x24C9;][1]
This method is like `_.sortedIndex` except that it accepts `iteratee` This method is like `_.sortedIndex` except that it accepts `iteratee`
which is invoked for `value` and each element of `array` to compute their which is invoked for `value` and each element of `array` to compute their
sort ranking. The iteratee is invoked with one argument: *(value)*. sort ranking. The iteratee is invoked with one argument: *(value)*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The sorted array to inspect. 1. `array` *(Array)*: The sorted array to inspect.
skipping to change at line 1651 skipping to change at line 1651
_.sortedIndexBy(objects, { 'x': 4 }, 'x'); _.sortedIndexBy(objects, { 'x': 4 }, 'x');
// => 0 // => 0
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_sortedindexofarray-value"><code>_.sortedIndexOf(array, value)</code></h 3> <h3 id="_sortedindexofarray-value"><code>_.sortedIndexOf(array, value)</code></h 3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8015 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sortedindexof "See th e npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8057 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sortedindexof "See th e npm package") [&#x24C9;][1]
This method is like `_.indexOf` except that it performs a binary This method is like `_.indexOf` except that it performs a binary
search on a sorted `array`. search on a sorted `array`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to inspect. 1. `array` *(Array)*: The array to inspect.
2. `value` *(&#42;)*: The value to search for. 2. `value` *(&#42;)*: The value to search for.
skipping to change at line 1678 skipping to change at line 1678
_.sortedIndexOf([4, 5, 5, 5, 6], 5); _.sortedIndexOf([4, 5, 5, 5, 6], 5);
// => 1 // => 1
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_sortedlastindexarray-value"><code>_.sortedLastIndex(array, value)</code ></h3> <h3 id="_sortedlastindexarray-value"><code>_.sortedLastIndex(array, value)</code ></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8044 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8086 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package") [&#x24C9;][1]
This method is like `_.sortedIndex` except that it returns the highest This method is like `_.sortedIndex` except that it returns the highest
index at which `value` should be inserted into `array` in order to index at which `value` should be inserted into `array` in order to
maintain its sort order. maintain its sort order.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The sorted array to inspect. 1. `array` *(Array)*: The sorted array to inspect.
skipping to change at line 1706 skipping to change at line 1706
_.sortedLastIndex([4, 5, 5, 5, 6], 5); _.sortedLastIndex([4, 5, 5, 5, 6], 5);
// => 4 // => 4
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_sortedlastindexbyarray-value-iteratee_identity"><code>_.sortedLastIndex By(array, value, [iteratee=_.identity])</code></h3> <h3 id="_sortedlastindexbyarray-value-iteratee_identity"><code>_.sortedLastIndex By(array, value, [iteratee=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8073 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sortedlastindexby "Se e the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8115 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sortedlastindexby "Se e the npm package") [&#x24C9;][1]
This method is like `_.sortedLastIndex` except that it accepts `iteratee` This method is like `_.sortedLastIndex` except that it accepts `iteratee`
which is invoked for `value` and each element of `array` to compute their which is invoked for `value` and each element of `array` to compute their
sort ranking. The iteratee is invoked with one argument: *(value)*. sort ranking. The iteratee is invoked with one argument: *(value)*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The sorted array to inspect. 1. `array` *(Array)*: The sorted array to inspect.
skipping to change at line 1741 skipping to change at line 1741
_.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
// => 1 // => 1
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_sortedlastindexofarray-value"><code>_.sortedLastIndexOf(array, value)</ code></h3> <h3 id="_sortedlastindexofarray-value"><code>_.sortedLastIndexOf(array, value)</ code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8093 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sortedlastindexof "Se e the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8135 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sortedlastindexof "Se e the npm package") [&#x24C9;][1]
This method is like `_.lastIndexOf` except that it performs a binary This method is like `_.lastIndexOf` except that it performs a binary
search on a sorted `array`. search on a sorted `array`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to inspect. 1. `array` *(Array)*: The array to inspect.
2. `value` *(&#42;)*: The value to search for. 2. `value` *(&#42;)*: The value to search for.
skipping to change at line 1768 skipping to change at line 1768
_.sortedLastIndexOf([4, 5, 5, 5, 6], 5); _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
// => 3 // => 3
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_sorteduniqarray"><code>_.sortedUniq(array)</code></h3> <h3 id="_sorteduniqarray"><code>_.sortedUniq(array)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8119 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sorteduniq "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8161 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sorteduniq "See the n pm package") [&#x24C9;][1]
This method is like `_.uniq` except that it's designed and optimized This method is like `_.uniq` except that it's designed and optimized
for sorted arrays. for sorted arrays.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to inspect. 1. `array` *(Array)*: The array to inspect.
skipping to change at line 1794 skipping to change at line 1794
_.sortedUniq([1, 1, 2]); _.sortedUniq([1, 1, 2]);
// => [1, 2] // => [1, 2]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_sorteduniqbyarray-iteratee"><code>_.sortedUniqBy(array, [iteratee])</co de></h3> <h3 id="_sorteduniqbyarray-iteratee"><code>_.sortedUniqBy(array, [iteratee])</co de></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8141 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8183 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package") [&#x24C9;][1]
This method is like `_.uniqBy` except that it's designed and optimized This method is like `_.uniqBy` except that it's designed and optimized
for sorted arrays. for sorted arrays.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to inspect. 1. `array` *(Array)*: The array to inspect.
2. `[iteratee]` *(Function)*: The iteratee invoked per element. 2. `[iteratee]` *(Function)*: The iteratee invoked per element.
skipping to change at line 1821 skipping to change at line 1821
_.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
// => [1.1, 2.3] // => [1.1, 2.3]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_tailarray"><code>_.tail(array)</code></h3> <h3 id="_tailarray"><code>_.tail(array)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8161 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.tail "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8203 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.tail "See the npm pac kage") [&#x24C9;][1]
Gets all but the first element of `array`. Gets all but the first element of `array`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to query. 1. `array` *(Array)*: The array to query.
#### Returns #### Returns
skipping to change at line 1846 skipping to change at line 1846
_.tail([1, 2, 3]); _.tail([1, 2, 3]);
// => [2, 3] // => [2, 3]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_takearray-n1"><code>_.take(array, [n=1])</code></h3> <h3 id="_takearray-n1"><code>_.take(array, [n=1])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8191 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.take "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8233 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.take "See the npm pac kage") [&#x24C9;][1]
Creates a slice of `array` with `n` elements taken from the beginning. Creates a slice of `array` with `n` elements taken from the beginning.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to query. 1. `array` *(Array)*: The array to query.
2. `[n=1]` *(number)*: The number of elements to take. 2. `[n=1]` *(number)*: The number of elements to take.
skipping to change at line 1881 skipping to change at line 1881
_.take([1, 2, 3], 0); _.take([1, 2, 3], 0);
// => [] // => []
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_takerightarray-n1"><code>_.takeRight(array, [n=1])</code></h3> <h3 id="_takerightarray-n1"><code>_.takeRight(array, [n=1])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8224 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.takeright "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8266 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.takeright "See the np m package") [&#x24C9;][1]
Creates a slice of `array` with `n` elements taken from the end. Creates a slice of `array` with `n` elements taken from the end.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to query. 1. `array` *(Array)*: The array to query.
2. `[n=1]` *(number)*: The number of elements to take. 2. `[n=1]` *(number)*: The number of elements to take.
skipping to change at line 1916 skipping to change at line 1916
_.takeRight([1, 2, 3], 0); _.takeRight([1, 2, 3], 0);
// => [] // => []
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_takerightwhilearray-predicate_identity"><code>_.takeRightWhile(array, [ predicate=_.identity])</code></h3> <h3 id="_takerightwhilearray-predicate_identity"><code>_.takeRightWhile(array, [ predicate=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8269 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.takerightwhile "See t he npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8311 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.takerightwhile "See t he npm package") [&#x24C9;][1]
Creates a slice of `array` with elements taken from the end. Elements are Creates a slice of `array` with elements taken from the end. Elements are
taken until `predicate` returns falsey. The predicate is invoked with taken until `predicate` returns falsey. The predicate is invoked with
three arguments: *(value, index, array)*. three arguments: *(value, index, array)*.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to query. 1. `array` *(Array)*: The array to query.
skipping to change at line 1962 skipping to change at line 1962
_.takeRightWhile(users, 'active'); _.takeRightWhile(users, 'active');
// => [] // => []
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_takewhilearray-predicate_identity"><code>_.takeWhile(array, [predicate= _.identity])</code></h3> <h3 id="_takewhilearray-predicate_identity"><code>_.takeWhile(array, [predicate= _.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8310 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.takewhile "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8352 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.takewhile "See the np m package") [&#x24C9;][1]
Creates a slice of `array` with elements taken from the beginning. Elements Creates a slice of `array` with elements taken from the beginning. Elements
are taken until `predicate` returns falsey. The predicate is invoked with are taken until `predicate` returns falsey. The predicate is invoked with
three arguments: *(value, index, array)*. three arguments: *(value, index, array)*.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to query. 1. `array` *(Array)*: The array to query.
skipping to change at line 2008 skipping to change at line 2008
_.takeWhile(users, 'active'); _.takeWhile(users, 'active');
// => [] // => []
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_unionarrays"><code>_.union([arrays])</code></h3> <h3 id="_unionarrays"><code>_.union([arrays])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8332 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.union "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8374 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.union "See the npm pa ckage") [&#x24C9;][1]
Creates an array of unique values, in order, from all given arrays using Creates an array of unique values, in order, from all given arrays using
[`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
for equality comparisons. for equality comparisons.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `[arrays]` *(...Array)*: The arrays to inspect. 1. `[arrays]` *(...Array)*: The arrays to inspect.
skipping to change at line 2035 skipping to change at line 2035
_.union([2], [1, 2]); _.union([2], [1, 2]);
// => [2, 1] // => [2, 1]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_unionbyarrays-iteratee_identity"><code>_.unionBy([arrays], [iteratee=_. identity])</code></h3> <h3 id="_unionbyarrays-iteratee_identity"><code>_.unionBy([arrays], [iteratee=_. identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8359 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.unionby "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8401 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.unionby "See the npm package") [&#x24C9;][1]
This method is like `_.union` except that it accepts `iteratee` which is This method is like `_.union` except that it accepts `iteratee` which is
invoked for each element of each `arrays` to generate the criterion by invoked for each element of each `arrays` to generate the criterion by
which uniqueness is computed. Result values are chosen from the first which uniqueness is computed. Result values are chosen from the first
array in which the value occurs. The iteratee is invoked with one argument:<br> array in which the value occurs. The iteratee is invoked with one argument:<br>
*(value)*. *(value)*.
#### Since #### Since
4.0.0 4.0.0
skipping to change at line 2069 skipping to change at line 2069
_.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
// => [{ 'x': 1 }, { 'x': 2 }] // => [{ 'x': 1 }, { 'x': 2 }]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_unionwitharrays-comparator"><code>_.unionWith([arrays], [comparator])</ code></h3> <h3 id="_unionwitharrays-comparator"><code>_.unionWith([arrays], [comparator])</ code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8388 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.unionwith "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8430 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.unionwith "See the np m package") [&#x24C9;][1]
This method is like `_.union` except that it accepts `comparator` which This method is like `_.union` except that it accepts `comparator` which
is invoked to compare elements of `arrays`. Result values are chosen from is invoked to compare elements of `arrays`. Result values are chosen from
the first array in which the value occurs. The comparator is invoked the first array in which the value occurs. The comparator is invoked
with two arguments: *(arrVal, othVal)*. with two arguments: *(arrVal, othVal)*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
skipping to change at line 2101 skipping to change at line 2101
_.unionWith(objects, others, _.isEqual); _.unionWith(objects, others, _.isEqual);
// => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_uniqarray"><code>_.uniq(array)</code></h3> <h3 id="_uniqarray"><code>_.uniq(array)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8412 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.uniq "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8454 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.uniq "See the npm pac kage") [&#x24C9;][1]
Creates a duplicate-free version of an array, using Creates a duplicate-free version of an array, using
[`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
for equality comparisons, in which only the first occurrence of each element 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 is kept. The order of result values is determined by the order they occur
in the array. in the array.
#### Since #### Since
0.1.0 0.1.0
skipping to change at line 2130 skipping to change at line 2130
_.uniq([2, 1, 2]); _.uniq([2, 1, 2]);
// => [2, 1] // => [2, 1]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_uniqbyarray-iteratee_identity"><code>_.uniqBy(array, [iteratee=_.identi ty])</code></h3> <h3 id="_uniqbyarray-iteratee_identity"><code>_.uniqBy(array, [iteratee=_.identi ty])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8439 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.uniqby "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8481 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.uniqby "See the npm p ackage") [&#x24C9;][1]
This method is like `_.uniq` except that it accepts `iteratee` which is This method is like `_.uniq` except that it accepts `iteratee` which is
invoked for each element in `array` to generate the criterion by which invoked for each element in `array` to generate the criterion by which
uniqueness is computed. The order of result values is determined by the 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:<br> order they occur in the array. The iteratee is invoked with one argument:<br>
*(value)*. *(value)*.
#### Since #### Since
4.0.0 4.0.0
skipping to change at line 2164 skipping to change at line 2164
_.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
// => [{ 'x': 1 }, { 'x': 2 }] // => [{ 'x': 1 }, { 'x': 2 }]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_uniqwitharray-comparator"><code>_.uniqWith(array, [comparator])</code>< /h3> <h3 id="_uniqwitharray-comparator"><code>_.uniqWith(array, [comparator])</code>< /h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8463 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.uniqwith "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8505 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.uniqwith "See the npm package") [&#x24C9;][1]
This method is like `_.uniq` except that it accepts `comparator` which This method is like `_.uniq` except that it accepts `comparator` which
is invoked to compare elements of `array`. The order of result values is 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 determined by the order they occur in the array.The comparator is invoked
with two arguments: *(arrVal, othVal)*. with two arguments: *(arrVal, othVal)*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
skipping to change at line 2195 skipping to change at line 2195
_.uniqWith(objects, _.isEqual); _.uniqWith(objects, _.isEqual);
// => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_unziparray"><code>_.unzip(array)</code></h3> <h3 id="_unziparray"><code>_.unzip(array)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8487 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.unzip "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8529 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.unzip "See the npm pa ckage") [&#x24C9;][1]
This method is like `_.zip` except that it accepts an array of grouped 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 elements and creates an array regrouping the elements to their pre-zip
configuration. configuration.
#### Since #### Since
1.2.0 1.2.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array of grouped elements to process. 1. `array` *(Array)*: The array of grouped elements to process.
skipping to change at line 2225 skipping to change at line 2225
_.unzip(zipped); _.unzip(zipped);
// => [['a', 'b'], [1, 2], [true, false]] // => [['a', 'b'], [1, 2], [true, false]]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_unzipwitharray-iteratee_identity"><code>_.unzipWith(array, [iteratee=_. identity])</code></h3> <h3 id="_unzipwitharray-iteratee_identity"><code>_.unzipWith(array, [iteratee=_. identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8524 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.unzipwith "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8566 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.unzipwith "See the np m package") [&#x24C9;][1]
This method is like `_.unzip` except that it accepts `iteratee` to specify This method is like `_.unzip` except that it accepts `iteratee` to specify
how regrouped values should be combined. The iteratee is invoked with the how regrouped values should be combined. The iteratee is invoked with the
elements of each group: *(...group)*. elements of each group: *(...group)*.
#### Since #### Since
3.8.0 3.8.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array of grouped elements to process. 1. `array` *(Array)*: The array of grouped elements to process.
skipping to change at line 2256 skipping to change at line 2256
_.unzipWith(zipped, _.add); _.unzipWith(zipped, _.add);
// => [3, 30, 300] // => [3, 30, 300]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_withoutarray-values"><code>_.without(array, [values])</code></h3> <h3 id="_withoutarray-values"><code>_.without(array, [values])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8557 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.without "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8599 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.without "See the npm package") [&#x24C9;][1]
Creates an array excluding all given values using Creates an array excluding all given values using
[`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
for equality comparisons. for equality comparisons.
<br> <br>
<br> <br>
**Note:** Unlike `_.pull`, this method returns a new array. **Note:** Unlike `_.pull`, this method returns a new array.
#### Since #### Since
0.1.0 0.1.0
skipping to change at line 2287 skipping to change at line 2287
_.without([2, 1, 2, 3], 1, 2); _.without([2, 1, 2, 3], 1, 2);
// => [3] // => [3]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_xorarrays"><code>_.xor([arrays])</code></h3> <h3 id="_xorarrays"><code>_.xor([arrays])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8581 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.xor "See the npm pack age") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8623 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.xor "See the npm pack age") [&#x24C9;][1]
Creates an array of unique values that is the Creates an array of unique values that is the
[symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
of the given arrays. The order of result values is determined by the order of the given arrays. The order of result values is determined by the order
they occur in the arrays. they occur in the arrays.
#### Since #### Since
2.4.0 2.4.0
#### Arguments #### Arguments
skipping to change at line 2315 skipping to change at line 2315
_.xor([2, 1], [2, 3]); _.xor([2, 1], [2, 3]);
// => [1, 3] // => [1, 3]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_xorbyarrays-iteratee_identity"><code>_.xorBy([arrays], [iteratee=_.iden tity])</code></h3> <h3 id="_xorbyarrays-iteratee_identity"><code>_.xorBy([arrays], [iteratee=_.iden tity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8608 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.xorby "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8650 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.xorby "See the npm pa ckage") [&#x24C9;][1]
This method is like `_.xor` except that it accepts `iteratee` which is This method is like `_.xor` except that it accepts `iteratee` which is
invoked for each element of each `arrays` to generate the criterion by 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 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 by the order they occur in the arrays. The iteratee is invoked with one
argument: *(value)*. argument: *(value)*.
#### Since #### Since
4.0.0 4.0.0
skipping to change at line 2349 skipping to change at line 2349
_.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
// => [{ 'x': 2 }] // => [{ 'x': 2 }]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_xorwitharrays-comparator"><code>_.xorWith([arrays], [comparator])</code ></h3> <h3 id="_xorwitharrays-comparator"><code>_.xorWith([arrays], [comparator])</code ></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8637 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.xorwith "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8679 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.xorwith "See the npm package") [&#x24C9;][1]
This method is like `_.xor` except that it accepts `comparator` which is This method is like `_.xor` except that it accepts `comparator` which is
invoked to compare elements of `arrays`. The order of result values 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 determined by the order they occur in the arrays. The comparator is invoked
with two arguments: *(arrVal, othVal)*. with two arguments: *(arrVal, othVal)*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
skipping to change at line 2381 skipping to change at line 2381
_.xorWith(objects, others, _.isEqual); _.xorWith(objects, others, _.isEqual);
// => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_ziparrays"><code>_.zip([arrays])</code></h3> <h3 id="_ziparrays"><code>_.zip([arrays])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8659 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.zip "See the npm pack age") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8701 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.zip "See the npm pack age") [&#x24C9;][1]
Creates an array of grouped elements, the first of which contains the Creates an array of grouped elements, the first of which contains the
first elements of the given arrays, the second 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. second elements of the given arrays, and so on.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `[arrays]` *(...Array)*: The arrays to process. 1. `[arrays]` *(...Array)*: The arrays to process.
skipping to change at line 2408 skipping to change at line 2408
_.zip(['a', 'b'], [1, 2], [true, false]); _.zip(['a', 'b'], [1, 2], [true, false]);
// => [['a', 1, true], ['b', 2, false]] // => [['a', 1, true], ['b', 2, false]]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_zipobjectprops-values"><code>_.zipObject([props=[]], [values=[]])</code ></h3> <h3 id="_zipobjectprops-values"><code>_.zipObject([props=[]], [values=[]])</code ></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8677 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.zipobject "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8719 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.zipobject "See the np m package") [&#x24C9;][1]
This method is like `_.fromPairs` except that it accepts two arrays, This method is like `_.fromPairs` except that it accepts two arrays,
one of property identifiers and one of corresponding values. one of property identifiers and one of corresponding values.
#### Since #### Since
0.4.0 0.4.0
#### Arguments #### Arguments
1. `[props=[]]` *(Array)*: The property identifiers. 1. `[props=[]]` *(Array)*: The property identifiers.
2. `[values=[]]` *(Array)*: The property values. 2. `[values=[]]` *(Array)*: The property values.
skipping to change at line 2435 skipping to change at line 2435
_.zipObject(['a', 'b'], [1, 2]); _.zipObject(['a', 'b'], [1, 2]);
// => { 'a': 1, 'b': 2 } // => { 'a': 1, 'b': 2 }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_zipobjectdeepprops-values"><code>_.zipObjectDeep([props=[]], [values=[] ])</code></h3> <h3 id="_zipobjectdeepprops-values"><code>_.zipObjectDeep([props=[]], [values=[] ])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8696 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.zipobjectdeep "See th e npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8738 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.zipobjectdeep "See th e npm package") [&#x24C9;][1]
This method is like `_.zipObject` except that it supports property paths. This method is like `_.zipObject` except that it supports property paths.
#### Since #### Since
4.1.0 4.1.0
#### Arguments #### Arguments
1. `[props=[]]` *(Array)*: The property identifiers. 1. `[props=[]]` *(Array)*: The property identifiers.
2. `[values=[]]` *(Array)*: The property values. 2. `[values=[]]` *(Array)*: The property values.
skipping to change at line 2461 skipping to change at line 2461
_.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
// => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_zipwitharrays-iteratee_identity"><code>_.zipWith([arrays], [iteratee=_. identity])</code></h3> <h3 id="_zipwitharrays-iteratee_identity"><code>_.zipWith([arrays], [iteratee=_. identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8720 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.zipwith "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8762 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.zipwith "See the npm package") [&#x24C9;][1]
This method is like `_.zip` except that it accepts `iteratee` to specify This method is like `_.zip` except that it accepts `iteratee` to specify
how grouped values should be combined. The iteratee is invoked with the how grouped values should be combined. The iteratee is invoked with the
elements of each group: *(...group)*. elements of each group: *(...group)*.
#### Since #### Since
3.8.0 3.8.0
#### Arguments #### Arguments
1. `[arrays]` *(...Array)*: The arrays to process. 1. `[arrays]` *(...Array)*: The arrays to process.
skipping to change at line 2497 skipping to change at line 2497
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
## `“Collection” Methods` ## `“Collection” Methods`
<!-- div --> <!-- div -->
<h3 id="_countbycollection-iteratee_identity"><code>_.countBy(collection, [itera tee=_.identity])</code></h3> <h3 id="_countbycollection-iteratee_identity"><code>_.countBy(collection, [itera tee=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9099 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.countby "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9141 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.countby "See the npm package") [&#x24C9;][1]
Creates an object composed of keys generated from the results of running Creates an object composed of keys generated from the results of running
each element of `collection` thru `iteratee`. The corresponding value of each element of `collection` thru `iteratee`. The corresponding value of
each key is the number of times the key was returned by `iteratee`. The each key is the number of times the key was returned by `iteratee`. The
iteratee is invoked with one argument: *(value)*. iteratee is invoked with one argument: *(value)*.
#### Since #### Since
0.5.0 0.5.0
#### Arguments #### Arguments
skipping to change at line 2530 skipping to change at line 2530
_.countBy(['one', 'two', 'three'], 'length'); _.countBy(['one', 'two', 'three'], 'length');
// => { '3': 2, '5': 1 } // => { '3': 2, '5': 1 }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_everycollection-predicate_identity"><code>_.every(collection, [predicat e=_.identity])</code></h3> <h3 id="_everycollection-predicate_identity"><code>_.every(collection, [predicat e=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9148 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.every "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9190 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.every "See the npm pa ckage") [&#x24C9;][1]
Checks if `predicate` returns truthy for **all** elements of `collection`. Checks if `predicate` returns truthy for **all** elements of `collection`.
Iteration is stopped once `predicate` returns falsey. The predicate is Iteration is stopped once `predicate` returns falsey. The predicate is
invoked with three arguments: *(value, index|key, collection)*. invoked with three arguments: *(value, index|key, collection)*.
<br> <br>
<br> <br>
**Note:** This method returns `true` for **Note:** This method returns `true` for
[empty collections](https://en.wikipedia.org/wiki/Empty_set) because [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
[everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
elements of empty collections. elements of empty collections.
skipping to change at line 2581 skipping to change at line 2581
_.every(users, 'active'); _.every(users, 'active');
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_filtercollection-predicate_identity"><code>_.filter(collection, [predic ate=_.identity])</code></h3> <h3 id="_filtercollection-predicate_identity"><code>_.filter(collection, [predic ate=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9197 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.filter "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9239 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.filter "See the npm p ackage") [&#x24C9;][1]
Iterates over elements of `collection`, returning an array of all elements Iterates over elements of `collection`, returning an array of all elements
`predicate` returns truthy for. The predicate is invoked with three `predicate` returns truthy for. The predicate is invoked with three
arguments: *(value, index|key, collection)*. arguments: *(value, index|key, collection)*.
<br> <br>
<br> <br>
**Note:** Unlike `_.remove`, this method returns a new array. **Note:** Unlike `_.remove`, this method returns a new array.
#### Since #### Since
0.1.0 0.1.0
skipping to change at line 2633 skipping to change at line 2633
_.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
// => objects for ['fred', 'barney'] // => objects for ['fred', 'barney']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_findcollection-predicate_identity-fromindex0"><code>_.find(collection, [predicate=_.identity], [fromIndex=0])</code></h3> <h3 id="_findcollection-predicate_identity-fromindex0"><code>_.find(collection, [predicate=_.identity], [fromIndex=0])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9238 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.find "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9280 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.find "See the npm pac kage") [&#x24C9;][1]
Iterates over elements of `collection`, returning the first element Iterates over elements of `collection`, returning the first element
`predicate` returns truthy for. The predicate is invoked with three `predicate` returns truthy for. The predicate is invoked with three
arguments: *(value, index|key, collection)*. arguments: *(value, index|key, collection)*.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `collection` *(Array|Object)*: The collection to inspect. 1. `collection` *(Array|Object)*: The collection to inspect.
skipping to change at line 2680 skipping to change at line 2680
_.find(users, 'active'); _.find(users, 'active');
// => object for 'barney' // => object for 'barney'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_findlastcollection-predicate_identity-fromindexcollectionlength-1"><cod e>_.findLast(collection, [predicate=_.identity], [fromIndex=collection.length-1] )</code></h3> <h3 id="_findlastcollection-predicate_identity-fromindexcollectionlength-1"><cod e>_.findLast(collection, [predicate=_.identity], [fromIndex=collection.length-1] )</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9259 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.findlast "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9301 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.findlast "See the npm package") [&#x24C9;][1]
This method is like `_.find` except that it iterates over elements of This method is like `_.find` except that it iterates over elements of
`collection` from right to left. `collection` from right to left.
#### Since #### Since
2.0.0 2.0.0
#### Arguments #### Arguments
1. `collection` *(Array|Object)*: The collection to inspect. 1. `collection` *(Array|Object)*: The collection to inspect.
2. `[predicate=_.identity]` *(Function)*: The function invoked per iteration. 2. `[predicate=_.identity]` *(Function)*: The function invoked per iteration.
skipping to change at line 2710 skipping to change at line 2710
}); });
// => 3 // => 3
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_flatmapcollection-iteratee_identity"><code>_.flatMap(collection, [itera tee=_.identity])</code></h3> <h3 id="_flatmapcollection-iteratee_identity"><code>_.flatMap(collection, [itera tee=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9282 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.flatmap "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9324 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.flatmap "See the npm package") [&#x24C9;][1]
Creates a flattened array of values by running each element in `collection` Creates a flattened array of values by running each element in `collection`
thru `iteratee` and flattening the mapped results. The iteratee is invoked thru `iteratee` and flattening the mapped results. The iteratee is invoked
with three arguments: *(value, index|key, collection)*. with three arguments: *(value, index|key, collection)*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `collection` *(Array|Object)*: The collection to iterate over. 1. `collection` *(Array|Object)*: The collection to iterate over.
skipping to change at line 2742 skipping to change at line 2742
_.flatMap([1, 2], duplicate); _.flatMap([1, 2], duplicate);
// => [1, 1, 2, 2] // => [1, 1, 2, 2]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_flatmapdeepcollection-iteratee_identity"><code>_.flatMapDeep(collection , [iteratee=_.identity])</code></h3> <h3 id="_flatmapdeepcollection-iteratee_identity"><code>_.flatMapDeep(collection , [iteratee=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9306 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9348 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package") [&#x24C9;][1]
This method is like `_.flatMap` except that it recursively flattens the This method is like `_.flatMap` except that it recursively flattens the
mapped results. mapped results.
#### Since #### Since
4.7.0 4.7.0
#### Arguments #### Arguments
1. `collection` *(Array|Object)*: The collection to iterate over. 1. `collection` *(Array|Object)*: The collection to iterate over.
2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration. 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
skipping to change at line 2773 skipping to change at line 2773
_.flatMapDeep([1, 2], duplicate); _.flatMapDeep([1, 2], duplicate);
// => [1, 1, 2, 2] // => [1, 1, 2, 2]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_flatmapdepthcollection-iteratee_identity-depth1"><code>_.flatMapDepth(c ollection, [iteratee=_.identity], [depth=1])</code></h3> <h3 id="_flatmapdepthcollection-iteratee_identity-depth1"><code>_.flatMapDepth(c ollection, [iteratee=_.identity], [depth=1])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9331 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9373 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package") [&#x24C9;][1]
This method is like `_.flatMap` except that it recursively flattens the This method is like `_.flatMap` except that it recursively flattens the
mapped results up to `depth` times. mapped results up to `depth` times.
#### Since #### Since
4.7.0 4.7.0
#### Arguments #### Arguments
1. `collection` *(Array|Object)*: The collection to iterate over. 1. `collection` *(Array|Object)*: The collection to iterate over.
2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration. 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
skipping to change at line 2805 skipping to change at line 2805
_.flatMapDepth([1, 2], duplicate, 2); _.flatMapDepth([1, 2], duplicate, 2);
// => [[1, 1], [2, 2]] // => [[1, 1], [2, 2]]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_foreachcollection-iteratee_identity"><code>_.forEach(collection, [itera tee=_.identity])</code></h3> <h3 id="_foreachcollection-iteratee_identity"><code>_.forEach(collection, [itera tee=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9366 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.foreach "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9408 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.foreach "See the npm package") [&#x24C9;][1]
Iterates over elements of `collection` and invokes `iteratee` for each element. Iterates over elements of `collection` and invokes `iteratee` for each element.
The iteratee is invoked with three arguments: *(value, index|key, collection)*. The iteratee is invoked with three arguments: *(value, index|key, collection)*.
Iteratee functions may exit iteration early by explicitly returning `false`. Iteratee functions may exit iteration early by explicitly returning `false`.
<br> <br>
<br> <br>
**Note:** As with other "Collections" methods, objects with a "length" **Note:** As with other "Collections" methods, objects with a "length"
property are iterated like arrays. To avoid this behavior use `_.forIn` property are iterated like arrays. To avoid this behavior use `_.forIn`
or `_.forOwn` for object iteration. or `_.forOwn` for object iteration.
skipping to change at line 2848 skipping to change at line 2848
}); });
// => Logs 'a' then 'b' (iteration order is not guaranteed). // => Logs 'a' then 'b' (iteration order is not guaranteed).
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_foreachrightcollection-iteratee_identity"><code>_.forEachRight(collecti on, [iteratee=_.identity])</code></h3> <h3 id="_foreachrightcollection-iteratee_identity"><code>_.forEachRight(collecti on, [iteratee=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9391 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.foreachright "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9433 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.foreachright "See the npm package") [&#x24C9;][1]
This method is like `_.forEach` except that it iterates over elements of This method is like `_.forEach` except that it iterates over elements of
`collection` from right to left. `collection` from right to left.
#### Since #### Since
2.0.0 2.0.0
#### Aliases #### Aliases
*_.eachRight* *_.eachRight*
skipping to change at line 2880 skipping to change at line 2880
}); });
// => Logs `2` then `1`. // => Logs `2` then `1`.
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_groupbycollection-iteratee_identity"><code>_.groupBy(collection, [itera tee=_.identity])</code></h3> <h3 id="_groupbycollection-iteratee_identity"><code>_.groupBy(collection, [itera tee=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9419 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.groupby "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9461 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.groupby "See the npm package") [&#x24C9;][1]
Creates an object composed of keys generated from the results of running Creates an object composed of keys generated from the results of running
each element of `collection` thru `iteratee`. The order of grouped values each element of `collection` thru `iteratee`. The order of grouped values
is determined by the order they occur in `collection`. The corresponding is determined by the order they occur in `collection`. The corresponding
value of each key is an array of elements responsible for generating the value of each key is an array of elements responsible for generating the
key. The iteratee is invoked with one argument: *(value)*. key. The iteratee is invoked with one argument: *(value)*.
#### Since #### Since
0.1.0 0.1.0
skipping to change at line 2914 skipping to change at line 2914
_.groupBy(['one', 'two', 'three'], 'length'); _.groupBy(['one', 'two', 'three'], 'length');
// => { '3': ['one', 'two'], '5': ['three'] } // => { '3': ['one', 'two'], '5': ['three'] }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_includescollection-value-fromindex0"><code>_.includes(collection, value , [fromIndex=0])</code></h3> <h3 id="_includescollection-value-fromindex0"><code>_.includes(collection, value , [fromIndex=0])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9457 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.includes "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9499 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.includes "See the npm package") [&#x24C9;][1]
Checks if `value` is in `collection`. If `collection` is a string, it's Checks if `value` is in `collection`. If `collection` is a string, it's
checked for a substring of `value`, otherwise checked for a substring of `value`, otherwise
[`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
is used for equality comparisons. If `fromIndex` is negative, it's used as is used for equality comparisons. If `fromIndex` is negative, it's used as
the offset from the end of `collection`. the offset from the end of `collection`.
#### Since #### Since
0.1.0 0.1.0
skipping to change at line 2954 skipping to change at line 2954
_.includes('abcd', 'bc'); _.includes('abcd', 'bc');
// => true // => true
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_invokemapcollection-path-args"><code>_.invokeMap(collection, path, [arg s])</code></h3> <h3 id="_invokemapcollection-path-args"><code>_.invokeMap(collection, path, [arg s])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9493 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.invokemap "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9535 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.invokemap "See the np m package") [&#x24C9;][1]
Invokes the method at `path` of each element in `collection`, returning Invokes the method at `path` of each element in `collection`, returning
an array of the results of each invoked method. Any additional arguments an array of the results of each invoked method. Any additional arguments
are provided to each invoked method. If `path` is a function, it's invoked are provided to each invoked method. If `path` is a function, it's invoked
for, and `this` bound to, each element in `collection`. for, and `this` bound to, each element in `collection`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
skipping to change at line 2987 skipping to change at line 2987
_.invokeMap([123, 456], String.prototype.split, ''); _.invokeMap([123, 456], String.prototype.split, '');
// => [['1', '2', '3'], ['4', '5', '6']] // => [['1', '2', '3'], ['4', '5', '6']]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_keybycollection-iteratee_identity"><code>_.keyBy(collection, [iteratee= _.identity])</code></h3> <h3 id="_keybycollection-iteratee_identity"><code>_.keyBy(collection, [iteratee= _.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9532 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.keyby "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9574 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.keyby "See the npm pa ckage") [&#x24C9;][1]
Creates an object composed of keys generated from the results of running Creates an object composed of keys generated from the results of running
each element of `collection` thru `iteratee`. The corresponding value of each element of `collection` thru `iteratee`. The corresponding value of
each key is the last element responsible for generating the key. The each key is the last element responsible for generating the key. The
iteratee is invoked with one argument: *(value)*. iteratee is invoked with one argument: *(value)*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
skipping to change at line 3026 skipping to change at line 3026
_.keyBy(array, 'dir'); _.keyBy(array, 'dir');
// => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code' : 100 } } // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code' : 100 } }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_mapcollection-iteratee_identity"><code>_.map(collection, [iteratee=_.id entity])</code></h3> <h3 id="_mapcollection-iteratee_identity"><code>_.map(collection, [iteratee=_.id entity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9578 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.map "See the npm pack age") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9620 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.map "See the npm pack age") [&#x24C9;][1]
Creates an array of values by running each element in `collection` thru Creates an array of values by running each element in `collection` thru
`iteratee`. The iteratee is invoked with three arguments:<br> `iteratee`. The iteratee is invoked with three arguments:<br>
*(value, index|key, collection)*. *(value, index|key, collection)*.
<br> <br>
<br> <br>
Many lodash methods are guarded to work as iteratees for methods like Many lodash methods are guarded to work as iteratees for methods like
`_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
<br> <br>
<br> <br>
skipping to change at line 3081 skipping to change at line 3081
_.map(users, 'user'); _.map(users, 'user');
// => ['barney', 'fred'] // => ['barney', 'fred']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_orderbycollection-iteratees_identity-orders"><code>_.orderBy(collection , [iteratees=[_.identity]], [orders])</code></h3> <h3 id="_orderbycollection-iteratees_identity-orders"><code>_.orderBy(collection , [iteratees=[_.identity]], [orders])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9612 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.orderby "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9654 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.orderby "See the npm package") [&#x24C9;][1]
This method is like `_.sortBy` except that it allows specifying the sort 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 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 are sorted in ascending order. Otherwise, specify an order of "desc" for
descending or "asc" for ascending sort order of corresponding values. descending or "asc" for ascending sort order of corresponding values.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
skipping to change at line 3119 skipping to change at line 3119
_.orderBy(users, ['user', 'age'], ['asc', 'desc']); _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
// => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_partitioncollection-predicate_identity"><code>_.partition(collection, [ predicate=_.identity])</code></h3> <h3 id="_partitioncollection-predicate_identity"><code>_.partition(collection, [ predicate=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9662 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.partition "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9704 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.partition "See the np m package") [&#x24C9;][1]
Creates an array of elements split into two groups, the first of which 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 truthy for, the second of which
contains elements `predicate` returns falsey for. The predicate is contains elements `predicate` returns falsey for. The predicate is
invoked with one argument: *(value)*. invoked with one argument: *(value)*.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
skipping to change at line 3166 skipping to change at line 3166
_.partition(users, 'active'); _.partition(users, 'active');
// => objects for [['fred'], ['barney', 'pebbles']] // => objects for [['fred'], ['barney', 'pebbles']]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_reducecollection-iteratee_identity-accumulator"><code>_.reduce(collecti on, [iteratee=_.identity], [accumulator])</code></h3> <h3 id="_reducecollection-iteratee_identity-accumulator"><code>_.reduce(collecti on, [iteratee=_.identity], [accumulator])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9703 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.reduce "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9745 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.reduce "See the npm p ackage") [&#x24C9;][1]
Reduces `collection` to a value which is the accumulated result of running Reduces `collection` to a value which is the accumulated result of running
each element in `collection` thru `iteratee`, where each successive each element in `collection` thru `iteratee`, where each successive
invocation is supplied the return value of the previous. If `accumulator` invocation is supplied the return value of the previous. If `accumulator`
is not given, the first element of `collection` is used as the initial is not given, the first element of `collection` is used as the initial
value. The iteratee is invoked with four arguments:<br> value. The iteratee is invoked with four arguments:<br>
*(accumulator, value, index|key, collection)*. *(accumulator, value, index|key, collection)*.
<br> <br>
<br> <br>
Many lodash methods are guarded to work as iteratees for methods like Many lodash methods are guarded to work as iteratees for methods like
skipping to change at line 3215 skipping to change at line 3215
}, {}); }, {});
// => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_reducerightcollection-iteratee_identity-accumulator"><code>_.reduceRigh t(collection, [iteratee=_.identity], [accumulator])</code></h3> <h3 id="_reducerightcollection-iteratee_identity-accumulator"><code>_.reduceRigh t(collection, [iteratee=_.identity], [accumulator])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9732 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.reduceright "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9774 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.reduceright "See the npm package") [&#x24C9;][1]
This method is like `_.reduce` except that it iterates over elements of This method is like `_.reduce` except that it iterates over elements of
`collection` from right to left. `collection` from right to left.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `collection` *(Array|Object)*: The collection to iterate over. 1. `collection` *(Array|Object)*: The collection to iterate over.
2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration. 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
skipping to change at line 3247 skipping to change at line 3247
}, []); }, []);
// => [4, 5, 2, 3, 0, 1] // => [4, 5, 2, 3, 0, 1]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_rejectcollection-predicate_identity"><code>_.reject(collection, [predic ate=_.identity])</code></h3> <h3 id="_rejectcollection-predicate_identity"><code>_.reject(collection, [predic ate=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9773 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.reject "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9815 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.reject "See the npm p ackage") [&#x24C9;][1]
The opposite of `_.filter`; this method returns the elements of `collection` The opposite of `_.filter`; this method returns the elements of `collection`
that `predicate` does **not** return truthy for. that `predicate` does **not** return truthy for.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `collection` *(Array|Object)*: The collection to iterate over. 1. `collection` *(Array|Object)*: The collection to iterate over.
2. `[predicate=_.identity]` *(Function)*: The function invoked per iteration. 2. `[predicate=_.identity]` *(Function)*: The function invoked per iteration.
skipping to change at line 3291 skipping to change at line 3291
_.reject(users, 'active'); _.reject(users, 'active');
// => objects for ['barney'] // => objects for ['barney']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_samplecollection"><code>_.sample(collection)</code></h3> <h3 id="_samplecollection"><code>_.sample(collection)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9792 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sample "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9834 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sample "See the npm p ackage") [&#x24C9;][1]
Gets a random element from `collection`. Gets a random element from `collection`.
#### Since #### Since
2.0.0 2.0.0
#### Arguments #### Arguments
1. `collection` *(Array|Object)*: The collection to sample. 1. `collection` *(Array|Object)*: The collection to sample.
#### Returns #### Returns
skipping to change at line 3316 skipping to change at line 3316
_.sample([1, 2, 3, 4]); _.sample([1, 2, 3, 4]);
// => 2 // => 2
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_samplesizecollection-n1"><code>_.sampleSize(collection, [n=1])</code></ h3> <h3 id="_samplesizecollection-n1"><code>_.sampleSize(collection, [n=1])</code></ h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9817 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.samplesize "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9859 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.samplesize "See the n pm package") [&#x24C9;][1]
Gets `n` random elements at unique keys from `collection` up to the Gets `n` random elements at unique keys from `collection` up to the
size of `collection`. size of `collection`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `collection` *(Array|Object)*: The collection to sample. 1. `collection` *(Array|Object)*: The collection to sample.
2. `[n=1]` *(number)*: The number of elements to sample. 2. `[n=1]` *(number)*: The number of elements to sample.
skipping to change at line 3346 skipping to change at line 3346
_.sampleSize([1, 2, 3], 4); _.sampleSize([1, 2, 3], 4);
// => [2, 3, 1] // => [2, 3, 1]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_shufflecollection"><code>_.shuffle(collection)</code></h3> <h3 id="_shufflecollection"><code>_.shuffle(collection)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9842 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.shuffle "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9884 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.shuffle "See the npm package") [&#x24C9;][1]
Creates an array of shuffled values, using a version of the Creates an array of shuffled values, using a version of the
[Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `collection` *(Array|Object)*: The collection to shuffle. 1. `collection` *(Array|Object)*: The collection to shuffle.
skipping to change at line 3372 skipping to change at line 3372
_.shuffle([1, 2, 3, 4]); _.shuffle([1, 2, 3, 4]);
// => [4, 1, 3, 2] // => [4, 1, 3, 2]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_sizecollection"><code>_.size(collection)</code></h3> <h3 id="_sizecollection"><code>_.size(collection)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9868 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.size "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9910 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.size "See the npm pac kage") [&#x24C9;][1]
Gets the size of `collection` by returning its length for array-like Gets the size of `collection` by returning its length for array-like
values or the number of own enumerable string keyed properties for objects. values or the number of own enumerable string keyed properties for objects.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `collection` *(Array|Object|string)*: The collection to inspect. 1. `collection` *(Array|Object|string)*: The collection to inspect.
skipping to change at line 3404 skipping to change at line 3404
_.size('pebbles'); _.size('pebbles');
// => 7 // => 7
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_somecollection-predicate_identity"><code>_.some(collection, [predicate= _.identity])</code></h3> <h3 id="_somecollection-predicate_identity"><code>_.some(collection, [predicate= _.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9918 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.some "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9960 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.some "See the npm pac kage") [&#x24C9;][1]
Checks if `predicate` returns truthy for **any** element of `collection`. Checks if `predicate` returns truthy for **any** element of `collection`.
Iteration is stopped once `predicate` returns truthy. The predicate is Iteration is stopped once `predicate` returns truthy. The predicate is
invoked with three arguments: *(value, index|key, collection)*. invoked with three arguments: *(value, index|key, collection)*.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `collection` *(Array|Object)*: The collection to iterate over. 1. `collection` *(Array|Object)*: The collection to iterate over.
skipping to change at line 3449 skipping to change at line 3449
_.some(users, 'active'); _.some(users, 'active');
// => true // => true
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_sortbycollection-iteratees_identity"><code>_.sortBy(collection, [iterat ees=[_.identity]])</code></h3> <h3 id="_sortbycollection-iteratees_identity"><code>_.sortBy(collection, [iterat ees=[_.identity]])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9955 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sortby "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9997 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.sortby "See the npm p ackage") [&#x24C9;][1]
Creates an array of elements, sorted in ascending order by the results of Creates an array of elements, sorted in ascending order by the results of
running each element in a collection thru each iteratee. This method running each element in a collection thru each iteratee. This method
performs a stable sort, that is, it preserves the original sort order of performs a stable sort, that is, it preserves the original sort order of
equal elements. The iteratees are invoked with one argument: *(value)*. equal elements. The iteratees are invoked with one argument: *(value)*.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
skipping to change at line 3494 skipping to change at line 3494
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
## `“Date” Methods` ## `“Date” Methods`
<!-- div --> <!-- div -->
<h3 id="_now"><code>_.now()</code></h3> <h3 id="_now"><code>_.now()</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9986 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.now "See the npm pack age") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10028 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.now "See the npm pac kage") [&#x24C9;][1]
Gets the timestamp of the number of milliseconds that have elapsed since Gets the timestamp of the number of milliseconds that have elapsed since
the Unix epoch *(1 January `1970 00`:00:00 UTC)*. the Unix epoch *(1 January `1970 00`:00:00 UTC)*.
#### Since #### Since
2.4.0 2.4.0
#### Returns #### Returns
*(number)*: Returns the timestamp. *(number)*: Returns the timestamp.
skipping to change at line 3525 skipping to change at line 3525
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
## `“Function” Methods` ## `“Function” Methods`
<!-- div --> <!-- div -->
<h3 id="_aftern-func"><code>_.after(n, func)</code></h3> <h3 id="_aftern-func"><code>_.after(n, func)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10016 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.after "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10058 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.after "See the npm p ackage") [&#x24C9;][1]
The opposite of `_.before`; this method creates a function that invokes The opposite of `_.before`; this method creates a function that invokes
`func` once it's called `n` or more times. `func` once it's called `n` or more times.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `n` *(number)*: The number of calls before `func` is invoked. 1. `n` *(number)*: The number of calls before `func` is invoked.
2. `func` *(Function)*: The function to restrict. 2. `func` *(Function)*: The function to restrict.
skipping to change at line 3560 skipping to change at line 3560
}); });
// => Logs 'done saving!' after the two async saves have completed. // => Logs 'done saving!' after the two async saves have completed.
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_aryfunc-nfunclength"><code>_.ary(func, [n=func.length])</code></h3> <h3 id="_aryfunc-nfunclength"><code>_.ary(func, [n=func.length])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10045 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.ary "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10087 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.ary "See the npm pac kage") [&#x24C9;][1]
Creates a function that invokes `func`, with up to `n` arguments, Creates a function that invokes `func`, with up to `n` arguments,
ignoring any additional arguments. ignoring any additional arguments.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `func` *(Function)*: The function to cap arguments for. 1. `func` *(Function)*: The function to cap arguments for.
2. `[n=func.length]` *(number)*: The arity cap. 2. `[n=func.length]` *(number)*: The arity cap.
skipping to change at line 3587 skipping to change at line 3587
_.map(['6', '8', '10'], _.ary(parseInt, 1)); _.map(['6', '8', '10'], _.ary(parseInt, 1));
// => [6, 8, 10] // => [6, 8, 10]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_beforen-func"><code>_.before(n, func)</code></h3> <h3 id="_beforen-func"><code>_.before(n, func)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10068 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.before "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10110 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.before "See the npm package") [&#x24C9;][1]
Creates a function that invokes `func`, with the `this` binding and arguments Creates a function that invokes `func`, with the `this` binding and arguments
of the created function, while it's called less than `n` times. Subsequent of the created function, while it's called less than `n` times. Subsequent
calls to the created function return the result of the last `func` invocation. calls to the created function return the result of the last `func` invocation.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `n` *(number)*: The number of calls at which `func` is no longer invoked. 1. `n` *(number)*: The number of calls at which `func` is no longer invoked.
skipping to change at line 3615 skipping to change at line 3615
jQuery(element).on('click', _.before(5, addContactToList)); jQuery(element).on('click', _.before(5, addContactToList));
// => Allows adding up to 4 contacts to the list. // => Allows adding up to 4 contacts to the list.
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_bindfunc-thisarg-partials"><code>_.bind(func, thisArg, [partials])</cod e></h3> <h3 id="_bindfunc-thisarg-partials"><code>_.bind(func, thisArg, [partials])</cod e></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10120 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.bind "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10162 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.bind "See the npm pa ckage") [&#x24C9;][1]
Creates a function that invokes `func` with the `this` binding of `thisArg` Creates a function that invokes `func` with the `this` binding of `thisArg`
and `partials` prepended to the arguments it receives. and `partials` prepended to the arguments it receives.
<br> <br>
<br> <br>
The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
may be used as a placeholder for partially applied arguments. may be used as a placeholder for partially applied arguments.
<br> <br>
<br> <br>
**Note:** Unlike native `Function#bind`, this method doesn't set the "length" **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
skipping to change at line 3663 skipping to change at line 3663
bound('hi'); bound('hi');
// => 'hi fred!' // => 'hi fred!'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_bindkeyobject-key-partials"><code>_.bindKey(object, key, [partials])</c ode></h3> <h3 id="_bindkeyobject-key-partials"><code>_.bindKey(object, key, [partials])</c ode></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10174 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.bindkey "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10216 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.bindkey "See the npm package") [&#x24C9;][1]
Creates a function that invokes the method at `object[key]` with `partials` Creates a function that invokes the method at `object[key]` with `partials`
prepended to the arguments it receives. prepended to the arguments it receives.
<br> <br>
<br> <br>
This method differs from `_.bind` by allowing bound functions to reference This method differs from `_.bind` by allowing bound functions to reference
methods that may be redefined or don't yet exist. See methods that may be redefined or don't yet exist. See
[Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definit ion-pattern) [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definit ion-pattern)
for more details. for more details.
<br> <br>
skipping to change at line 3721 skipping to change at line 3721
bound('hi'); bound('hi');
// => 'hiya fred!' // => 'hiya fred!'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_curryfunc-arityfunclength"><code>_.curry(func, [arity=func.length])</co de></h3> <h3 id="_curryfunc-arityfunclength"><code>_.curry(func, [arity=func.length])</co de></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10224 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.curry "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10266 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.curry "See the npm p ackage") [&#x24C9;][1]
Creates a function that accepts arguments of `func` and either invokes Creates a function that accepts arguments of `func` and either invokes
`func` returning its result, if at least `arity` number of arguments have `func` returning its result, if at least `arity` number of arguments have
been provided, or returns a function that accepts the remaining `func` been provided, or returns a function that accepts the remaining `func`
arguments, and so on. The arity of `func` may be specified if `func.length` arguments, and so on. The arity of `func` may be specified if `func.length`
is not sufficient. is not sufficient.
<br> <br>
<br> <br>
The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
may be used as a placeholder for provided arguments. may be used as a placeholder for provided arguments.
skipping to change at line 3774 skipping to change at line 3774
curried(1)(_, 3)(2); curried(1)(_, 3)(2);
// => [1, 2, 3] // => [1, 2, 3]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_curryrightfunc-arityfunclength"><code>_.curryRight(func, [arity=func.le ngth])</code></h3> <h3 id="_curryrightfunc-arityfunclength"><code>_.curryRight(func, [arity=func.le ngth])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10269 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.curryright "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10311 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.curryright "See the npm package") [&#x24C9;][1]
This method is like `_.curry` except that arguments are applied to `func` This method is like `_.curry` except that arguments are applied to `func`
in the manner of `_.partialRight` instead of `_.partial`. in the manner of `_.partialRight` instead of `_.partial`.
<br> <br>
<br> <br>
The `_.curryRight.placeholder` value, which defaults to `_` in monolithic The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
builds, may be used as a placeholder for provided arguments. builds, may be used as a placeholder for provided arguments.
<br> <br>
<br> <br>
**Note:** This method doesn't set the "length" property of curried functions. **Note:** This method doesn't set the "length" property of curried functions.
skipping to change at line 3824 skipping to change at line 3824
curried(3)(1, _)(2); curried(3)(1, _)(2);
// => [1, 2, 3] // => [1, 2, 3]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_debouncefunc-wait0-options"><code>_.debounce(func, [wait=0], [options={ }])</code></h3> <h3 id="_debouncefunc-wait0-options"><code>_.debounce(func, [wait=0], [options={ }])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10330 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.debounce "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10372 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.debounce "See the np m package") [&#x24C9;][1]
Creates a debounced function that delays invoking `func` until after `wait` Creates a debounced function that delays invoking `func` until after `wait`
milliseconds have elapsed since the last time the debounced function was milliseconds have elapsed since the last time the debounced function was
invoked. The debounced function comes with a `cancel` method to cancel invoked. The debounced function comes with a `cancel` method to cancel
delayed `func` invocations and a `flush` method to immediately invoke them. delayed `func` invocations and a `flush` method to immediately invoke them.
Provide `options` to indicate whether `func` should be invoked on the Provide `options` to indicate whether `func` should be invoked on the
leading and/or trailing edge of the `wait` timeout. The `func` is invoked leading and/or trailing edge of the `wait` timeout. The `func` is invoked
with the last arguments provided to the debounced function. Subsequent with the last arguments provided to the debounced function. Subsequent
calls to the debounced function return the result of the last `func` calls to the debounced function return the result of the last `func`
invocation. invocation.
skipping to change at line 3889 skipping to change at line 3889
// Cancel the trailing debounced invocation. // Cancel the trailing debounced invocation.
jQuery(window).on('popstate', debounced.cancel); jQuery(window).on('popstate', debounced.cancel);
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_deferfunc-args"><code>_.defer(func, [args])</code></h3> <h3 id="_deferfunc-args"><code>_.defer(func, [args])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10473 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.defer "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10515 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.defer "See the npm p ackage") [&#x24C9;][1]
Defers invoking the `func` until the current call stack has cleared. Any Defers invoking the `func` until the current call stack has cleared. Any
additional arguments are provided to `func` when it's invoked. additional arguments are provided to `func` when it's invoked.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `func` *(Function)*: The function to defer. 1. `func` *(Function)*: The function to defer.
2. `[args]` *(...&#42;)*: The arguments to invoke `func` with. 2. `[args]` *(...&#42;)*: The arguments to invoke `func` with.
skipping to change at line 3918 skipping to change at line 3918
}, 'deferred'); }, 'deferred');
// => Logs 'deferred' after one millisecond. // => Logs 'deferred' after one millisecond.
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_delayfunc-wait-args"><code>_.delay(func, wait, [args])</code></h3> <h3 id="_delayfunc-wait-args"><code>_.delay(func, wait, [args])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10496 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.delay "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10538 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.delay "See the npm p ackage") [&#x24C9;][1]
Invokes `func` after `wait` milliseconds. Any additional arguments are Invokes `func` after `wait` milliseconds. Any additional arguments are
provided to `func` when it's invoked. provided to `func` when it's invoked.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `func` *(Function)*: The function to delay. 1. `func` *(Function)*: The function to delay.
2. `wait` *(number)*: The number of milliseconds to delay invocation. 2. `wait` *(number)*: The number of milliseconds to delay invocation.
skipping to change at line 3948 skipping to change at line 3948
}, 1000, 'later'); }, 1000, 'later');
// => Logs 'later' after one second. // => Logs 'later' after one second.
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_flipfunc"><code>_.flip(func)</code></h3> <h3 id="_flipfunc"><code>_.flip(func)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10518 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.flip "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10560 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.flip "See the npm pa ckage") [&#x24C9;][1]
Creates a function that invokes `func` with arguments reversed. Creates a function that invokes `func` with arguments reversed.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `func` *(Function)*: The function to flip arguments for. 1. `func` *(Function)*: The function to flip arguments for.
#### Returns #### Returns
skipping to change at line 3977 skipping to change at line 3977
flipped('a', 'b', 'c', 'd'); flipped('a', 'b', 'c', 'd');
// => ['d', 'c', 'b', 'a'] // => ['d', 'c', 'b', 'a']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_memoizefunc-resolver"><code>_.memoize(func, [resolver])</code></h3> <h3 id="_memoizefunc-resolver"><code>_.memoize(func, [resolver])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10566 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.memoize "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10608 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.memoize "See the npm package") [&#x24C9;][1]
Creates a function that memoizes the result of `func`. If `resolver` is Creates a function that memoizes the result of `func`. If `resolver` is
provided, it determines the cache key for storing the result based on the provided, it determines the cache key for storing the result based on the
arguments provided to the memoized function. By default, the first argument arguments provided to the memoized function. By default, the first argument
provided to the memoized function is used as the map cache key. The `func` provided to the memoized function is used as the map cache key. The `func`
is invoked with the `this` binding of the memoized function. is invoked with the `this` binding of the memoized function.
<br> <br>
<br> <br>
**Note:** The cache is exposed as the `cache` property on the memoized **Note:** The cache is exposed as the `cache` property on the memoized
function. Its creation may be customized by replacing the `_.memoize.Cache` function. Its creation may be customized by replacing the `_.memoize.Cache`
skipping to change at line 4033 skipping to change at line 4033
// Replace `_.memoize.Cache`. // Replace `_.memoize.Cache`.
_.memoize.Cache = WeakMap; _.memoize.Cache = WeakMap;
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_negatepredicate"><code>_.negate(predicate)</code></h3> <h3 id="_negatepredicate"><code>_.negate(predicate)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10609 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.negate "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10651 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.negate "See the npm package") [&#x24C9;][1]
Creates a function that negates the result of the predicate `func`. The Creates a function that negates the result of the predicate `func`. The
`func` predicate is invoked with the `this` binding and arguments of the `func` predicate is invoked with the `this` binding and arguments of the
created function. created function.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `predicate` *(Function)*: The predicate to negate. 1. `predicate` *(Function)*: The predicate to negate.
skipping to change at line 4064 skipping to change at line 4064
_.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
// => [1, 3, 5] // => [1, 3, 5]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_oncefunc"><code>_.once(func)</code></h3> <h3 id="_oncefunc"><code>_.once(func)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10643 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.once "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10685 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.once "See the npm pa ckage") [&#x24C9;][1]
Creates a function that is restricted to invoking `func` once. Repeat calls Creates a function that is restricted to invoking `func` once. Repeat calls
to the function return the value of the first invocation. The `func` is to the function return the value of the first invocation. The `func` is
invoked with the `this` binding and arguments of the created function. invoked with the `this` binding and arguments of the created function.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `func` *(Function)*: The function to restrict. 1. `func` *(Function)*: The function to restrict.
skipping to change at line 4093 skipping to change at line 4093
initialize(); initialize();
// => `createApplication` is invoked once // => `createApplication` is invoked once
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_overargsfunc-transforms_identity"><code>_.overArgs(func, [transforms=[_ .identity]])</code></h3> <h3 id="_overargsfunc-transforms_identity"><code>_.overArgs(func, [transforms=[_ .identity]])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10678 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.overargs "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10720 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.overargs "See the np m package") [&#x24C9;][1]
Creates a function that invokes `func` with its arguments transformed. Creates a function that invokes `func` with its arguments transformed.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `func` *(Function)*: The function to wrap. 1. `func` *(Function)*: The function to wrap.
2. `[transforms=[_.identity]]` *(...(Function|Function&#91;&#93;))*: The argumen t transforms. 2. `[transforms=[_.identity]]` *(...(Function|Function&#91;&#93;))*: The argumen t transforms.
skipping to change at line 4134 skipping to change at line 4134
func(10, 5); func(10, 5);
// => [100, 10] // => [100, 10]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_partialfunc-partials"><code>_.partial(func, [partials])</code></h3> <h3 id="_partialfunc-partials"><code>_.partial(func, [partials])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10728 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.partial "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10770 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.partial "See the npm package") [&#x24C9;][1]
Creates a function that invokes `func` with `partials` prepended to the Creates a function that invokes `func` with `partials` prepended to the
arguments it receives. This method is like `_.bind` except it does **not** arguments it receives. This method is like `_.bind` except it does **not**
alter the `this` binding. alter the `this` binding.
<br> <br>
<br> <br>
The `_.partial.placeholder` value, which defaults to `_` in monolithic The `_.partial.placeholder` value, which defaults to `_` in monolithic
builds, may be used as a placeholder for partially applied arguments. builds, may be used as a placeholder for partially applied arguments.
<br> <br>
<br> <br>
skipping to change at line 4180 skipping to change at line 4180
greetFred('hi'); greetFred('hi');
// => 'hi fred' // => 'hi fred'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_partialrightfunc-partials"><code>_.partialRight(func, [partials])</code ></h3> <h3 id="_partialrightfunc-partials"><code>_.partialRight(func, [partials])</code ></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10765 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.partialright "See th e npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10807 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.partialright "See th e npm package") [&#x24C9;][1]
This method is like `_.partial` except that partially applied arguments This method is like `_.partial` except that partially applied arguments
are appended to the arguments it receives. are appended to the arguments it receives.
<br> <br>
<br> <br>
The `_.partialRight.placeholder` value, which defaults to `_` in monolithic The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
builds, may be used as a placeholder for partially applied arguments. builds, may be used as a placeholder for partially applied arguments.
<br> <br>
<br> <br>
**Note:** This method doesn't set the "length" property of partially **Note:** This method doesn't set the "length" property of partially
skipping to change at line 4225 skipping to change at line 4225
sayHelloTo('fred'); sayHelloTo('fred');
// => 'hello fred' // => 'hello fred'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_reargfunc-indexes"><code>_.rearg(func, indexes)</code></h3> <h3 id="_reargfunc-indexes"><code>_.rearg(func, indexes)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10792 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.rearg "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10834 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.rearg "See the npm p ackage") [&#x24C9;][1]
Creates a function that invokes `func` with arguments arranged according Creates a function that invokes `func` with arguments arranged according
to the specified `indexes` where the argument value at the first index is to the specified `indexes` where the argument value at the first index is
provided as the first argument, the argument value at the second index is provided as the first argument, the argument value at the second index is
provided as the second argument, and so on. provided as the second argument, and so on.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
skipping to change at line 4258 skipping to change at line 4258
rearged('b', 'c', 'a') rearged('b', 'c', 'a')
// => ['a', 'b', 'c'] // => ['a', 'b', 'c']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_restfunc-startfunclength-1"><code>_.rest(func, [start=func.length-1])</ code></h3> <h3 id="_restfunc-startfunclength-1"><code>_.rest(func, [start=func.length-1])</ code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10821 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.rest "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10863 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.rest "See the npm pa ckage") [&#x24C9;][1]
Creates a function that invokes `func` with the `this` binding of the Creates a function that invokes `func` with the `this` binding of the
created function and arguments from `start` and beyond provided as created function and arguments from `start` and beyond provided as
an array. an array.
<br> <br>
<br> <br>
**Note:** This method is based on the **Note:** This method is based on the
[rest parameter](https://mdn.io/rest_parameters). [rest parameter](https://mdn.io/rest_parameters).
#### Since #### Since
skipping to change at line 4295 skipping to change at line 4295
say('hello', 'fred', 'barney', 'pebbles'); say('hello', 'fred', 'barney', 'pebbles');
// => 'hello fred, barney, & pebbles' // => 'hello fred, barney, & pebbles'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_spreadfunc-start0"><code>_.spread(func, [start=0])</code></h3> <h3 id="_spreadfunc-start0"><code>_.spread(func, [start=0])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10863 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.spread "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10905 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.spread "See the npm package") [&#x24C9;][1]
Creates a function that invokes `func` with the `this` binding of the Creates a function that invokes `func` with the `this` binding of the
create function and an array of arguments much like create function and an array of arguments much like
[`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function. prototype.apply). [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function. prototype.apply).
<br> <br>
<br> <br>
**Note:** This method is based on the **Note:** This method is based on the
[spread operator](https://mdn.io/spread_operator). [spread operator](https://mdn.io/spread_operator).
#### Since #### Since
skipping to change at line 4341 skipping to change at line 4341
})); }));
// => a Promise of 76 // => a Promise of 76
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_throttlefunc-wait0-options"><code>_.throttle(func, [wait=0], [options={ }])</code></h3> <h3 id="_throttlefunc-wait0-options"><code>_.throttle(func, [wait=0], [options={ }])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10923 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.throttle "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10965 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.throttle "See the np m package") [&#x24C9;][1]
Creates a throttled function that only invokes `func` at most once per Creates a throttled function that only invokes `func` at most once per
every `wait` milliseconds. The throttled function comes with a `cancel` every `wait` milliseconds. The throttled function comes with a `cancel`
method to cancel delayed `func` invocations and a `flush` method to method to cancel delayed `func` invocations and a `flush` method to
immediately invoke them. Provide `options` to indicate whether `func` immediately invoke them. Provide `options` to indicate whether `func`
should be invoked on the leading and/or trailing edge of the `wait` should be invoked on the leading and/or trailing edge of the `wait`
timeout. The `func` is invoked with the last arguments provided to the timeout. The `func` is invoked with the last arguments provided to the
throttled function. Subsequent calls to the throttled function return the throttled function. Subsequent calls to the throttled function return the
result of the last `func` invocation. result of the last `func` invocation.
<br> <br>
skipping to change at line 4397 skipping to change at line 4397
// Cancel the trailing throttled invocation. // Cancel the trailing throttled invocation.
jQuery(window).on('popstate', throttled.cancel); jQuery(window).on('popstate', throttled.cancel);
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_unaryfunc"><code>_.unary(func)</code></h3> <h3 id="_unaryfunc"><code>_.unary(func)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10956 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.unary "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L10998 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.unary "See the npm p ackage") [&#x24C9;][1]
Creates a function that accepts up to one argument, ignoring any Creates a function that accepts up to one argument, ignoring any
additional arguments. additional arguments.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `func` *(Function)*: The function to cap arguments for. 1. `func` *(Function)*: The function to cap arguments for.
skipping to change at line 4423 skipping to change at line 4423
_.map(['6', '8', '10'], _.unary(parseInt)); _.map(['6', '8', '10'], _.unary(parseInt));
// => [6, 8, 10] // => [6, 8, 10]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_wrapvalue-wrapperidentity"><code>_.wrap(value, [wrapper=identity])</cod e></h3> <h3 id="_wrapvalue-wrapperidentity"><code>_.wrap(value, [wrapper=identity])</cod e></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L10982 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.wrap "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11024 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.wrap "See the npm pa ckage") [&#x24C9;][1]
Creates a function that provides `value` to `wrapper` as its first Creates a function that provides `value` to `wrapper` as its first
argument. Any additional arguments provided to the function are appended argument. Any additional arguments provided to the function are appended
to those provided to the `wrapper`. The wrapper is invoked with the `this` to those provided to the `wrapper`. The wrapper is invoked with the `this`
binding of the created function. binding of the created function.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
skipping to change at line 4462 skipping to change at line 4462
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
## `“Lang” Methods` ## `“Lang” Methods`
<!-- div --> <!-- div -->
<h3 id="_castarrayvalue"><code>_.castArray(value)</code></h3> <h3 id="_castarrayvalue"><code>_.castArray(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11021 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.castarray "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11063 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.castarray "See the n pm package") [&#x24C9;][1]
Casts `value` as an array if it's not one. Casts `value` as an array if it's not one.
#### Since #### Since
4.4.0 4.4.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to inspect. 1. `value` *(&#42;)*: The value to inspect.
#### Returns #### Returns
skipping to change at line 4506 skipping to change at line 4506
console.log(_.castArray(array) === array); console.log(_.castArray(array) === array);
// => true // => true
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_clonevalue"><code>_.clone(value)</code></h3> <h3 id="_clonevalue"><code>_.clone(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11055 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.clone "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11097 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.clone "See the npm p ackage") [&#x24C9;][1]
Creates a shallow clone of `value`. Creates a shallow clone of `value`.
<br> <br>
<br> <br>
**Note:** This method is loosely based on the **Note:** This method is loosely based on the
[structured clone algorithm](https://mdn.io/Structured_clone_algorithm) [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
and supports cloning arrays, array buffers, booleans, date objects, maps, and supports cloning arrays, array buffers, booleans, date objects, maps,
numbers, `Object` objects, regexes, sets, strings, symbols, and typed numbers, `Object` objects, regexes, sets, strings, symbols, and typed
arrays. The own enumerable properties of `arguments` objects are cloned arrays. The own enumerable properties of `arguments` objects are cloned
as plain objects. An empty object is returned for uncloneable values such as plain objects. An empty object is returned for uncloneable values such
skipping to change at line 4543 skipping to change at line 4543
console.log(shallow[0] === objects[0]); console.log(shallow[0] === objects[0]);
// => true // => true
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_clonedeepvalue"><code>_.cloneDeep(value)</code></h3> <h3 id="_clonedeepvalue"><code>_.cloneDeep(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11113 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.clonedeep "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11155 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.clonedeep "See the n pm package") [&#x24C9;][1]
This method is like `_.clone` except that it recursively clones `value`. This method is like `_.clone` except that it recursively clones `value`.
#### Since #### Since
1.0.0 1.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to recursively clone. 1. `value` *(&#42;)*: The value to recursively clone.
#### Returns #### Returns
skipping to change at line 4571 skipping to change at line 4571
console.log(deep[0] === objects[0]); console.log(deep[0] === objects[0]);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_clonedeepwithvalue-customizer"><code>_.cloneDeepWith(value, [customizer ])</code></h3> <h3 id="_clonedeepwithvalue-customizer"><code>_.cloneDeepWith(value, [customizer ])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11145 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.clonedeepwith "See t he npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11187 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.clonedeepwith "See t he npm package") [&#x24C9;][1]
This method is like `_.cloneWith` except that it recursively clones `value`. This method is like `_.cloneWith` except that it recursively clones `value`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to recursively clone. 1. `value` *(&#42;)*: The value to recursively clone.
2. `[customizer]` *(Function)*: The function to customize cloning. 2. `[customizer]` *(Function)*: The function to customize cloning.
skipping to change at line 4609 skipping to change at line 4609
console.log(el.childNodes.length); console.log(el.childNodes.length);
// => 20 // => 20
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_clonewithvalue-customizer"><code>_.cloneWith(value, [customizer])</code ></h3> <h3 id="_clonewithvalue-customizer"><code>_.cloneWith(value, [customizer])</code ></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11090 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.clonewith "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11132 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.clonewith "See the n pm package") [&#x24C9;][1]
This method is like `_.clone` except that it accepts `customizer` which This method is like `_.clone` except that it accepts `customizer` which
is invoked to produce the cloned value. If `customizer` returns `undefined`, is invoked to produce the cloned value. If `customizer` returns `undefined`,
cloning is handled by the method instead. The `customizer` is invoked with cloning is handled by the method instead. The `customizer` is invoked with
up to four arguments; *(value [, index|key, object, stack])*. up to four arguments; *(value [, index|key, object, stack])*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
skipping to change at line 4650 skipping to change at line 4650
console.log(el.childNodes.length); console.log(el.childNodes.length);
// => 0 // => 0
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_conformstoobject-source"><code>_.conformsTo(object, source)</code></h3> <h3 id="_conformstoobject-source"><code>_.conformsTo(object, source)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11174 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.conformsto "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11216 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.conformsto "See the npm package") [&#x24C9;][1]
Checks if `object` conforms to `source` by invoking the predicate Checks if `object` conforms to `source` by invoking the predicate
properties of `source` with the corresponding property values of `object`. properties of `source` with the corresponding property values of `object`.
<br> <br>
<br> <br>
**Note:** This method is equivalent to `_.conforms` when `source` is **Note:** This method is equivalent to `_.conforms` when `source` is
partially applied. partially applied.
#### Since #### Since
4.14.0 4.14.0
skipping to change at line 4686 skipping to change at line 4686
_.conformsTo(object, { 'b': function(n) { return n > 2; } }); _.conformsTo(object, { 'b': function(n) { return n > 2; } });
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_eqvalue-other"><code>_.eq(value, other)</code></h3> <h3 id="_eqvalue-other"><code>_.eq(value, other)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11210 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.eq "See the npm pack age") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11252 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.eq "See the npm pack age") [&#x24C9;][1]
Performs a Performs a
[`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
comparison between two values to determine if they are equivalent. comparison between two values to determine if they are equivalent.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to compare. 1. `value` *(&#42;)*: The value to compare.
skipping to change at line 4729 skipping to change at line 4729
_.eq(NaN, NaN); _.eq(NaN, NaN);
// => true // => true
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_gtvalue-other"><code>_.gt(value, other)</code></h3> <h3 id="_gtvalue-other"><code>_.gt(value, other)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11237 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.gt "See the npm pack age") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11279 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.gt "See the npm pack age") [&#x24C9;][1]
Checks if `value` is greater than `other`. Checks if `value` is greater than `other`.
#### Since #### Since
3.9.0 3.9.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to compare. 1. `value` *(&#42;)*: The value to compare.
2. `other` *(&#42;)*: The other value to compare. 2. `other` *(&#42;)*: The other value to compare.
skipping to change at line 4761 skipping to change at line 4761
_.gt(1, 3); _.gt(1, 3);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_gtevalue-other"><code>_.gte(value, other)</code></h3> <h3 id="_gtevalue-other"><code>_.gte(value, other)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11262 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.gte "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11304 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.gte "See the npm pac kage") [&#x24C9;][1]
Checks if `value` is greater than or equal to `other`. Checks if `value` is greater than or equal to `other`.
#### Since #### Since
3.9.0 3.9.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to compare. 1. `value` *(&#42;)*: The value to compare.
2. `other` *(&#42;)*: The other value to compare. 2. `other` *(&#42;)*: The other value to compare.
skipping to change at line 4793 skipping to change at line 4793
_.gte(1, 3); _.gte(1, 3);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isargumentsvalue"><code>_.isArguments(value)</code></h3> <h3 id="_isargumentsvalue"><code>_.isArguments(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11284 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isarguments "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11326 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isarguments "See the npm package") [&#x24C9;][1]
Checks if `value` is likely an `arguments` object. Checks if `value` is likely an `arguments` object.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 4821 skipping to change at line 4821
_.isArguments([1, 2, 3]); _.isArguments([1, 2, 3]);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isarrayvalue"><code>_.isArray(value)</code></h3> <h3 id="_isarrayvalue"><code>_.isArray(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11312 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isarray "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11354 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isarray "See the npm package") [&#x24C9;][1]
Checks if `value` is classified as an `Array` object. Checks if `value` is classified as an `Array` object.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 4855 skipping to change at line 4855
_.isArray(_.noop); _.isArray(_.noop);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isarraybuffervalue"><code>_.isArrayBuffer(value)</code></h3> <h3 id="_isarraybuffervalue"><code>_.isArrayBuffer(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11331 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isarraybuffer "See t he npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11373 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isarraybuffer "See t he npm package") [&#x24C9;][1]
Checks if `value` is classified as an `ArrayBuffer` object. Checks if `value` is classified as an `ArrayBuffer` object.
#### Since #### Since
4.3.0 4.3.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 4883 skipping to change at line 4883
_.isArrayBuffer(new Array(2)); _.isArrayBuffer(new Array(2));
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isarraylikevalue"><code>_.isArrayLike(value)</code></h3> <h3 id="_isarraylikevalue"><code>_.isArrayLike(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11358 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isarraylike "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11400 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isarraylike "See the npm package") [&#x24C9;][1]
Checks if `value` is array-like. A value is considered array-like if it's Checks if `value` is array-like. A value is considered array-like if it's
not a function and has a `value.length` that's an integer greater than or not a function and has a `value.length` that's an integer greater than or
equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
skipping to change at line 4919 skipping to change at line 4919
_.isArrayLike(_.noop); _.isArrayLike(_.noop);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isarraylikeobjectvalue"><code>_.isArrayLikeObject(value)</code></h3> <h3 id="_isarraylikeobjectvalue"><code>_.isArrayLikeObject(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11387 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isarraylikeobject "S ee the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11429 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isarraylikeobject "S ee the npm package") [&#x24C9;][1]
This method is like `_.isArrayLike` except that it also checks if `value` This method is like `_.isArrayLike` except that it also checks if `value`
is an object. is an object.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
skipping to change at line 4954 skipping to change at line 4954
_.isArrayLikeObject(_.noop); _.isArrayLikeObject(_.noop);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isbooleanvalue"><code>_.isBoolean(value)</code></h3> <h3 id="_isbooleanvalue"><code>_.isBoolean(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11408 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isboolean "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11450 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isboolean "See the n pm package") [&#x24C9;][1]
Checks if `value` is classified as a boolean primitive or object. Checks if `value` is classified as a boolean primitive or object.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 4982 skipping to change at line 4982
_.isBoolean(null); _.isBoolean(null);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isbuffervalue"><code>_.isBuffer(value)</code></h3> <h3 id="_isbuffervalue"><code>_.isBuffer(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11430 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isbuffer "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11472 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isbuffer "See the np m package") [&#x24C9;][1]
Checks if `value` is a buffer. Checks if `value` is a buffer.
#### Since #### Since
4.3.0 4.3.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 5010 skipping to change at line 5010
_.isBuffer(new Uint8Array(2)); _.isBuffer(new Uint8Array(2));
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isdatevalue"><code>_.isDate(value)</code></h3> <h3 id="_isdatevalue"><code>_.isDate(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11449 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isdate "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11491 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isdate "See the npm package") [&#x24C9;][1]
Checks if `value` is classified as a `Date` object. Checks if `value` is classified as a `Date` object.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 5038 skipping to change at line 5038
_.isDate('Mon April 23 2012'); _.isDate('Mon April 23 2012');
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_iselementvalue"><code>_.isElement(value)</code></h3> <h3 id="_iselementvalue"><code>_.isElement(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11468 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.iselement "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11510 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.iselement "See the n pm package") [&#x24C9;][1]
Checks if `value` is likely a DOM element. Checks if `value` is likely a DOM element.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 5066 skipping to change at line 5066
_.isElement('<body>'); _.isElement('<body>');
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isemptyvalue"><code>_.isEmpty(value)</code></h3> <h3 id="_isemptyvalue"><code>_.isEmpty(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11505 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isempty "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11547 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isempty "See the npm package") [&#x24C9;][1]
Checks if `value` is an empty object, collection, map, or set. Checks if `value` is an empty object, collection, map, or set.
<br> <br>
<br> <br>
Objects are considered empty if they have no own enumerable string keyed Objects are considered empty if they have no own enumerable string keyed
properties. properties.
<br> <br>
<br> <br>
Array-like values such as `arguments` objects, arrays, buffers, strings, or Array-like values such as `arguments` objects, arrays, buffers, strings, or
jQuery-like collections are considered empty if they have a `length` of `0`. jQuery-like collections are considered empty if they have a `length` of `0`.
skipping to change at line 5112 skipping to change at line 5112
_.isEmpty({ 'a': 1 }); _.isEmpty({ 'a': 1 });
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isequalvalue-other"><code>_.isEqual(value, other)</code></h3> <h3 id="_isequalvalue-other"><code>_.isEqual(value, other)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11557 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isequal "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11599 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isequal "See the npm package") [&#x24C9;][1]
Performs a deep comparison between two values to determine if they are Performs a deep comparison between two values to determine if they are
equivalent. equivalent.
<br> <br>
<br> <br>
**Note:** This method supports comparing arrays, array buffers, booleans, **Note:** This method supports comparing arrays, array buffers, booleans,
date objects, error objects, maps, numbers, `Object` objects, regexes, date objects, error objects, maps, numbers, `Object` objects, regexes,
sets, strings, symbols, and typed arrays. `Object` objects are compared sets, strings, symbols, and typed arrays. `Object` objects are compared
by their own, not inherited, enumerable properties. Functions and DOM by their own, not inherited, enumerable properties. Functions and DOM
nodes are compared by strict equality, i.e. `===`. nodes are compared by strict equality, i.e. `===`.
skipping to change at line 5152 skipping to change at line 5152
object === other; object === other;
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isequalwithvalue-other-customizer"><code>_.isEqualWith(value, other, [c ustomizer])</code></h3> <h3 id="_isequalwithvalue-other-customizer"><code>_.isEqualWith(value, other, [c ustomizer])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11593 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isequalwith "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11635 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isequalwith "See the npm package") [&#x24C9;][1]
This method is like `_.isEqual` except that it accepts `customizer` which This method is like `_.isEqual` except that it accepts `customizer` which
is invoked to compare values. If `customizer` returns `undefined`, comparisons is invoked to compare values. If `customizer` returns `undefined`, comparisons
are handled by the method instead. The `customizer` is invoked with up to are handled by the method instead. The `customizer` is invoked with up to
six arguments: *(objValue, othValue [, index|key, object, other, stack])*. six arguments: *(objValue, othValue [, index|key, object, other, stack])*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
skipping to change at line 5195 skipping to change at line 5195
_.isEqualWith(array, other, customizer); _.isEqualWith(array, other, customizer);
// => true // => true
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_iserrorvalue"><code>_.isError(value)</code></h3> <h3 id="_iserrorvalue"><code>_.isError(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11617 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.iserror "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11659 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.iserror "See the npm package") [&#x24C9;][1]
Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
`SyntaxError`, `TypeError`, or `URIError` object. `SyntaxError`, `TypeError`, or `URIError` object.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
skipping to change at line 5224 skipping to change at line 5224
_.isError(Error); _.isError(Error);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isfinitevalue"><code>_.isFinite(value)</code></h3> <h3 id="_isfinitevalue"><code>_.isFinite(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11652 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isfinite "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11694 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isfinite "See the np m package") [&#x24C9;][1]
Checks if `value` is a finite primitive number. Checks if `value` is a finite primitive number.
<br> <br>
<br> <br>
**Note:** This method is based on **Note:** This method is based on
[`Number.isFinite`](https://mdn.io/Number/isFinite). [`Number.isFinite`](https://mdn.io/Number/isFinite).
#### Since #### Since
0.1.0 0.1.0
skipping to change at line 5262 skipping to change at line 5262
_.isFinite('3'); _.isFinite('3');
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isfunctionvalue"><code>_.isFunction(value)</code></h3> <h3 id="_isfunctionvalue"><code>_.isFunction(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11673 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isfunction "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11715 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isfunction "See the npm package") [&#x24C9;][1]
Checks if `value` is classified as a `Function` object. Checks if `value` is classified as a `Function` object.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 5290 skipping to change at line 5290
_.isFunction(/abc/); _.isFunction(/abc/);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isintegervalue"><code>_.isInteger(value)</code></h3> <h3 id="_isintegervalue"><code>_.isInteger(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11709 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isinteger "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11751 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isinteger "See the n pm package") [&#x24C9;][1]
Checks if `value` is an integer. Checks if `value` is an integer.
<br> <br>
<br> <br>
**Note:** This method is based on **Note:** This method is based on
[`Number.isInteger`](https://mdn.io/Number/isInteger). [`Number.isInteger`](https://mdn.io/Number/isInteger).
#### Since #### Since
4.0.0 4.0.0
skipping to change at line 5328 skipping to change at line 5328
_.isInteger('3'); _.isInteger('3');
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_islengthvalue"><code>_.isLength(value)</code></h3> <h3 id="_islengthvalue"><code>_.isLength(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11739 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.islength "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11781 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.islength "See the np m package") [&#x24C9;][1]
Checks if `value` is a valid array-like length. Checks if `value` is a valid array-like length.
<br> <br>
<br> <br>
**Note:** This method is loosely based on **Note:** This method is loosely based on
[`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
#### Since #### Since
4.0.0 4.0.0
skipping to change at line 5366 skipping to change at line 5366
_.isLength('3'); _.isLength('3');
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_ismapvalue"><code>_.isMap(value)</code></h3> <h3 id="_ismapvalue"><code>_.isMap(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11819 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.ismap "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11861 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.ismap "See the npm p ackage") [&#x24C9;][1]
Checks if `value` is classified as a `Map` object. Checks if `value` is classified as a `Map` object.
#### Since #### Since
4.3.0 4.3.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 5394 skipping to change at line 5394
_.isMap(new WeakMap); _.isMap(new WeakMap);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_ismatchobject-source"><code>_.isMatch(object, source)</code></h3> <h3 id="_ismatchobject-source"><code>_.isMatch(object, source)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11849 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.ismatch "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11891 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.ismatch "See the npm package") [&#x24C9;][1]
Performs a partial deep comparison between `object` and `source` to Performs a partial deep comparison between `object` and `source` to
determine if `object` contains equivalent property values. determine if `object` contains equivalent property values.
<br> <br>
<br> <br>
**Note:** This method is equivalent to `_.matches` when `source` is **Note:** This method is equivalent to `_.matches` when `source` is
partially applied. partially applied.
<br> <br>
<br> <br>
Partial comparisons will match empty array and empty object `source` Partial comparisons will match empty array and empty object `source`
skipping to change at line 5435 skipping to change at line 5435
_.isMatch(object, { 'b': 1 }); _.isMatch(object, { 'b': 1 });
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_ismatchwithobject-source-customizer"><code>_.isMatchWith(object, source , [customizer])</code></h3> <h3 id="_ismatchwithobject-source-customizer"><code>_.isMatchWith(object, source , [customizer])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11885 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11927 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package") [&#x24C9;][1]
This method is like `_.isMatch` except that it accepts `customizer` which This method is like `_.isMatch` except that it accepts `customizer` which
is invoked to compare values. If `customizer` returns `undefined`, comparisons is invoked to compare values. If `customizer` returns `undefined`, comparisons
are handled by the method instead. The `customizer` is invoked with five are handled by the method instead. The `customizer` is invoked with five
arguments: *(objValue, srcValue, index|key, object, source)*. arguments: *(objValue, srcValue, index|key, object, source)*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
skipping to change at line 5478 skipping to change at line 5478
_.isMatchWith(object, source, customizer); _.isMatchWith(object, source, customizer);
// => true // => true
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isnanvalue"><code>_.isNaN(value)</code></h3> <h3 id="_isnanvalue"><code>_.isNaN(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11918 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isnan "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11960 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isnan "See the npm p ackage") [&#x24C9;][1]
Checks if `value` is `NaN`. Checks if `value` is `NaN`.
<br> <br>
<br> <br>
**Note:** This method is based on **Note:** This method is based on
[`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
global [`isNaN`](https://mdn.io/isNaN) which returns `true` for global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
`undefined` and other non-number values. `undefined` and other non-number values.
#### Since #### Since
skipping to change at line 5518 skipping to change at line 5518
_.isNaN(undefined); _.isNaN(undefined);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isnativevalue"><code>_.isNative(value)</code></h3> <h3 id="_isnativevalue"><code>_.isNative(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11951 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isnative "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11993 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isnative "See the np m package") [&#x24C9;][1]
Checks if `value` is a pristine native function. Checks if `value` is a pristine native function.
<br> <br>
<br> <br>
**Note:** This method can't reliably detect native functions in the presence **Note:** This method can't reliably detect native functions in the presence
of the core-js package because core-js circumvents this kind of detection. of the core-js package because core-js circumvents this kind of detection.
Despite multiple requests, the core-js maintainer has made it clear: any Despite multiple requests, the core-js maintainer has made it clear: any
attempt to fix the detection will be obstructed. As a result, we're left attempt to fix the detection will be obstructed. As a result, we're left
with little choice but to throw an error. Unfortunately, this also affects with little choice but to throw an error. Unfortunately, this also affects
packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
skipping to change at line 5555 skipping to change at line 5555
_.isNative(_); _.isNative(_);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isnilvalue"><code>_.isNil(value)</code></h3> <h3 id="_isnilvalue"><code>_.isNil(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11999 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isnil "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12041 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isnil "See the npm p ackage") [&#x24C9;][1]
Checks if `value` is `null` or `undefined`. Checks if `value` is `null` or `undefined`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 5586 skipping to change at line 5586
_.isNil(NaN); _.isNil(NaN);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isnullvalue"><code>_.isNull(value)</code></h3> <h3 id="_isnullvalue"><code>_.isNull(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11975 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isnull "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12017 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isnull "See the npm package") [&#x24C9;][1]
Checks if `value` is `null`. Checks if `value` is `null`.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 5614 skipping to change at line 5614
_.isNull(void 0); _.isNull(void 0);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isnumbervalue"><code>_.isNumber(value)</code></h3> <h3 id="_isnumbervalue"><code>_.isNumber(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12029 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isnumber "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12071 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isnumber "See the np m package") [&#x24C9;][1]
Checks if `value` is classified as a `Number` primitive or object. Checks if `value` is classified as a `Number` primitive or object.
<br> <br>
<br> <br>
**Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
classified as numbers, use the `_.isFinite` method. classified as numbers, use the `_.isFinite` method.
#### Since #### Since
0.1.0 0.1.0
skipping to change at line 5652 skipping to change at line 5652
_.isNumber('3'); _.isNumber('3');
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isobjectvalue"><code>_.isObject(value)</code></h3> <h3 id="_isobjectvalue"><code>_.isObject(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11769 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isobject "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11811 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isobject "See the np m package") [&#x24C9;][1]
Checks if `value` is the Checks if `value` is the
[language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-l anguage-types) [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-l anguage-types)
of `Object`. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `n ew String('')`)* of `Object`. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `n ew String('')`)*
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
skipping to change at line 5688 skipping to change at line 5688
_.isObject(null); _.isObject(null);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isobjectlikevalue"><code>_.isObjectLike(value)</code></h3> <h3 id="_isobjectlikevalue"><code>_.isObjectLike(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L11798 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isobjectlike "See th e npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L11840 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isobjectlike "See th e npm package") [&#x24C9;][1]
Checks if `value` is object-like. A value is object-like if it's not `null` Checks if `value` is object-like. A value is object-like if it's not `null`
and has a `typeof` result of "object". and has a `typeof` result of "object".
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
skipping to change at line 5723 skipping to change at line 5723
_.isObjectLike(null); _.isObjectLike(null);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isplainobjectvalue"><code>_.isPlainObject(value)</code></h3> <h3 id="_isplainobjectvalue"><code>_.isPlainObject(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12062 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isplainobject "See t he npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12104 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isplainobject "See t he npm package") [&#x24C9;][1]
Checks if `value` is a plain object, that is, an object created by the Checks if `value` is a plain object, that is, an object created by the
`Object` constructor or one with a `[[Prototype]]` of `null`. `Object` constructor or one with a `[[Prototype]]` of `null`.
#### Since #### Since
0.8.0 0.8.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
skipping to change at line 5762 skipping to change at line 5762
_.isPlainObject(Object.create(null)); _.isPlainObject(Object.create(null));
// => true // => true
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isregexpvalue"><code>_.isRegExp(value)</code></h3> <h3 id="_isregexpvalue"><code>_.isRegExp(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12092 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isregexp "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12134 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isregexp "See the np m package") [&#x24C9;][1]
Checks if `value` is classified as a `RegExp` object. Checks if `value` is classified as a `RegExp` object.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 5790 skipping to change at line 5790
_.isRegExp('/abc/'); _.isRegExp('/abc/');
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_issafeintegervalue"><code>_.isSafeInteger(value)</code></h3> <h3 id="_issafeintegervalue"><code>_.isSafeInteger(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12121 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.issafeinteger "See t he npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12163 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.issafeinteger "See t he npm package") [&#x24C9;][1]
Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
double precision number which isn't the result of a rounded unsafe integer. double precision number which isn't the result of a rounded unsafe integer.
<br> <br>
<br> <br>
**Note:** This method is based on **Note:** This method is based on
[`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
#### Since #### Since
4.0.0 4.0.0
skipping to change at line 5829 skipping to change at line 5829
_.isSafeInteger('3'); _.isSafeInteger('3');
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_issetvalue"><code>_.isSet(value)</code></h3> <h3 id="_issetvalue"><code>_.isSet(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12142 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isset "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12184 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isset "See the npm p ackage") [&#x24C9;][1]
Checks if `value` is classified as a `Set` object. Checks if `value` is classified as a `Set` object.
#### Since #### Since
4.3.0 4.3.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 5857 skipping to change at line 5857
_.isSet(new WeakSet); _.isSet(new WeakSet);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isstringvalue"><code>_.isString(value)</code></h3> <h3 id="_isstringvalue"><code>_.isString(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12161 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isstring "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12203 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isstring "See the np m package") [&#x24C9;][1]
Checks if `value` is classified as a `String` primitive or object. Checks if `value` is classified as a `String` primitive or object.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 5885 skipping to change at line 5885
_.isString(1); _.isString(1);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_issymbolvalue"><code>_.isSymbol(value)</code></h3> <h3 id="_issymbolvalue"><code>_.isSymbol(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12183 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.issymbol "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12225 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.issymbol "See the np m package") [&#x24C9;][1]
Checks if `value` is classified as a `Symbol` primitive or object. Checks if `value` is classified as a `Symbol` primitive or object.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 5913 skipping to change at line 5913
_.isSymbol('abc'); _.isSymbol('abc');
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_istypedarrayvalue"><code>_.isTypedArray(value)</code></h3> <h3 id="_istypedarrayvalue"><code>_.isTypedArray(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12205 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.istypedarray "See th e npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12247 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.istypedarray "See th e npm package") [&#x24C9;][1]
Checks if `value` is classified as a typed array. Checks if `value` is classified as a typed array.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 5941 skipping to change at line 5941
_.isTypedArray([]); _.isTypedArray([]);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isundefinedvalue"><code>_.isUndefined(value)</code></h3> <h3 id="_isundefinedvalue"><code>_.isUndefined(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12224 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isundefined "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12266 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isundefined "See the npm package") [&#x24C9;][1]
Checks if `value` is `undefined`. Checks if `value` is `undefined`.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 5969 skipping to change at line 5969
_.isUndefined(null); _.isUndefined(null);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isweakmapvalue"><code>_.isWeakMap(value)</code></h3> <h3 id="_isweakmapvalue"><code>_.isWeakMap(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12245 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isweakmap "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12287 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isweakmap "See the n pm package") [&#x24C9;][1]
Checks if `value` is classified as a `WeakMap` object. Checks if `value` is classified as a `WeakMap` object.
#### Since #### Since
4.3.0 4.3.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 5997 skipping to change at line 5997
_.isWeakMap(new Map); _.isWeakMap(new Map);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_isweaksetvalue"><code>_.isWeakSet(value)</code></h3> <h3 id="_isweaksetvalue"><code>_.isWeakSet(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12266 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isweakset "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12308 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.isweakset "See the n pm package") [&#x24C9;][1]
Checks if `value` is classified as a `WeakSet` object. Checks if `value` is classified as a `WeakSet` object.
#### Since #### Since
4.3.0 4.3.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
#### Returns #### Returns
skipping to change at line 6025 skipping to change at line 6025
_.isWeakSet(new Set); _.isWeakSet(new Set);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_ltvalue-other"><code>_.lt(value, other)</code></h3> <h3 id="_ltvalue-other"><code>_.lt(value, other)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12293 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.lt "See the npm pack age") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12335 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.lt "See the npm pack age") [&#x24C9;][1]
Checks if `value` is less than `other`. Checks if `value` is less than `other`.
#### Since #### Since
3.9.0 3.9.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to compare. 1. `value` *(&#42;)*: The value to compare.
2. `other` *(&#42;)*: The other value to compare. 2. `other` *(&#42;)*: The other value to compare.
skipping to change at line 6057 skipping to change at line 6057
_.lt(3, 1); _.lt(3, 1);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_ltevalue-other"><code>_.lte(value, other)</code></h3> <h3 id="_ltevalue-other"><code>_.lte(value, other)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12318 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.lte "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12360 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.lte "See the npm pac kage") [&#x24C9;][1]
Checks if `value` is less than or equal to `other`. Checks if `value` is less than or equal to `other`.
#### Since #### Since
3.9.0 3.9.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to compare. 1. `value` *(&#42;)*: The value to compare.
2. `other` *(&#42;)*: The other value to compare. 2. `other` *(&#42;)*: The other value to compare.
skipping to change at line 6089 skipping to change at line 6089
_.lte(3, 1); _.lte(3, 1);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_toarrayvalue"><code>_.toArray(value)</code></h3> <h3 id="_toarrayvalue"><code>_.toArray(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12345 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.toarray "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12387 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.toarray "See the npm package") [&#x24C9;][1]
Converts `value` to an array. Converts `value` to an array.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to convert. 1. `value` *(&#42;)*: The value to convert.
#### Returns #### Returns
skipping to change at line 6123 skipping to change at line 6123
_.toArray(null); _.toArray(null);
// => [] // => []
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_tofinitevalue"><code>_.toFinite(value)</code></h3> <h3 id="_tofinitevalue"><code>_.toFinite(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12384 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.tofinite "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12426 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.tofinite "See the np m package") [&#x24C9;][1]
Converts `value` to a finite number. Converts `value` to a finite number.
#### Since #### Since
4.12.0 4.12.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to convert. 1. `value` *(&#42;)*: The value to convert.
#### Returns #### Returns
skipping to change at line 6157 skipping to change at line 6157
_.toFinite('3.2'); _.toFinite('3.2');
// => 3.2 // => 3.2
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_tointegervalue"><code>_.toInteger(value)</code></h3> <h3 id="_tointegervalue"><code>_.toInteger(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12422 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.tointeger "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12464 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.tointeger "See the n pm package") [&#x24C9;][1]
Converts `value` to an integer. Converts `value` to an integer.
<br> <br>
<br> <br>
**Note:** This method is loosely based on **Note:** This method is loosely based on
[`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
#### Since #### Since
4.0.0 4.0.0
skipping to change at line 6195 skipping to change at line 6195
_.toInteger('3.2'); _.toInteger('3.2');
// => 3 // => 3
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_tolengthvalue"><code>_.toLength(value)</code></h3> <h3 id="_tolengthvalue"><code>_.toLength(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12456 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.tolength "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12498 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.tolength "See the np m package") [&#x24C9;][1]
Converts `value` to an integer suitable for use as the length of an Converts `value` to an integer suitable for use as the length of an
array-like object. array-like object.
<br> <br>
<br> <br>
**Note:** This method is based on **Note:** This method is based on
[`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
#### Since #### Since
4.0.0 4.0.0
skipping to change at line 6234 skipping to change at line 6234
_.toLength('3.2'); _.toLength('3.2');
// => 3 // => 3
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_tonumbervalue"><code>_.toNumber(value)</code></h3> <h3 id="_tonumbervalue"><code>_.toNumber(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12483 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.tonumber "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12525 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.tonumber "See the np m package") [&#x24C9;][1]
Converts `value` to a number. Converts `value` to a number.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to process. 1. `value` *(&#42;)*: The value to process.
#### Returns #### Returns
skipping to change at line 6268 skipping to change at line 6268
_.toNumber('3.2'); _.toNumber('3.2');
// => 3.2 // => 3.2
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_toplainobjectvalue"><code>_.toPlainObject(value)</code></h3> <h3 id="_toplainobjectvalue"><code>_.toPlainObject(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12528 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.toplainobject "See t he npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12570 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.toplainobject "See t he npm package") [&#x24C9;][1]
Converts `value` to a plain object flattening inherited enumerable string Converts `value` to a plain object flattening inherited enumerable string
keyed properties of `value` to own properties of the plain object. keyed properties of `value` to own properties of the plain object.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to convert. 1. `value` *(&#42;)*: The value to convert.
skipping to change at line 6303 skipping to change at line 6303
_.assign({ 'a': 1 }, _.toPlainObject(new Foo)); _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
// => { 'a': 1, 'b': 2, 'c': 3 } // => { 'a': 1, 'b': 2, 'c': 3 }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_tosafeintegervalue"><code>_.toSafeInteger(value)</code></h3> <h3 id="_tosafeintegervalue"><code>_.toSafeInteger(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12556 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.tosafeinteger "See t he npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12598 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.tosafeinteger "See t he npm package") [&#x24C9;][1]
Converts `value` to a safe integer. A safe integer can be compared and Converts `value` to a safe integer. A safe integer can be compared and
represented correctly. represented correctly.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to convert. 1. `value` *(&#42;)*: The value to convert.
skipping to change at line 6338 skipping to change at line 6338
_.toSafeInteger('3.2'); _.toSafeInteger('3.2');
// => 3 // => 3
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_tostringvalue"><code>_.toString(value)</code></h3> <h3 id="_tostringvalue"><code>_.toString(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12583 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.tostring "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12625 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.tostring "See the np m package") [&#x24C9;][1]
Converts `value` to a string. An empty string is returned for `null` Converts `value` to a string. An empty string is returned for `null`
and `undefined` values. The sign of `-0` is preserved. and `undefined` values. The sign of `-0` is preserved.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to convert. 1. `value` *(&#42;)*: The value to convert.
skipping to change at line 6376 skipping to change at line 6376
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
## `“Math” Methods` ## `“Math” Methods`
<!-- div --> <!-- div -->
<h3 id="_addaugend-addend"><code>_.add(augend, addend)</code></h3> <h3 id="_addaugend-addend"><code>_.add(augend, addend)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16241 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.add "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16289 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.add "See the npm pac kage") [&#x24C9;][1]
Adds two numbers. Adds two numbers.
#### Since #### Since
3.4.0 3.4.0
#### Arguments #### Arguments
1. `augend` *(number)*: The first number in an addition. 1. `augend` *(number)*: The first number in an addition.
2. `addend` *(number)*: The second number in an addition. 2. `addend` *(number)*: The second number in an addition.
skipping to change at line 6402 skipping to change at line 6402
_.add(6, 4); _.add(6, 4);
// => 10 // => 10
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_ceilnumber-precision0"><code>_.ceil(number, [precision=0])</code></h3> <h3 id="_ceilnumber-precision0"><code>_.ceil(number, [precision=0])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16266 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.ceil "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16314 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.ceil "See the npm pa ckage") [&#x24C9;][1]
Computes `number` rounded up to `precision`. Computes `number` rounded up to `precision`.
#### Since #### Since
3.10.0 3.10.0
#### Arguments #### Arguments
1. `number` *(number)*: The number to round up. 1. `number` *(number)*: The number to round up.
2. `[precision=0]` *(number)*: The precision to round up to. 2. `[precision=0]` *(number)*: The precision to round up to.
skipping to change at line 6434 skipping to change at line 6434
_.ceil(6040, -2); _.ceil(6040, -2);
// => 6100 // => 6100
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_dividedividend-divisor"><code>_.divide(dividend, divisor)</code></h3> <h3 id="_dividedividend-divisor"><code>_.divide(dividend, divisor)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16283 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.divide "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16331 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.divide "See the npm package") [&#x24C9;][1]
Divide two numbers. Divide two numbers.
#### Since #### Since
4.7.0 4.7.0
#### Arguments #### Arguments
1. `dividend` *(number)*: The first number in a division. 1. `dividend` *(number)*: The first number in a division.
2. `divisor` *(number)*: The second number in a division. 2. `divisor` *(number)*: The second number in a division.
skipping to change at line 6460 skipping to change at line 6460
_.divide(6, 4); _.divide(6, 4);
// => 1.5 // => 1.5
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_floornumber-precision0"><code>_.floor(number, [precision=0])</code></h3 > <h3 id="_floornumber-precision0"><code>_.floor(number, [precision=0])</code></h3 >
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16308 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.floor "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16356 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.floor "See the npm p ackage") [&#x24C9;][1]
Computes `number` rounded down to `precision`. Computes `number` rounded down to `precision`.
#### Since #### Since
3.10.0 3.10.0
#### Arguments #### Arguments
1. `number` *(number)*: The number to round down. 1. `number` *(number)*: The number to round down.
2. `[precision=0]` *(number)*: The precision to round down to. 2. `[precision=0]` *(number)*: The precision to round down to.
skipping to change at line 6492 skipping to change at line 6492
_.floor(4060, -2); _.floor(4060, -2);
// => 4000 // => 4000
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_maxarray"><code>_.max(array)</code></h3> <h3 id="_maxarray"><code>_.max(array)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16328 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.max "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16376 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.max "See the npm pac kage") [&#x24C9;][1]
Computes the maximum value of `array`. If `array` is empty or falsey, Computes the maximum value of `array`. If `array` is empty or falsey,
`undefined` is returned. `undefined` is returned.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to iterate over. 1. `array` *(Array)*: The array to iterate over.
skipping to change at line 6521 skipping to change at line 6521
_.max([]); _.max([]);
// => undefined // => undefined
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_maxbyarray-iteratee_identity"><code>_.maxBy(array, [iteratee=_.identity ])</code></h3> <h3 id="_maxbyarray-iteratee_identity"><code>_.maxBy(array, [iteratee=_.identity ])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16357 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.maxby "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16405 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.maxby "See the npm p ackage") [&#x24C9;][1]
This method is like `_.max` except that it accepts `iteratee` which is This method is like `_.max` except that it accepts `iteratee` which is
invoked for each element in `array` to generate the criterion by which invoked for each element in `array` to generate the criterion by which
the value is ranked. The iteratee is invoked with one argument: *(value)*. the value is ranked. The iteratee is invoked with one argument: *(value)*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to iterate over. 1. `array` *(Array)*: The array to iterate over.
skipping to change at line 6555 skipping to change at line 6555
_.maxBy(objects, 'n'); _.maxBy(objects, 'n');
// => { 'n': 2 } // => { 'n': 2 }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_meanarray"><code>_.mean(array)</code></h3> <h3 id="_meanarray"><code>_.mean(array)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16377 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.mean "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16425 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.mean "See the npm pa ckage") [&#x24C9;][1]
Computes the mean of the values in `array`. Computes the mean of the values in `array`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to iterate over. 1. `array` *(Array)*: The array to iterate over.
#### Returns #### Returns
skipping to change at line 6580 skipping to change at line 6580
_.mean([4, 2, 8, 6]); _.mean([4, 2, 8, 6]);
// => 5 // => 5
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_meanbyarray-iteratee_identity"><code>_.meanBy(array, [iteratee=_.identi ty])</code></h3> <h3 id="_meanbyarray-iteratee_identity"><code>_.meanBy(array, [iteratee=_.identi ty])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16404 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.meanby "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16452 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.meanby "See the npm package") [&#x24C9;][1]
This method is like `_.mean` except that it accepts `iteratee` which is This method is like `_.mean` except that it accepts `iteratee` which is
invoked for each element in `array` to generate the value to be averaged. invoked for each element in `array` to generate the value to be averaged.
The iteratee is invoked with one argument: *(value)*. The iteratee is invoked with one argument: *(value)*.
#### Since #### Since
4.7.0 4.7.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to iterate over. 1. `array` *(Array)*: The array to iterate over.
skipping to change at line 6614 skipping to change at line 6614
_.meanBy(objects, 'n'); _.meanBy(objects, 'n');
// => 5 // => 5
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_minarray"><code>_.min(array)</code></h3> <h3 id="_minarray"><code>_.min(array)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16426 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.min "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16474 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.min "See the npm pac kage") [&#x24C9;][1]
Computes the minimum value of `array`. If `array` is empty or falsey, Computes the minimum value of `array`. If `array` is empty or falsey,
`undefined` is returned. `undefined` is returned.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to iterate over. 1. `array` *(Array)*: The array to iterate over.
skipping to change at line 6643 skipping to change at line 6643
_.min([]); _.min([]);
// => undefined // => undefined
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_minbyarray-iteratee_identity"><code>_.minBy(array, [iteratee=_.identity ])</code></h3> <h3 id="_minbyarray-iteratee_identity"><code>_.minBy(array, [iteratee=_.identity ])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16455 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.minby "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16503 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.minby "See the npm p ackage") [&#x24C9;][1]
This method is like `_.min` except that it accepts `iteratee` which is This method is like `_.min` except that it accepts `iteratee` which is
invoked for each element in `array` to generate the criterion by which invoked for each element in `array` to generate the criterion by which
the value is ranked. The iteratee is invoked with one argument: *(value)*. the value is ranked. The iteratee is invoked with one argument: *(value)*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to iterate over. 1. `array` *(Array)*: The array to iterate over.
skipping to change at line 6677 skipping to change at line 6677
_.minBy(objects, 'n'); _.minBy(objects, 'n');
// => { 'n': 1 } // => { 'n': 1 }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_multiplymultiplier-multiplicand"><code>_.multiply(multiplier, multiplic and)</code></h3> <h3 id="_multiplymultiplier-multiplicand"><code>_.multiply(multiplier, multiplic and)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16476 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.multiply "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16524 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.multiply "See the np m package") [&#x24C9;][1]
Multiply two numbers. Multiply two numbers.
#### Since #### Since
4.7.0 4.7.0
#### Arguments #### Arguments
1. `multiplier` *(number)*: The first number in a multiplication. 1. `multiplier` *(number)*: The first number in a multiplication.
2. `multiplicand` *(number)*: The second number in a multiplication. 2. `multiplicand` *(number)*: The second number in a multiplication.
skipping to change at line 6703 skipping to change at line 6703
_.multiply(6, 4); _.multiply(6, 4);
// => 24 // => 24
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_roundnumber-precision0"><code>_.round(number, [precision=0])</code></h3 > <h3 id="_roundnumber-precision0"><code>_.round(number, [precision=0])</code></h3 >
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16501 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.round "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16549 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.round "See the npm p ackage") [&#x24C9;][1]
Computes `number` rounded to `precision`. Computes `number` rounded to `precision`.
#### Since #### Since
3.10.0 3.10.0
#### Arguments #### Arguments
1. `number` *(number)*: The number to round. 1. `number` *(number)*: The number to round.
2. `[precision=0]` *(number)*: The precision to round to. 2. `[precision=0]` *(number)*: The precision to round to.
skipping to change at line 6735 skipping to change at line 6735
_.round(4060, -2); _.round(4060, -2);
// => 4100 // => 4100
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_subtractminuend-subtrahend"><code>_.subtract(minuend, subtrahend)</code ></h3> <h3 id="_subtractminuend-subtrahend"><code>_.subtract(minuend, subtrahend)</code ></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16518 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.subtract "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16566 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.subtract "See the np m package") [&#x24C9;][1]
Subtract two numbers. Subtract two numbers.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `minuend` *(number)*: The first number in a subtraction. 1. `minuend` *(number)*: The first number in a subtraction.
2. `subtrahend` *(number)*: The second number in a subtraction. 2. `subtrahend` *(number)*: The second number in a subtraction.
skipping to change at line 6761 skipping to change at line 6761
_.subtract(6, 4); _.subtract(6, 4);
// => 2 // => 2
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_sumarray"><code>_.sum(array)</code></h3> <h3 id="_sumarray"><code>_.sum(array)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16536 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.sum "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16584 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.sum "See the npm pac kage") [&#x24C9;][1]
Computes the sum of the values in `array`. Computes the sum of the values in `array`.
#### Since #### Since
3.4.0 3.4.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to iterate over. 1. `array` *(Array)*: The array to iterate over.
#### Returns #### Returns
skipping to change at line 6786 skipping to change at line 6786
_.sum([4, 2, 8, 6]); _.sum([4, 2, 8, 6]);
// => 20 // => 20
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_sumbyarray-iteratee_identity"><code>_.sumBy(array, [iteratee=_.identity ])</code></h3> <h3 id="_sumbyarray-iteratee_identity"><code>_.sumBy(array, [iteratee=_.identity ])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16565 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.sumby "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16613 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.sumby "See the npm p ackage") [&#x24C9;][1]
This method is like `_.sum` except that it accepts `iteratee` which is This method is like `_.sum` except that it accepts `iteratee` which is
invoked for each element in `array` to generate the value to be summed. invoked for each element in `array` to generate the value to be summed.
The iteratee is invoked with one argument: *(value)*. The iteratee is invoked with one argument: *(value)*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `array` *(Array)*: The array to iterate over. 1. `array` *(Array)*: The array to iterate over.
skipping to change at line 6826 skipping to change at line 6826
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
## `“Number” Methods` ## `“Number” Methods`
<!-- div --> <!-- div -->
<h3 id="_clampnumber-lower-upper"><code>_.clamp(number, [lower], upper)</code></ h3> <h3 id="_clampnumber-lower-upper"><code>_.clamp(number, [lower], upper)</code></ h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14007 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.clamp "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14049 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.clamp "See the npm p ackage") [&#x24C9;][1]
Clamps `number` within the inclusive `lower` and `upper` bounds. Clamps `number` within the inclusive `lower` and `upper` bounds.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `number` *(number)*: The number to clamp. 1. `number` *(number)*: The number to clamp.
2. `[lower]` *(number)*: The lower bound. 2. `[lower]` *(number)*: The lower bound.
3. `upper` *(number)*: The upper bound. 3. `upper` *(number)*: The upper bound.
skipping to change at line 6856 skipping to change at line 6856
_.clamp(10, -5, 5); _.clamp(10, -5, 5);
// => 5 // => 5
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_inrangenumber-start0-end"><code>_.inRange(number, [start=0], end)</code ></h3> <h3 id="_inrangenumber-start0-end"><code>_.inRange(number, [start=0], end)</code ></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14061 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.inrange "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14103 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.inrange "See the npm package") [&#x24C9;][1]
Checks if `n` is between `start` and up to, but not including, `end`. If Checks if `n` is between `start` and up to, but not including, `end`. If
`end` is not specified, it's set to `start` with `start` then set to `0`. `end` is not specified, it's set to `start` with `start` then set to `0`.
If `start` is greater than `end` the params are swapped to support If `start` is greater than `end` the params are swapped to support
negative ranges. negative ranges.
#### Since #### Since
3.3.0 3.3.0
#### Arguments #### Arguments
skipping to change at line 6904 skipping to change at line 6904
_.inRange(-3, -2, -6); _.inRange(-3, -2, -6);
// => true // => true
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_randomlower0-upper1-floating"><code>_.random([lower=0], [upper=1], [flo ating])</code></h3> <h3 id="_randomlower0-upper1-floating"><code>_.random([lower=0], [upper=1], [flo ating])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14104 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.random "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14146 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.random "See the npm package") [&#x24C9;][1]
Produces a random number between the inclusive `lower` and `upper` bounds. Produces a random number between the inclusive `lower` and `upper` bounds.
If only one argument is provided a number between `0` and the given number If only one argument is provided a number between `0` and the given number
is returned. If `floating` is `true`, or either `lower` or `upper` are is returned. If `floating` is `true`, or either `lower` or `upper` are
floats, a floating-point number is returned instead of an integer. floats, a floating-point number is returned instead of an integer.
<br> <br>
<br> <br>
**Note:** JavaScript follows the IEEE-754 standard for resolving **Note:** JavaScript follows the IEEE-754 standard for resolving
floating-point values which can produce unexpected results. floating-point values which can produce unexpected results.
skipping to change at line 6953 skipping to change at line 6953
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
## `“Object” Methods` ## `“Object” Methods`
<!-- div --> <!-- div -->
<h3 id="_assignobject-sources"><code>_.assign(object, [sources])</code></h3> <h3 id="_assignobject-sources"><code>_.assign(object, [sources])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12621 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.assign "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12663 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.assign "See the npm package") [&#x24C9;][1]
Assigns own enumerable string keyed properties of source objects to the Assigns own enumerable string keyed properties of source objects to the
destination object. Source objects are applied from left to right. destination object. Source objects are applied from left to right.
Subsequent sources overwrite property assignments of previous sources. Subsequent sources overwrite property assignments of previous sources.
<br> <br>
<br> <br>
**Note:** This method mutates `object` and is loosely based on **Note:** This method mutates `object` and is loosely based on
[`Object.assign`](https://mdn.io/Object/assign). [`Object.assign`](https://mdn.io/Object/assign).
#### Since #### Since
skipping to change at line 6996 skipping to change at line 6996
_.assign({ 'a': 0 }, new Foo, new Bar); _.assign({ 'a': 0 }, new Foo, new Bar);
// => { 'a': 1, 'c': 3 } // => { 'a': 1, 'c': 3 }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_assigninobject-sources"><code>_.assignIn(object, [sources])</code></h3> <h3 id="_assigninobject-sources"><code>_.assignIn(object, [sources])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12664 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.assignin "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12706 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.assignin "See the np m package") [&#x24C9;][1]
This method is like `_.assign` except that it iterates over own and This method is like `_.assign` except that it iterates over own and
inherited source properties. inherited source properties.
<br> <br>
<br> <br>
**Note:** This method mutates `object`. **Note:** This method mutates `object`.
#### Since #### Since
4.0.0 4.0.0
skipping to change at line 7040 skipping to change at line 7040
_.assignIn({ 'a': 0 }, new Foo, new Bar); _.assignIn({ 'a': 0 }, new Foo, new Bar);
// => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_assigninwithobject-sources-customizer"><code>_.assignInWith(object, sou rces, [customizer])</code></h3> <h3 id="_assigninwithobject-sources-customizer"><code>_.assignInWith(object, sou rces, [customizer])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12697 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.assigninwith "See th e npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12739 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.assigninwith "See th e npm package") [&#x24C9;][1]
This method is like `_.assignIn` except that it accepts `customizer` This method is like `_.assignIn` except that it accepts `customizer`
which is invoked to produce the assigned values. If `customizer` returns which is invoked to produce the assigned values. If `customizer` returns
`undefined`, assignment is handled by the method instead. The `customizer` `undefined`, assignment is handled by the method instead. The `customizer`
is invoked with five arguments: *(objValue, srcValue, key, object, source)*. is invoked with five arguments: *(objValue, srcValue, key, object, source)*.
<br> <br>
<br> <br>
**Note:** This method mutates `object`. **Note:** This method mutates `object`.
#### Since #### Since
skipping to change at line 7082 skipping to change at line 7082
defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
// => { 'a': 1, 'b': 2 } // => { 'a': 1, 'b': 2 }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_assignwithobject-sources-customizer"><code>_.assignWith(object, sources , [customizer])</code></h3> <h3 id="_assignwithobject-sources-customizer"><code>_.assignWith(object, sources , [customizer])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12729 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.assignwith "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12771 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.assignwith "See the npm package") [&#x24C9;][1]
This method is like `_.assign` except that it accepts `customizer` This method is like `_.assign` except that it accepts `customizer`
which is invoked to produce the assigned values. If `customizer` returns which is invoked to produce the assigned values. If `customizer` returns
`undefined`, assignment is handled by the method instead. The `customizer` `undefined`, assignment is handled by the method instead. The `customizer`
is invoked with five arguments: *(objValue, srcValue, key, object, source)*. is invoked with five arguments: *(objValue, srcValue, key, object, source)*.
<br> <br>
<br> <br>
**Note:** This method mutates `object`. **Note:** This method mutates `object`.
#### Since #### Since
skipping to change at line 7121 skipping to change at line 7121
defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
// => { 'a': 1, 'b': 2 } // => { 'a': 1, 'b': 2 }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_atobject-paths"><code>_.at(object, [paths])</code></h3> <h3 id="_atobject-paths"><code>_.at(object, [paths])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12750 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.at "See the npm pack age") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12792 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.at "See the npm pack age") [&#x24C9;][1]
Creates an array of values corresponding to `paths` of `object`. Creates an array of values corresponding to `paths` of `object`.
#### Since #### Since
1.0.0 1.0.0
#### Arguments #### Arguments
1. `object` *(Object)*: The object to iterate over. 1. `object` *(Object)*: The object to iterate over.
2. `[paths]` *(...(string|string&#91;&#93;))*: The property paths to pick. 2. `[paths]` *(...(string|string&#91;&#93;))*: The property paths to pick.
skipping to change at line 7149 skipping to change at line 7149
_.at(object, ['a[0].b.c', 'a[1]']); _.at(object, ['a[0].b.c', 'a[1]']);
// => [3, 4] // => [3, 4]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_createprototype-properties"><code>_.create(prototype, [properties])</co de></h3> <h3 id="_createprototype-properties"><code>_.create(prototype, [properties])</co de></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12786 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.create "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12828 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.create "See the npm package") [&#x24C9;][1]
Creates an object that inherits from the `prototype` object. If a Creates an object that inherits from the `prototype` object. If a
`properties` object is given, its own enumerable string keyed properties `properties` object is given, its own enumerable string keyed properties
are assigned to the created object. are assigned to the created object.
#### Since #### Since
2.3.0 2.3.0
#### Arguments #### Arguments
1. `prototype` *(Object)*: The object to inherit from. 1. `prototype` *(Object)*: The object to inherit from.
skipping to change at line 7194 skipping to change at line 7194
circle instanceof Shape; circle instanceof Shape;
// => true // => true
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_defaultsobject-sources"><code>_.defaults(object, [sources])</code></h3> <h3 id="_defaultsobject-sources"><code>_.defaults(object, [sources])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12812 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.defaults "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12854 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.defaults "See the np m package") [&#x24C9;][1]
Assigns own and inherited enumerable string keyed properties of source Assigns own and inherited enumerable string keyed properties of source
objects to the destination object for all destination properties that objects to the destination object for all destination properties that
resolve to `undefined`. Source objects are applied from left to right. resolve to `undefined`. Source objects are applied from left to right.
Once a property is set, additional values of the same property are ignored. Once a property is set, additional values of the same property are ignored.
<br> <br>
<br> <br>
**Note:** This method mutates `object`. **Note:** This method mutates `object`.
#### Since #### Since
skipping to change at line 7226 skipping to change at line 7226
_.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
// => { 'a': 1, 'b': 2 } // => { 'a': 1, 'b': 2 }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_defaultsdeepobject-sources"><code>_.defaultsDeep(object, [sources])</co de></h3> <h3 id="_defaultsdeepobject-sources"><code>_.defaultsDeep(object, [sources])</co de></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12862 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.defaultsdeep "See th e npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12904 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.defaultsdeep "See th e npm package") [&#x24C9;][1]
This method is like `_.defaults` except that it recursively assigns This method is like `_.defaults` except that it recursively assigns
default properties. default properties.
<br> <br>
<br> <br>
**Note:** This method mutates `object`. **Note:** This method mutates `object`.
#### Since #### Since
3.10.0 3.10.0
skipping to change at line 7256 skipping to change at line 7256
_.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
// => { 'a': { 'b': 2, 'c': 3 } } // => { 'a': { 'b': 2, 'c': 3 } }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_findkeyobject-predicate_identity"><code>_.findKey(object, [predicate=_. identity])</code></h3> <h3 id="_findkeyobject-predicate_identity"><code>_.findKey(object, [predicate=_. identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12902 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.findkey "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12944 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.findkey "See the npm package") [&#x24C9;][1]
This method is like `_.find` except that it returns the key of the first This method is like `_.find` except that it returns the key of the first
element `predicate` returns truthy for instead of the element itself. element `predicate` returns truthy for instead of the element itself.
#### Since #### Since
1.1.0 1.1.0
#### Arguments #### Arguments
1. `object` *(Object)*: The object to inspect. 1. `object` *(Object)*: The object to inspect.
2. `[predicate=_.identity]` *(Function)*: The function invoked per iteration. 2. `[predicate=_.identity]` *(Function)*: The function invoked per iteration.
skipping to change at line 7301 skipping to change at line 7301
_.findKey(users, 'active'); _.findKey(users, 'active');
// => 'barney' // => 'barney'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_findlastkeyobject-predicate_identity"><code>_.findLastKey(object, [pred icate=_.identity])</code></h3> <h3 id="_findlastkeyobject-predicate_identity"><code>_.findLastKey(object, [pred icate=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12941 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.findlastkey "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L12983 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.findlastkey "See the npm package") [&#x24C9;][1]
This method is like `_.findKey` except that it iterates over elements of This method is like `_.findKey` except that it iterates over elements of
a collection in the opposite order. a collection in the opposite order.
#### Since #### Since
2.0.0 2.0.0
#### Arguments #### Arguments
1. `object` *(Object)*: The object to inspect. 1. `object` *(Object)*: The object to inspect.
2. `[predicate=_.identity]` *(Function)*: The function invoked per iteration. 2. `[predicate=_.identity]` *(Function)*: The function invoked per iteration.
skipping to change at line 7346 skipping to change at line 7346
_.findLastKey(users, 'active'); _.findLastKey(users, 'active');
// => 'pebbles' // => 'pebbles'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_forinobject-iteratee_identity"><code>_.forIn(object, [iteratee=_.identi ty])</code></h3> <h3 id="_forinobject-iteratee_identity"><code>_.forIn(object, [iteratee=_.identi ty])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L12973 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.forin "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13015 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.forin "See the npm p ackage") [&#x24C9;][1]
Iterates over own and inherited enumerable string keyed properties of an Iterates over own and inherited enumerable string keyed properties of an
object and invokes `iteratee` for each property. The iteratee is invoked object and invokes `iteratee` for each property. The iteratee is invoked
with three arguments: *(value, key, object)*. Iteratee functions may exit with three arguments: *(value, key, object)*. Iteratee functions may exit
iteration early by explicitly returning `false`. iteration early by explicitly returning `false`.
#### Since #### Since
0.3.0 0.3.0
#### Arguments #### Arguments
skipping to change at line 7384 skipping to change at line 7384
}); });
// => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_forinrightobject-iteratee_identity"><code>_.forInRight(object, [iterate e=_.identity])</code></h3> <h3 id="_forinrightobject-iteratee_identity"><code>_.forInRight(object, [iterate e=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13005 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.forinright "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13047 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.forinright "See the npm package") [&#x24C9;][1]
This method is like `_.forIn` except that it iterates over properties of This method is like `_.forIn` except that it iterates over properties of
`object` in the opposite order. `object` in the opposite order.
#### Since #### Since
2.0.0 2.0.0
#### Arguments #### Arguments
1. `object` *(Object)*: The object to iterate over. 1. `object` *(Object)*: The object to iterate over.
2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration. 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
skipping to change at line 7420 skipping to change at line 7420
}); });
// => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_forownobject-iteratee_identity"><code>_.forOwn(object, [iteratee=_.iden tity])</code></h3> <h3 id="_forownobject-iteratee_identity"><code>_.forOwn(object, [iteratee=_.iden tity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13039 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.forown "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13081 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.forown "See the npm package") [&#x24C9;][1]
Iterates over own enumerable string keyed properties of an object and Iterates over own enumerable string keyed properties of an object and
invokes `iteratee` for each property. The iteratee is invoked with three invokes `iteratee` for each property. The iteratee is invoked with three
arguments: *(value, key, object)*. Iteratee functions may exit iteration arguments: *(value, key, object)*. Iteratee functions may exit iteration
early by explicitly returning `false`. early by explicitly returning `false`.
#### Since #### Since
0.3.0 0.3.0
#### Arguments #### Arguments
skipping to change at line 7458 skipping to change at line 7458
}); });
// => Logs 'a' then 'b' (iteration order is not guaranteed). // => Logs 'a' then 'b' (iteration order is not guaranteed).
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_forownrightobject-iteratee_identity"><code>_.forOwnRight(object, [itera tee=_.identity])</code></h3> <h3 id="_forownrightobject-iteratee_identity"><code>_.forOwnRight(object, [itera tee=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13069 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.forownright "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13111 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.forownright "See the npm package") [&#x24C9;][1]
This method is like `_.forOwn` except that it iterates over properties of This method is like `_.forOwn` except that it iterates over properties of
`object` in the opposite order. `object` in the opposite order.
#### Since #### Since
2.0.0 2.0.0
#### Arguments #### Arguments
1. `object` *(Object)*: The object to iterate over. 1. `object` *(Object)*: The object to iterate over.
2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration. 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
skipping to change at line 7494 skipping to change at line 7494
}); });
// => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_functionsobject"><code>_.functions(object)</code></h3> <h3 id="_functionsobject"><code>_.functions(object)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13096 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.functions "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13138 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.functions "See the n pm package") [&#x24C9;][1]
Creates an array of function property names from own enumerable properties Creates an array of function property names from own enumerable properties
of `object`. of `object`.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `object` *(Object)*: The object to inspect. 1. `object` *(Object)*: The object to inspect.
skipping to change at line 7527 skipping to change at line 7527
_.functions(new Foo); _.functions(new Foo);
// => ['a', 'b'] // => ['a', 'b']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_functionsinobject"><code>_.functionsIn(object)</code></h3> <h3 id="_functionsinobject"><code>_.functionsIn(object)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13123 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.functionsin "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13165 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.functionsin "See the npm package") [&#x24C9;][1]
Creates an array of function property names from own and inherited Creates an array of function property names from own and inherited
enumerable properties of `object`. enumerable properties of `object`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `object` *(Object)*: The object to inspect. 1. `object` *(Object)*: The object to inspect.
skipping to change at line 7560 skipping to change at line 7560
_.functionsIn(new Foo); _.functionsIn(new Foo);
// => ['a', 'b', 'c'] // => ['a', 'b', 'c']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_getobject-path-defaultvalue"><code>_.get(object, path, [defaultValue])< /code></h3> <h3 id="_getobject-path-defaultvalue"><code>_.get(object, path, [defaultValue])< /code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13152 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.get "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13194 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.get "See the npm pac kage") [&#x24C9;][1]
Gets the value at `path` of `object`. If the resolved value is Gets the value at `path` of `object`. If the resolved value is
`undefined`, the `defaultValue` is returned in its place. `undefined`, the `defaultValue` is returned in its place.
#### Since #### Since
3.7.0 3.7.0
#### Arguments #### Arguments
1. `object` *(Object)*: The object to query. 1. `object` *(Object)*: The object to query.
2. `path` *(Array|string)*: The path of the property to get. 2. `path` *(Array|string)*: The path of the property to get.
skipping to change at line 7596 skipping to change at line 7596
_.get(object, 'a.b.c', 'default'); _.get(object, 'a.b.c', 'default');
// => 'default' // => 'default'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_hasobject-path"><code>_.has(object, path)</code></h3> <h3 id="_hasobject-path"><code>_.has(object, path)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13184 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.has "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13226 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.has "See the npm pac kage") [&#x24C9;][1]
Checks if `path` is a direct property of `object`. Checks if `path` is a direct property of `object`.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `object` *(Object)*: The object to query. 1. `object` *(Object)*: The object to query.
2. `path` *(Array|string)*: The path to check. 2. `path` *(Array|string)*: The path to check.
skipping to change at line 7634 skipping to change at line 7634
_.has(other, 'a'); _.has(other, 'a');
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_hasinobject-path"><code>_.hasIn(object, path)</code></h3> <h3 id="_hasinobject-path"><code>_.hasIn(object, path)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13214 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.hasin "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13256 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.hasin "See the npm p ackage") [&#x24C9;][1]
Checks if `path` is a direct or inherited property of `object`. Checks if `path` is a direct or inherited property of `object`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `object` *(Object)*: The object to query. 1. `object` *(Object)*: The object to query.
2. `path` *(Array|string)*: The path to check. 2. `path` *(Array|string)*: The path to check.
skipping to change at line 7671 skipping to change at line 7671
_.hasIn(object, 'b'); _.hasIn(object, 'b');
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_invertobject"><code>_.invert(object)</code></h3> <h3 id="_invertobject"><code>_.invert(object)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13236 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.invert "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13278 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.invert "See the npm package") [&#x24C9;][1]
Creates an object composed of the inverted keys and values of `object`. Creates an object composed of the inverted keys and values of `object`.
If `object` contains duplicate values, subsequent values overwrite If `object` contains duplicate values, subsequent values overwrite
property assignments of previous values. property assignments of previous values.
#### Since #### Since
0.7.0 0.7.0
#### Arguments #### Arguments
1. `object` *(Object)*: The object to invert. 1. `object` *(Object)*: The object to invert.
skipping to change at line 7700 skipping to change at line 7700
_.invert(object); _.invert(object);
// => { '1': 'c', '2': 'b' } // => { '1': 'c', '2': 'b' }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_invertbyobject-iteratee_identity"><code>_.invertBy(object, [iteratee=_. identity])</code></h3> <h3 id="_invertbyobject-iteratee_identity"><code>_.invertBy(object, [iteratee=_. identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13271 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.invertby "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13313 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.invertby "See the np m package") [&#x24C9;][1]
This method is like `_.invert` except that the inverted object is generated This method is like `_.invert` except that the inverted object is generated
from the results of running each element of `object` thru `iteratee`. The from the results of running each element of `object` thru `iteratee`. The
corresponding inverted value of each inverted key is an array of keys corresponding inverted value of each inverted key is an array of keys
responsible for generating the inverted value. The iteratee is invoked responsible for generating the inverted value. The iteratee is invoked
with one argument: *(value)*. with one argument: *(value)*.
#### Since #### Since
4.1.0 4.1.0
skipping to change at line 7737 skipping to change at line 7737
}); });
// => { 'group1': ['a', 'c'], 'group2': ['b'] } // => { 'group1': ['a', 'c'], 'group2': ['b'] }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_invokeobject-path-args"><code>_.invoke(object, path, [args])</code></h3 > <h3 id="_invokeobject-path-args"><code>_.invoke(object, path, [args])</code></h3 >
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13302 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.invoke "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13344 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.invoke "See the npm package") [&#x24C9;][1]
Invokes the method at `path` of `object`. Invokes the method at `path` of `object`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `object` *(Object)*: The object to query. 1. `object` *(Object)*: The object to query.
2. `path` *(Array|string)*: The path of the method to invoke. 2. `path` *(Array|string)*: The path of the method to invoke.
3. `[args]` *(...&#42;)*: The arguments to invoke the method with. 3. `[args]` *(...&#42;)*: The arguments to invoke the method with.
skipping to change at line 7766 skipping to change at line 7766
_.invoke(object, 'a[0].b.c.slice', 1, 3); _.invoke(object, 'a[0].b.c.slice', 1, 3);
// => [2, 3] // => [2, 3]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_keysobject"><code>_.keys(object)</code></h3> <h3 id="_keysobject"><code>_.keys(object)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13332 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.keys "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13374 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.keys "See the npm pa ckage") [&#x24C9;][1]
Creates an array of the own enumerable property names of `object`. Creates an array of the own enumerable property names of `object`.
<br> <br>
<br> <br>
**Note:** Non-object values are coerced to objects. See the **Note:** Non-object values are coerced to objects. See the
[ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
for more details. for more details.
#### Since #### Since
0.1.0 0.1.0
skipping to change at line 7806 skipping to change at line 7806
_.keys('hi'); _.keys('hi');
// => ['0', '1'] // => ['0', '1']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_keysinobject"><code>_.keysIn(object)</code></h3> <h3 id="_keysinobject"><code>_.keysIn(object)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13359 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.keysin "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13401 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.keysin "See the npm package") [&#x24C9;][1]
Creates an array of the own and inherited enumerable property names of `object`. Creates an array of the own and inherited enumerable property names of `object`.
<br> <br>
<br> <br>
**Note:** Non-object values are coerced to objects. **Note:** Non-object values are coerced to objects.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
skipping to change at line 7841 skipping to change at line 7841
_.keysIn(new Foo); _.keysIn(new Foo);
// => ['a', 'b', 'c'] (iteration order is not guaranteed) // => ['a', 'b', 'c'] (iteration order is not guaranteed)
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_mapkeysobject-iteratee_identity"><code>_.mapKeys(object, [iteratee=_.id entity])</code></h3> <h3 id="_mapkeysobject-iteratee_identity"><code>_.mapKeys(object, [iteratee=_.id entity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13384 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.mapkeys "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13426 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.mapkeys "See the npm package") [&#x24C9;][1]
The opposite of `_.mapValues`; this method creates an object with the The opposite of `_.mapValues`; this method creates an object with the
same values as `object` and keys generated by running each own enumerable same values as `object` and keys generated by running each own enumerable
string keyed property of `object` thru `iteratee`. The iteratee is invoked string keyed property of `object` thru `iteratee`. The iteratee is invoked
with three arguments: *(value, key, object)*. with three arguments: *(value, key, object)*.
#### Since #### Since
3.8.0 3.8.0
#### Arguments #### Arguments
skipping to change at line 7872 skipping to change at line 7872
}); });
// => { 'a1': 1, 'b2': 2 } // => { 'a1': 1, 'b2': 2 }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_mapvaluesobject-iteratee_identity"><code>_.mapValues(object, [iteratee= _.identity])</code></h3> <h3 id="_mapvaluesobject-iteratee_identity"><code>_.mapValues(object, [iteratee= _.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13422 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.mapvalues "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13464 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.mapvalues "See the n pm package") [&#x24C9;][1]
Creates an object with the same keys as `object` and values generated Creates an object with the same keys as `object` and values generated
by running each own enumerable string keyed property of `object` thru by running each own enumerable string keyed property of `object` thru
`iteratee`. The iteratee is invoked with three arguments:<br> `iteratee`. The iteratee is invoked with three arguments:<br>
*(value, key, object)*. *(value, key, object)*.
#### Since #### Since
2.4.0 2.4.0
#### Arguments #### Arguments
skipping to change at line 7910 skipping to change at line 7910
_.mapValues(users, 'age'); _.mapValues(users, 'age');
// => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_mergeobject-sources"><code>_.merge(object, [sources])</code></h3> <h3 id="_mergeobject-sources"><code>_.merge(object, [sources])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13463 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.merge "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13505 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.merge "See the npm p ackage") [&#x24C9;][1]
This method is like `_.assign` except that it recursively merges own and This method is like `_.assign` except that it recursively merges own and
inherited enumerable string keyed properties of source objects into the inherited enumerable string keyed properties of source objects into the
destination object. Source properties that resolve to `undefined` are destination object. Source properties that resolve to `undefined` are
skipped if a destination value exists. Array and plain object properties skipped if a destination value exists. Array and plain object properties
are merged recursively. Other objects and value types are overridden by are merged recursively. Other objects and value types are overridden by
assignment. Source objects are applied from left to right. Subsequent assignment. Source objects are applied from left to right. Subsequent
sources overwrite property assignments of previous sources. sources overwrite property assignments of previous sources.
<br> <br>
<br> <br>
skipping to change at line 7953 skipping to change at line 7953
_.merge(object, other); _.merge(object, other);
// => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_mergewithobject-sources-customizer"><code>_.mergeWith(object, sources, customizer)</code></h3> <h3 id="_mergewithobject-sources-customizer"><code>_.mergeWith(object, sources, customizer)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13498 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.mergewith "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13540 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.mergewith "See the n pm package") [&#x24C9;][1]
This method is like `_.merge` except that it accepts `customizer` which This method is like `_.merge` except that it accepts `customizer` which
is invoked to produce the merged values of the destination and source is invoked to produce the merged values of the destination and source
properties. If `customizer` returns `undefined`, merging is handled by the properties. If `customizer` returns `undefined`, merging is handled by the
method instead. The `customizer` is invoked with six arguments:<br> method instead. The `customizer` is invoked with six arguments:<br>
*(objValue, srcValue, key, object, source, stack)*. *(objValue, srcValue, key, object, source, stack)*.
<br> <br>
<br> <br>
**Note:** This method mutates `object`. **Note:** This method mutates `object`.
skipping to change at line 7996 skipping to change at line 7996
_.mergeWith(object, other, customizer); _.mergeWith(object, other, customizer);
// => { 'a': [1, 3], 'b': [2, 4] } // => { 'a': [1, 3], 'b': [2, 4] }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_omitobject-paths"><code>_.omit(object, [paths])</code></h3> <h3 id="_omitobject-paths"><code>_.omit(object, [paths])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13522 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.omit "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13564 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.omit "See the npm pa ckage") [&#x24C9;][1]
The opposite of `_.pick`; this method creates an object composed of the The opposite of `_.pick`; this method creates an object composed of the
own and inherited enumerable property paths of `object` that are not omitted. own and inherited enumerable property paths of `object` that are not omitted.
<br> <br>
<br> <br>
**Note:** This method is considerably slower than `_.pick`. **Note:** This method is considerably slower than `_.pick`.
#### Since #### Since
0.1.0 0.1.0
skipping to change at line 8028 skipping to change at line 8028
_.omit(object, ['a', 'c']); _.omit(object, ['a', 'c']);
// => { 'b': '2' } // => { 'b': '2' }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_omitbyobject-predicate_identity"><code>_.omitBy(object, [predicate=_.id entity])</code></h3> <h3 id="_omitbyobject-predicate_identity"><code>_.omitBy(object, [predicate=_.id entity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13564 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.omitby "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13606 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.omitby "See the npm package") [&#x24C9;][1]
The opposite of `_.pickBy`; this method creates an object composed of The opposite of `_.pickBy`; this method creates an object composed of
the own and inherited enumerable string keyed properties of `object` that the own and inherited enumerable string keyed properties of `object` that
`predicate` doesn't return truthy for. The predicate is invoked with two `predicate` doesn't return truthy for. The predicate is invoked with two
arguments: *(value, key)*. arguments: *(value, key)*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
skipping to change at line 8059 skipping to change at line 8059
_.omitBy(object, _.isNumber); _.omitBy(object, _.isNumber);
// => { 'b': '2' } // => { 'b': '2' }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_pickobject-paths"><code>_.pick(object, [paths])</code></h3> <h3 id="_pickobject-paths"><code>_.pick(object, [paths])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13585 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.pick "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13627 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.pick "See the npm pa ckage") [&#x24C9;][1]
Creates an object composed of the picked `object` properties. Creates an object composed of the picked `object` properties.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `object` *(Object)*: The source object. 1. `object` *(Object)*: The source object.
2. `[paths]` *(...(string|string&#91;&#93;))*: The property paths to pick. 2. `[paths]` *(...(string|string&#91;&#93;))*: The property paths to pick.
skipping to change at line 8087 skipping to change at line 8087
_.pick(object, ['a', 'c']); _.pick(object, ['a', 'c']);
// => { 'a': 1, 'c': 3 } // => { 'a': 1, 'c': 3 }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_pickbyobject-predicate_identity"><code>_.pickBy(object, [predicate=_.id entity])</code></h3> <h3 id="_pickbyobject-predicate_identity"><code>_.pickBy(object, [predicate=_.id entity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13607 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.pickby "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13649 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.pickby "See the npm package") [&#x24C9;][1]
Creates an object composed of the `object` properties `predicate` returns Creates an object composed of the `object` properties `predicate` returns
truthy for. The predicate is invoked with two arguments: *(value, key)*. truthy for. The predicate is invoked with two arguments: *(value, key)*.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `object` *(Object)*: The source object. 1. `object` *(Object)*: The source object.
2. `[predicate=_.identity]` *(Function)*: The function invoked per property. 2. `[predicate=_.identity]` *(Function)*: The function invoked per property.
skipping to change at line 8116 skipping to change at line 8116
_.pickBy(object, _.isNumber); _.pickBy(object, _.isNumber);
// => { 'a': 1, 'c': 3 } // => { 'a': 1, 'c': 3 }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_resultobject-path-defaultvalue"><code>_.result(object, path, [defaultVa lue])</code></h3> <h3 id="_resultobject-path-defaultvalue"><code>_.result(object, path, [defaultVa lue])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13649 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.result "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13691 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.result "See the npm package") [&#x24C9;][1]
This method is like `_.get` except that if the resolved value is a This method is like `_.get` except that if the resolved value is a
function it's invoked with the `this` binding of its parent object and function it's invoked with the `this` binding of its parent object and
its result is returned. its result is returned.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `object` *(Object)*: The object to query. 1. `object` *(Object)*: The object to query.
skipping to change at line 8156 skipping to change at line 8156
_.result(object, 'a[0].b.c3', _.constant('default')); _.result(object, 'a[0].b.c3', _.constant('default'));
// => 'default' // => 'default'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_setobject-path-value"><code>_.set(object, path, value)</code></h3> <h3 id="_setobject-path-value"><code>_.set(object, path, value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13699 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.set "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13741 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.set "See the npm pac kage") [&#x24C9;][1]
Sets the value at `path` of `object`. If a portion of `path` doesn't exist, Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
it's created. Arrays are created for missing index properties while objects it's created. Arrays are created for missing index properties while objects
are created for all other missing properties. Use `_.setWith` to customize are created for all other missing properties. Use `_.setWith` to customize
`path` creation. `path` creation.
<br> <br>
<br> <br>
**Note:** This method mutates `object`. **Note:** This method mutates `object`.
#### Since #### Since
skipping to change at line 8196 skipping to change at line 8196
console.log(object.x[0].y.z); console.log(object.x[0].y.z);
// => 5 // => 5
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_setwithobject-path-value-customizer"><code>_.setWith(object, path, valu e, [customizer])</code></h3> <h3 id="_setwithobject-path-value-customizer"><code>_.setWith(object, path, valu e, [customizer])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13727 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.setwith "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13769 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.setwith "See the npm package") [&#x24C9;][1]
This method is like `_.set` except that it accepts `customizer` which is This method is like `_.set` except that it accepts `customizer` which is
invoked to produce the objects of `path`. If `customizer` returns `undefined` invoked to produce the objects of `path`. If `customizer` returns `undefined`
path creation is handled by the method instead. The `customizer` is invoked path creation is handled by the method instead. The `customizer` is invoked
with three arguments: *(nsValue, key, nsObject)*. with three arguments: *(nsValue, key, nsObject)*.
<br> <br>
<br> <br>
**Note:** This method mutates `object`. **Note:** This method mutates `object`.
#### Since #### Since
skipping to change at line 8232 skipping to change at line 8232
_.setWith(object, '[0][1]', 'a', Object); _.setWith(object, '[0][1]', 'a', Object);
// => { '0': { '1': 'a' } } // => { '0': { '1': 'a' } }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_topairsobject"><code>_.toPairs(object)</code></h3> <h3 id="_topairsobject"><code>_.toPairs(object)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13756 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.topairs "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13798 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.topairs "See the npm package") [&#x24C9;][1]
Creates an array of own enumerable string keyed-value pairs for `object` Creates an array of own enumerable string keyed-value pairs for `object`
which can be consumed by `_.fromPairs`. If `object` is a map or set, its which can be consumed by `_.fromPairs`. If `object` is a map or set, its
entries are returned. entries are returned.
#### Since #### Since
4.0.0 4.0.0
#### Aliases #### Aliases
*_.entries* *_.entries*
skipping to change at line 8269 skipping to change at line 8269
_.toPairs(new Foo); _.toPairs(new Foo);
// => [['a', 1], ['b', 2]] (iteration order is not guaranteed) // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_topairsinobject"><code>_.toPairsIn(object)</code></h3> <h3 id="_topairsinobject"><code>_.toPairsIn(object)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13782 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.topairsin "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13824 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.topairsin "See the n pm package") [&#x24C9;][1]
Creates an array of own and inherited enumerable string keyed-value pairs Creates an array of own and inherited enumerable string keyed-value pairs
for `object` which can be consumed by `_.fromPairs`. If `object` is a map for `object` which can be consumed by `_.fromPairs`. If `object` is a map
or set, its entries are returned. or set, its entries are returned.
#### Since #### Since
4.0.0 4.0.0
#### Aliases #### Aliases
*_.entriesIn* *_.entriesIn*
skipping to change at line 8306 skipping to change at line 8306
_.toPairsIn(new Foo); _.toPairsIn(new Foo);
// => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_transformobject-iteratee_identity-accumulator"><code>_.transform(object , [iteratee=_.identity], [accumulator])</code></h3> <h3 id="_transformobject-iteratee_identity-accumulator"><code>_.transform(object , [iteratee=_.identity], [accumulator])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13814 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.transform "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13856 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.transform "See the n pm package") [&#x24C9;][1]
An alternative to `_.reduce`; this method transforms `object` to a new An alternative to `_.reduce`; this method transforms `object` to a new
`accumulator` object which is the result of running each of its own `accumulator` object which is the result of running each of its own
enumerable string keyed properties thru `iteratee`, with each invocation enumerable string keyed properties thru `iteratee`, with each invocation
potentially mutating the `accumulator` object. If `accumulator` is not potentially mutating the `accumulator` object. If `accumulator` is not
provided, a new object with the same `[[Prototype]]` will be used. The provided, a new object with the same `[[Prototype]]` will be used. The
iteratee is invoked with four arguments: *(accumulator, value, key, object)*. iteratee is invoked with four arguments: *(accumulator, value, key, object)*.
Iteratee functions may exit iteration early by explicitly returning `false`. Iteratee functions may exit iteration early by explicitly returning `false`.
#### Since #### Since
skipping to change at line 8347 skipping to change at line 8347
}, {}); }, {});
// => { '1': ['a', 'c'], '2': ['b'] } // => { '1': ['a', 'c'], '2': ['b'] }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_unsetobject-path"><code>_.unset(object, path)</code></h3> <h3 id="_unsetobject-path"><code>_.unset(object, path)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13864 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.unset "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13906 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.unset "See the npm p ackage") [&#x24C9;][1]
Removes the property at `path` of `object`. Removes the property at `path` of `object`.
<br> <br>
<br> <br>
**Note:** This method mutates `object`. **Note:** This method mutates `object`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
skipping to change at line 8386 skipping to change at line 8386
console.log(object); console.log(object);
// => { 'a': [{ 'b': {} }] }; // => { 'a': [{ 'b': {} }] };
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_updateobject-path-updater"><code>_.update(object, path, updater)</code> </h3> <h3 id="_updateobject-path-updater"><code>_.update(object, path, updater)</code> </h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13895 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.update "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13937 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.update "See the npm package") [&#x24C9;][1]
This method is like `_.set` except that accepts `updater` to produce the This method is like `_.set` except that accepts `updater` to produce the
value to set. Use `_.updateWith` to customize `path` creation. The `updater` value to set. Use `_.updateWith` to customize `path` creation. The `updater`
is invoked with one argument: *(value)*. is invoked with one argument: *(value)*.
<br> <br>
<br> <br>
**Note:** This method mutates `object`. **Note:** This method mutates `object`.
#### Since #### Since
4.6.0 4.6.0
skipping to change at line 8425 skipping to change at line 8425
console.log(object.x[0].y.z); console.log(object.x[0].y.z);
// => 0 // => 0
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_updatewithobject-path-updater-customizer"><code>_.updateWith(object, pa th, updater, [customizer])</code></h3> <h3 id="_updatewithobject-path-updater-customizer"><code>_.updateWith(object, pa th, updater, [customizer])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13923 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.updatewith "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13965 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.updatewith "See the npm package") [&#x24C9;][1]
This method is like `_.update` except that it accepts `customizer` which is This method is like `_.update` except that it accepts `customizer` which is
invoked to produce the objects of `path`. If `customizer` returns `undefined` invoked to produce the objects of `path`. If `customizer` returns `undefined`
path creation is handled by the method instead. The `customizer` is invoked path creation is handled by the method instead. The `customizer` is invoked
with three arguments: *(nsValue, key, nsObject)*. with three arguments: *(nsValue, key, nsObject)*.
<br> <br>
<br> <br>
**Note:** This method mutates `object`. **Note:** This method mutates `object`.
#### Since #### Since
skipping to change at line 8461 skipping to change at line 8461
_.updateWith(object, '[0][1]', _.constant('a'), Object); _.updateWith(object, '[0][1]', _.constant('a'), Object);
// => { '0': { '1': 'a' } } // => { '0': { '1': 'a' } }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_valuesobject"><code>_.values(object)</code></h3> <h3 id="_valuesobject"><code>_.values(object)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13954 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.values "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L13996 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.values "See the npm package") [&#x24C9;][1]
Creates an array of the own enumerable string keyed property values of `object`. Creates an array of the own enumerable string keyed property values of `object`.
<br> <br>
<br> <br>
**Note:** Non-object values are coerced to objects. **Note:** Non-object values are coerced to objects.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
skipping to change at line 8499 skipping to change at line 8499
_.values('hi'); _.values('hi');
// => ['h', 'i'] // => ['h', 'i']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_valuesinobject"><code>_.valuesIn(object)</code></h3> <h3 id="_valuesinobject"><code>_.valuesIn(object)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L13982 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.valuesin "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14024 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.valuesin "See the np m package") [&#x24C9;][1]
Creates an array of the own and inherited enumerable string keyed property Creates an array of the own and inherited enumerable string keyed property
values of `object`. values of `object`.
<br> <br>
<br> <br>
**Note:** Non-object values are coerced to objects. **Note:** Non-object values are coerced to objects.
#### Since #### Since
3.0.0 3.0.0
skipping to change at line 8541 skipping to change at line 8541
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
## `“Seq” Methods` ## `“Seq” Methods`
<!-- div --> <!-- div -->
<h3 id="_value"><code>_(value)</code></h3> <h3 id="_value"><code>_(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L1648 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L1690 "View i n source") [&#x24C9;][1]
Creates a `lodash` object which wraps `value` to enable implicit method Creates a `lodash` object which wraps `value` to enable implicit method
chain sequences. Methods that operate on and return arrays, collections, chain sequences. Methods that operate on and return arrays, collections,
and functions can be chained together. Methods that retrieve a single value and functions can be chained together. Methods that retrieve a single value
or may return a primitive value will automatically end the chain sequence or may return a primitive value will automatically end the chain sequence
and return the unwrapped value. Otherwise, the value must be unwrapped and return the unwrapped value. Otherwise, the value must be unwrapped
with `_#value`. with `_#value`.
<br> <br>
<br> <br>
Explicit chain sequences, which must be unwrapped with `_#value`, may be Explicit chain sequences, which must be unwrapped with `_#value`, may be
skipping to change at line 8677 skipping to change at line 8677
_.isArray(squares.value()); _.isArray(squares.value());
// => true // => true
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_chainvalue"><code>_.chain(value)</code></h3> <h3 id="_chainvalue"><code>_.chain(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8759 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8801 "View i n source") [&#x24C9;][1]
Creates a `lodash` wrapper instance that wraps `value` with explicit method Creates a `lodash` wrapper instance that wraps `value` with explicit method
chain sequences enabled. The result of such sequences must be unwrapped chain sequences enabled. The result of such sequences must be unwrapped
with `_#value`. with `_#value`.
#### Since #### Since
1.3.0 1.3.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to wrap. 1. `value` *(&#42;)*: The value to wrap.
skipping to change at line 8717 skipping to change at line 8717
.value(); .value();
// => 'pebbles is 1' // => 'pebbles is 1'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_tapvalue-interceptor"><code>_.tap(value, interceptor)</code></h3> <h3 id="_tapvalue-interceptor"><code>_.tap(value, interceptor)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8788 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8830 "View i n source") [&#x24C9;][1]
This method invokes `interceptor` and returns `value`. The interceptor This method invokes `interceptor` and returns `value`. The interceptor
is invoked with one argument; *(value)*. The purpose of this method is to is invoked with one argument; *(value)*. The purpose of this method is to
"tap into" a method chain sequence in order to modify intermediate results. "tap into" a method chain sequence in order to modify intermediate results.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to provide to `interceptor`. 1. `value` *(&#42;)*: The value to provide to `interceptor`.
skipping to change at line 8751 skipping to change at line 8751
.value(); .value();
// => [2, 1] // => [2, 1]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_thruvalue-interceptor"><code>_.thru(value, interceptor)</code></h3> <h3 id="_thruvalue-interceptor"><code>_.thru(value, interceptor)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8816 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8858 "View i n source") [&#x24C9;][1]
This method is like `_.tap` except that it returns the result of `interceptor`. This method is like `_.tap` except that it returns the result of `interceptor`.
The purpose of this method is to "pass thru" values replacing intermediate The purpose of this method is to "pass thru" values replacing intermediate
results in a method chain sequence. results in a method chain sequence.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to provide to `interceptor`. 1. `value` *(&#42;)*: The value to provide to `interceptor`.
skipping to change at line 8785 skipping to change at line 8785
.value(); .value();
// => ['abc'] // => ['abc']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_prototypesymboliterator"><code>_.prototype[Symbol.iterator]()</code></h 3> <h3 id="_prototypesymboliterator"><code>_.prototype[Symbol.iterator]()</code></h 3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8971 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9013 "View i n source") [&#x24C9;][1]
Enables the wrapper to be iterable. Enables the wrapper to be iterable.
#### Since #### Since
4.0.0 4.0.0
#### Returns #### Returns
*(Object)*: Returns the wrapper object. *(Object)*: Returns the wrapper object.
#### Example #### Example
skipping to change at line 8812 skipping to change at line 8812
Array.from(wrapped); Array.from(wrapped);
// => [1, 2] // => [1, 2]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_prototypeatpaths"><code>_.prototype.at([paths])</code></h3> <h3 id="_prototypeatpaths"><code>_.prototype.at([paths])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8836 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8878 "View i n source") [&#x24C9;][1]
This method is the wrapper version of `_.at`. This method is the wrapper version of `_.at`.
#### Since #### Since
1.0.0 1.0.0
#### Arguments #### Arguments
1. `[paths]` *(...(string|string&#91;&#93;))*: The property paths to pick. 1. `[paths]` *(...(string|string&#91;&#93;))*: The property paths to pick.
#### Returns #### Returns
skipping to change at line 8839 skipping to change at line 8839
_(object).at(['a[0].b.c', 'a[1]']).value(); _(object).at(['a[0].b.c', 'a[1]']).value();
// => [3, 4] // => [3, 4]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_prototypechain"><code>_.prototype.chain()</code></h3> <h3 id="_prototypechain"><code>_.prototype.chain()</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8887 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8929 "View i n source") [&#x24C9;][1]
Creates a `lodash` wrapper instance with explicit method chain sequences enabled . Creates a `lodash` wrapper instance with explicit method chain sequences enabled .
#### Since #### Since
0.1.0 0.1.0
#### Returns #### Returns
*(Object)*: Returns the new `lodash` wrapper instance. *(Object)*: Returns the new `lodash` wrapper instance.
#### Example #### Example
skipping to change at line 8875 skipping to change at line 8875
.value(); .value();
// => { 'user': 'barney' } // => { 'user': 'barney' }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_prototypecommit"><code>_.prototype.commit()</code></h3> <h3 id="_prototypecommit"><code>_.prototype.commit()</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8917 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8959 "View i n source") [&#x24C9;][1]
Executes the chain sequence and returns the wrapped result. Executes the chain sequence and returns the wrapped result.
#### Since #### Since
3.2.0 3.2.0
#### Returns #### Returns
*(Object)*: Returns the new `lodash` wrapper instance. *(Object)*: Returns the new `lodash` wrapper instance.
#### Example #### Example
skipping to change at line 8910 skipping to change at line 8910
console.log(array); console.log(array);
// => [1, 2, 3] // => [1, 2, 3]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_prototypenext"><code>_.prototype.next()</code></h3> <h3 id="_prototypenext"><code>_.prototype.next()</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8943 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L8985 "View i n source") [&#x24C9;][1]
Gets the next value on a wrapped object following the Gets the next value on a wrapped object following the
[iterator protocol](https://mdn.io/iteration_protocols#iterator). [iterator protocol](https://mdn.io/iteration_protocols#iterator).
#### Since #### Since
4.0.0 4.0.0
#### Returns #### Returns
*(Object)*: Returns the next iterator value. *(Object)*: Returns the next iterator value.
skipping to change at line 8941 skipping to change at line 8941
wrapped.next(); wrapped.next();
// => { 'done': true, 'value': undefined } // => { 'done': true, 'value': undefined }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_prototypeplantvalue"><code>_.prototype.plant(value)</code></h3> <h3 id="_prototypeplantvalue"><code>_.prototype.plant(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L8999 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9041 "View i n source") [&#x24C9;][1]
Creates a clone of the chain sequence planting `value` as the wrapped value. Creates a clone of the chain sequence planting `value` as the wrapped value.
#### Since #### Since
3.2.0 3.2.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to plant. 1. `value` *(&#42;)*: The value to plant.
#### Returns #### Returns
skipping to change at line 8976 skipping to change at line 8976
wrapped.value(); wrapped.value();
// => [1, 4] // => [1, 4]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_prototypereverse"><code>_.prototype.reverse()</code></h3> <h3 id="_prototypereverse"><code>_.prototype.reverse()</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9039 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9081 "View i n source") [&#x24C9;][1]
This method is the wrapper version of `_.reverse`. This method is the wrapper version of `_.reverse`.
<br> <br>
<br> <br>
**Note:** This method mutates the wrapped array. **Note:** This method mutates the wrapped array.
#### Since #### Since
0.1.0 0.1.0
#### Returns #### Returns
skipping to change at line 9006 skipping to change at line 9006
console.log(array); console.log(array);
// => [3, 2, 1] // => [3, 2, 1]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_prototypevalue"><code>_.prototype.value()</code></h3> <h3 id="_prototypevalue"><code>_.prototype.value()</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L9071 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L9113 "View i n source") [&#x24C9;][1]
Executes the chain sequence to resolve the unwrapped value. Executes the chain sequence to resolve the unwrapped value.
#### Since #### Since
0.1.0 0.1.0
#### Aliases #### Aliases
*_.prototype.toJSON, _.prototype.valueOf* *_.prototype.toJSON, _.prototype.valueOf*
#### Returns #### Returns
skipping to change at line 9037 skipping to change at line 9037
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
## `“String” Methods` ## `“String” Methods`
<!-- div --> <!-- div -->
<h3 id="_camelcasestring"><code>_.camelCase([string=''])</code></h3> <h3 id="_camelcasestring"><code>_.camelCase([string=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14165 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.camelcase "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14207 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.camelcase "See the n pm package") [&#x24C9;][1]
Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to convert. 1. `[string='']` *(string)*: The string to convert.
#### Returns #### Returns
skipping to change at line 9068 skipping to change at line 9068
_.camelCase('__FOO_BAR__'); _.camelCase('__FOO_BAR__');
// => 'fooBar' // => 'fooBar'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_capitalizestring"><code>_.capitalize([string=''])</code></h3> <h3 id="_capitalizestring"><code>_.capitalize([string=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14185 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.capitalize "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14227 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.capitalize "See the npm package") [&#x24C9;][1]
Converts the first character of `string` to upper case and the remaining Converts the first character of `string` to upper case and the remaining
to lower case. to lower case.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to capitalize. 1. `[string='']` *(string)*: The string to capitalize.
skipping to change at line 9094 skipping to change at line 9094
_.capitalize('FRED'); _.capitalize('FRED');
// => 'Fred' // => 'Fred'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_deburrstring"><code>_.deburr([string=''])</code></h3> <h3 id="_deburrstring"><code>_.deburr([string=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14207 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.deburr "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14249 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.deburr "See the npm package") [&#x24C9;][1]
Deburrs `string` by converting Deburrs `string` by converting
[Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_b lock)#Character_table) [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_b lock)#Character_table)
and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
letters to basic Latin letters and removing letters to basic Latin letters and removing
[combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritica l_Marks). [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritica l_Marks).
#### Since #### Since
3.0.0 3.0.0
skipping to change at line 9123 skipping to change at line 9123
_.deburr('déjà vu'); _.deburr('déjà vu');
// => 'deja vu' // => 'deja vu'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_endswithstring-target-positionstringlength"><code>_.endsWith([string='' ], [target], [position=string.length])</code></h3> <h3 id="_endswithstring-target-positionstringlength"><code>_.endsWith([string='' ], [target], [position=string.length])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14235 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.endswith "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14277 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.endswith "See the np m package") [&#x24C9;][1]
Checks if `string` ends with the given target string. Checks if `string` ends with the given target string.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to inspect. 1. `[string='']` *(string)*: The string to inspect.
2. `[target]` *(string)*: The string to search for. 2. `[target]` *(string)*: The string to search for.
3. `[position=string.length]` *(number)*: The position to search up to. 3. `[position=string.length]` *(number)*: The position to search up to.
skipping to change at line 9156 skipping to change at line 9156
_.endsWith('abc', 'b', 2); _.endsWith('abc', 'b', 2);
// => true // => true
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_escapestring"><code>_.escape([string=''])</code></h3> <h3 id="_escapestring"><code>_.escape([string=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14277 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.escape "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14319 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.escape "See the npm package") [&#x24C9;][1]
Converts the characters "&", "<", ">", '"', and "'" in `string` to their Converts the characters "&", "<", ">", '"', and "'" in `string` to their
corresponding HTML entities. corresponding HTML entities.
<br> <br>
<br> <br>
**Note:** No other characters are escaped. To escape additional **Note:** No other characters are escaped. To escape additional
characters use a third-party library like [_he_](https://mths.be/he). characters use a third-party library like [_he_](https://mths.be/he).
<br> <br>
<br> <br>
Though the ">" character is escaped for symmetry, characters like Though the ">" character is escaped for symmetry, characters like
skipping to change at line 9198 skipping to change at line 9198
_.escape('fred, barney, & pebbles'); _.escape('fred, barney, & pebbles');
// => 'fred, barney, &amp; pebbles' // => 'fred, barney, &amp; pebbles'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_escaperegexpstring"><code>_.escapeRegExp([string=''])</code></h3> <h3 id="_escaperegexpstring"><code>_.escapeRegExp([string=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14299 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.escaperegexp "See th e npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14341 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.escaperegexp "See th e npm package") [&#x24C9;][1]
Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
"?", "(", ")", "[", "]", "{", "}", and "|" in `string`. "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to escape. 1. `[string='']` *(string)*: The string to escape.
skipping to change at line 9224 skipping to change at line 9224
_.escapeRegExp('[lodash](https://lodash.com/)'); _.escapeRegExp('[lodash](https://lodash.com/)');
// => '\[lodash\]\(https://lodash\.com/\)' // => '\[lodash\]\(https://lodash\.com/\)'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_kebabcasestring"><code>_.kebabCase([string=''])</code></h3> <h3 id="_kebabcasestring"><code>_.kebabCase([string=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14327 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.kebabcase "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14369 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.kebabcase "See the n pm package") [&#x24C9;][1]
Converts `string` to Converts `string` to
[kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to convert. 1. `[string='']` *(string)*: The string to convert.
skipping to change at line 9256 skipping to change at line 9256
_.kebabCase('__FOO_BAR__'); _.kebabCase('__FOO_BAR__');
// => 'foo-bar' // => 'foo-bar'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_lowercasestring"><code>_.lowerCase([string=''])</code></h3> <h3 id="_lowercasestring"><code>_.lowerCase([string=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14351 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.lowercase "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14393 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.lowercase "See the n pm package") [&#x24C9;][1]
Converts `string`, as space separated words, to lower case. Converts `string`, as space separated words, to lower case.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to convert. 1. `[string='']` *(string)*: The string to convert.
#### Returns #### Returns
skipping to change at line 9287 skipping to change at line 9287
_.lowerCase('__FOO_BAR__'); _.lowerCase('__FOO_BAR__');
// => 'foo bar' // => 'foo bar'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_lowerfirststring"><code>_.lowerFirst([string=''])</code></h3> <h3 id="_lowerfirststring"><code>_.lowerFirst([string=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14372 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14414 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") [&#x24C9;][1]
Converts the first character of `string` to lower case. Converts the first character of `string` to lower case.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to convert. 1. `[string='']` *(string)*: The string to convert.
#### Returns #### Returns
skipping to change at line 9315 skipping to change at line 9315
_.lowerFirst('FRED'); _.lowerFirst('FRED');
// => 'fRED' // => 'fRED'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_padstring-length0-chars"><code>_.pad([string=''], [length=0], [chars=' '])</code></h3> <h3 id="_padstring-length0-chars"><code>_.pad([string=''], [length=0], [chars=' '])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14397 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.pad "See the npm pac kage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14439 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.pad "See the npm pac kage") [&#x24C9;][1]
Pads `string` on the left and right sides if it's shorter than `length`. Pads `string` on the left and right sides if it's shorter than `length`.
Padding characters are truncated if they can't be evenly divided by `length`. Padding characters are truncated if they can't be evenly divided by `length`.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to pad. 1. `[string='']` *(string)*: The string to pad.
2. `[length=0]` *(number)*: The padding length. 2. `[length=0]` *(number)*: The padding length.
skipping to change at line 9349 skipping to change at line 9349
_.pad('abc', 3); _.pad('abc', 3);
// => 'abc' // => 'abc'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_padendstring-length0-chars"><code>_.padEnd([string=''], [length=0], [ch ars=' '])</code></h3> <h3 id="_padendstring-length0-chars"><code>_.padEnd([string=''], [length=0], [ch ars=' '])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14436 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.padend "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14478 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.padend "See the npm package") [&#x24C9;][1]
Pads `string` on the right side if it's shorter than `length`. Padding Pads `string` on the right side if it's shorter than `length`. Padding
characters are truncated if they exceed `length`. characters are truncated if they exceed `length`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to pad. 1. `[string='']` *(string)*: The string to pad.
2. `[length=0]` *(number)*: The padding length. 2. `[length=0]` *(number)*: The padding length.
skipping to change at line 9383 skipping to change at line 9383
_.padEnd('abc', 3); _.padEnd('abc', 3);
// => 'abc' // => 'abc'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_padstartstring-length0-chars"><code>_.padStart([string=''], [length=0], [chars=' '])</code></h3> <h3 id="_padstartstring-length0-chars"><code>_.padStart([string=''], [length=0], [chars=' '])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14469 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.padstart "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14511 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.padstart "See the np m package") [&#x24C9;][1]
Pads `string` on the left side if it's shorter than `length`. Padding Pads `string` on the left side if it's shorter than `length`. Padding
characters are truncated if they exceed `length`. characters are truncated if they exceed `length`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to pad. 1. `[string='']` *(string)*: The string to pad.
2. `[length=0]` *(number)*: The padding length. 2. `[length=0]` *(number)*: The padding length.
skipping to change at line 9417 skipping to change at line 9417
_.padStart('abc', 3); _.padStart('abc', 3);
// => 'abc' // => 'abc'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_parseintstring-radix10"><code>_.parseInt(string, [radix=10])</code></h3 > <h3 id="_parseintstring-radix10"><code>_.parseInt(string, [radix=10])</code></h3 >
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14503 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.parseint "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14545 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.parseint "See the np m package") [&#x24C9;][1]
Converts `string` to an integer of the specified radix. If `radix` is Converts `string` to an integer of the specified radix. If `radix` is
`undefined` or `0`, a `radix` of `10` is used unless `value` is a `undefined` or `0`, a `radix` of `10` is used unless `value` is a
hexadecimal, in which case a `radix` of `16` is used. hexadecimal, in which case a `radix` of `16` is used.
<br> <br>
<br> <br>
**Note:** This method aligns with the **Note:** This method aligns with the
[ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
#### Since #### Since
skipping to change at line 9452 skipping to change at line 9452
_.map(['6', '08', '10'], _.parseInt); _.map(['6', '08', '10'], _.parseInt);
// => [6, 8, 10] // => [6, 8, 10]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_repeatstring-n1"><code>_.repeat([string=''], [n=1])</code></h3> <h3 id="_repeatstring-n1"><code>_.repeat([string=''], [n=1])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14534 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.repeat "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14576 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.repeat "See the npm package") [&#x24C9;][1]
Repeats the given string `n` times. Repeats the given string `n` times.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to repeat. 1. `[string='']` *(string)*: The string to repeat.
2. `[n=1]` *(number)*: The number of times to repeat the string. 2. `[n=1]` *(number)*: The number of times to repeat the string.
skipping to change at line 9484 skipping to change at line 9484
_.repeat('abc', 0); _.repeat('abc', 0);
// => '' // => ''
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_replacestring-pattern-replacement"><code>_.replace([string=''], pattern , replacement)</code></h3> <h3 id="_replacestring-pattern-replacement"><code>_.replace([string=''], pattern , replacement)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14562 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.replace "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14604 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.replace "See the npm package") [&#x24C9;][1]
Replaces matches for `pattern` in `string` with `replacement`. Replaces matches for `pattern` in `string` with `replacement`.
<br> <br>
<br> <br>
**Note:** This method is based on **Note:** This method is based on
[`String#replace`](https://mdn.io/String/replace). [`String#replace`](https://mdn.io/String/replace).
#### Since #### Since
4.0.0 4.0.0
skipping to change at line 9515 skipping to change at line 9515
_.replace('Hi Fred', 'Fred', 'Barney'); _.replace('Hi Fred', 'Fred', 'Barney');
// => 'Hi Barney' // => 'Hi Barney'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_snakecasestring"><code>_.snakeCase([string=''])</code></h3> <h3 id="_snakecasestring"><code>_.snakeCase([string=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14590 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.snakecase "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14632 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.snakecase "See the n pm package") [&#x24C9;][1]
Converts `string` to Converts `string` to
[snake case](https://en.wikipedia.org/wiki/Snake_case). [snake case](https://en.wikipedia.org/wiki/Snake_case).
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to convert. 1. `[string='']` *(string)*: The string to convert.
skipping to change at line 9547 skipping to change at line 9547
_.snakeCase('--FOO-BAR--'); _.snakeCase('--FOO-BAR--');
// => 'foo_bar' // => 'foo_bar'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_splitstring-separator-limit"><code>_.split([string=''], separator, [lim it])</code></h3> <h3 id="_splitstring-separator-limit"><code>_.split([string=''], separator, [lim it])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14613 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.split "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14655 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.split "See the npm p ackage") [&#x24C9;][1]
Splits `string` by `separator`. Splits `string` by `separator`.
<br> <br>
<br> <br>
**Note:** This method is based on **Note:** This method is based on
[`String#split`](https://mdn.io/String/split). [`String#split`](https://mdn.io/String/split).
#### Since #### Since
4.0.0 4.0.0
skipping to change at line 9578 skipping to change at line 9578
_.split('a-b-c', '-', 2); _.split('a-b-c', '-', 2);
// => ['a', 'b'] // => ['a', 'b']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_startcasestring"><code>_.startCase([string=''])</code></h3> <h3 id="_startcasestring"><code>_.startCase([string=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14655 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.startcase "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14697 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.startcase "See the n pm package") [&#x24C9;][1]
Converts `string` to Converts `string` to
[start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_ usage). [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_ usage).
#### Since #### Since
3.1.0 3.1.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to convert. 1. `[string='']` *(string)*: The string to convert.
skipping to change at line 9610 skipping to change at line 9610
_.startCase('__FOO_BAR__'); _.startCase('__FOO_BAR__');
// => 'FOO BAR' // => 'FOO BAR'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_startswithstring-target-position0"><code>_.startsWith([string=''], [tar get], [position=0])</code></h3> <h3 id="_startswithstring-target-position0"><code>_.startsWith([string=''], [tar get], [position=0])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14682 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.startswith "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14724 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.startswith "See the npm package") [&#x24C9;][1]
Checks if `string` starts with the given target string. Checks if `string` starts with the given target string.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to inspect. 1. `[string='']` *(string)*: The string to inspect.
2. `[target]` *(string)*: The string to search for. 2. `[target]` *(string)*: The string to search for.
3. `[position=0]` *(number)*: The position to search from. 3. `[position=0]` *(number)*: The position to search from.
skipping to change at line 9643 skipping to change at line 9643
_.startsWith('abc', 'b', 1); _.startsWith('abc', 'b', 1);
// => true // => true
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_templatestring-options"><code>_.template([string=''], [options={}])</co de></h3> <h3 id="_templatestring-options"><code>_.template([string=''], [options={}])</co de></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14796 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.template "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14838 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.template "See the np m package") [&#x24C9;][1]
Creates a compiled template function that can interpolate data properties Creates a compiled template function that can interpolate data properties
in "interpolate" delimiters, HTML-escape interpolated data properties in in "interpolate" delimiters, HTML-escape interpolated data properties in
"escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
properties may be accessed as free variables in the template. If a setting properties may be accessed as free variables in the template. If a setting
object is given, it takes precedence over `_.templateSettings` values. object is given, it takes precedence over `_.templateSettings` values.
<br> <br>
<br> <br>
**Note:** In the development build `_.template` utilizes **Note:** In the development build `_.template` utilizes
[sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#t oc-sourceurl) [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#t oc-sourceurl)
skipping to change at line 9754 skipping to change at line 9754
};\ };\
'); ');
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_tolowerstring"><code>_.toLower([string=''])</code></h3> <h3 id="_tolowerstring"><code>_.toLower([string=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14928 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.tolower "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L14976 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.tolower "See the npm package") [&#x24C9;][1]
Converts `string`, as a whole, to lower case just like Converts `string`, as a whole, to lower case just like
[String#toLowerCase](https://mdn.io/toLowerCase). [String#toLowerCase](https://mdn.io/toLowerCase).
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to convert. 1. `[string='']` *(string)*: The string to convert.
skipping to change at line 9786 skipping to change at line 9786
_.toLower('__FOO_BAR__'); _.toLower('__FOO_BAR__');
// => '__foo_bar__' // => '__foo_bar__'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_toupperstring"><code>_.toUpper([string=''])</code></h3> <h3 id="_toupperstring"><code>_.toUpper([string=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14953 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.toupper "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15001 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.toupper "See the npm package") [&#x24C9;][1]
Converts `string`, as a whole, to upper case just like Converts `string`, as a whole, to upper case just like
[String#toUpperCase](https://mdn.io/toUpperCase). [String#toUpperCase](https://mdn.io/toUpperCase).
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to convert. 1. `[string='']` *(string)*: The string to convert.
skipping to change at line 9818 skipping to change at line 9818
_.toUpper('__foo_bar__'); _.toUpper('__foo_bar__');
// => '__FOO_BAR__' // => '__FOO_BAR__'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_trimstring-charswhitespace"><code>_.trim([string=''], [chars=whitespace ])</code></h3> <h3 id="_trimstring-charswhitespace"><code>_.trim([string=''], [chars=whitespace ])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L14979 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.trim "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15027 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.trim "See the npm pa ckage") [&#x24C9;][1]
Removes leading and trailing whitespace or specified characters from `string`. Removes leading and trailing whitespace or specified characters from `string`.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to trim. 1. `[string='']` *(string)*: The string to trim.
2. `[chars=whitespace]` *(string)*: The characters to trim. 2. `[chars=whitespace]` *(string)*: The characters to trim.
skipping to change at line 9850 skipping to change at line 9850
_.map([' foo ', ' bar '], _.trim); _.map([' foo ', ' bar '], _.trim);
// => ['foo', 'bar'] // => ['foo', 'bar']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_trimendstring-charswhitespace"><code>_.trimEnd([string=''], [chars=whit espace])</code></h3> <h3 id="_trimendstring-charswhitespace"><code>_.trimEnd([string=''], [chars=whit espace])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15014 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.trimend "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15062 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.trimend "See the npm package") [&#x24C9;][1]
Removes trailing whitespace or specified characters from `string`. Removes trailing whitespace or specified characters from `string`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to trim. 1. `[string='']` *(string)*: The string to trim.
2. `[chars=whitespace]` *(string)*: The characters to trim. 2. `[chars=whitespace]` *(string)*: The characters to trim.
skipping to change at line 9879 skipping to change at line 9879
_.trimEnd('-_-abc-_-', '_-'); _.trimEnd('-_-abc-_-', '_-');
// => '-_-abc' // => '-_-abc'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_trimstartstring-charswhitespace"><code>_.trimStart([string=''], [chars= whitespace])</code></h3> <h3 id="_trimstartstring-charswhitespace"><code>_.trimStart([string=''], [chars= whitespace])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15047 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.trimstart "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15095 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.trimstart "See the n pm package") [&#x24C9;][1]
Removes leading whitespace or specified characters from `string`. Removes leading whitespace or specified characters from `string`.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to trim. 1. `[string='']` *(string)*: The string to trim.
2. `[chars=whitespace]` *(string)*: The characters to trim. 2. `[chars=whitespace]` *(string)*: The characters to trim.
skipping to change at line 9908 skipping to change at line 9908
_.trimStart('-_-abc-_-', '_-'); _.trimStart('-_-abc-_-', '_-');
// => 'abc-_-' // => 'abc-_-'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_truncatestring-options"><code>_.truncate([string=''], [options={}])</co de></h3> <h3 id="_truncatestring-options"><code>_.truncate([string=''], [options={}])</co de></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15098 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.truncate "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15146 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.truncate "See the np m package") [&#x24C9;][1]
Truncates `string` if it's longer than the given maximum string length. Truncates `string` if it's longer than the given maximum string length.
The last characters of the truncated string are replaced with the omission The last characters of the truncated string are replaced with the omission
string which defaults to "...". string which defaults to "...".
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to truncate. 1. `[string='']` *(string)*: The string to truncate.
skipping to change at line 9956 skipping to change at line 9956
}); });
// => 'hi-diddly-ho there, neig [...]' // => 'hi-diddly-ho there, neig [...]'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_unescapestring"><code>_.unescape([string=''])</code></h3> <h3 id="_unescapestring"><code>_.unescape([string=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15173 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.unescape "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15221 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.unescape "See the np m package") [&#x24C9;][1]
The inverse of `_.escape`; this method converts the HTML entities The inverse of `_.escape`; this method converts the HTML entities
`&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
their corresponding characters. their corresponding characters.
<br> <br>
<br> <br>
**Note:** No other HTML entities are unescaped. To unescape additional **Note:** No other HTML entities are unescaped. To unescape additional
HTML entities use a third-party library like [_he_](https://mths.be/he). HTML entities use a third-party library like [_he_](https://mths.be/he).
#### Since #### Since
skipping to change at line 9987 skipping to change at line 9987
_.unescape('fred, barney, &amp; pebbles'); _.unescape('fred, barney, &amp; pebbles');
// => 'fred, barney, & pebbles' // => 'fred, barney, & pebbles'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_uppercasestring"><code>_.upperCase([string=''])</code></h3> <h3 id="_uppercasestring"><code>_.upperCase([string=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15200 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.uppercase "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15248 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.uppercase "See the n pm package") [&#x24C9;][1]
Converts `string`, as space separated words, to upper case. Converts `string`, as space separated words, to upper case.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to convert. 1. `[string='']` *(string)*: The string to convert.
#### Returns #### Returns
skipping to change at line 10018 skipping to change at line 10018
_.upperCase('__foo_bar__'); _.upperCase('__foo_bar__');
// => 'FOO BAR' // => 'FOO BAR'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_upperfirststring"><code>_.upperFirst([string=''])</code></h3> <h3 id="_upperfirststring"><code>_.upperFirst([string=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15221 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15269 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") [&#x24C9;][1]
Converts the first character of `string` to upper case. Converts the first character of `string` to upper case.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to convert. 1. `[string='']` *(string)*: The string to convert.
#### Returns #### Returns
skipping to change at line 10046 skipping to change at line 10046
_.upperFirst('FRED'); _.upperFirst('FRED');
// => 'FRED' // => 'FRED'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_wordsstring-pattern"><code>_.words([string=''], [pattern])</code></h3> <h3 id="_wordsstring-pattern"><code>_.words([string=''], [pattern])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15242 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.words "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15290 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.words "See the npm p ackage") [&#x24C9;][1]
Splits `string` into an array of its words. Splits `string` into an array of its words.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `[string='']` *(string)*: The string to inspect. 1. `[string='']` *(string)*: The string to inspect.
2. `[pattern]` *(RegExp|string)*: The pattern to match words. 2. `[pattern]` *(RegExp|string)*: The pattern to match words.
skipping to change at line 10081 skipping to change at line 10081
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
## `“Util” Methods` ## `“Util” Methods`
<!-- div --> <!-- div -->
<h3 id="_attemptfunc-args"><code>_.attempt(func, [args])</code></h3> <h3 id="_attemptfunc-args"><code>_.attempt(func, [args])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15276 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.attempt "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15324 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.attempt "See the npm package") [&#x24C9;][1]
Attempts to invoke `func`, returning either the result or the caught error Attempts to invoke `func`, returning either the result or the caught error
object. Any additional arguments are provided to `func` when it's invoked. object. Any additional arguments are provided to `func` when it's invoked.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `func` *(Function)*: The function to attempt. 1. `func` *(Function)*: The function to attempt.
2. `[args]` *(...&#42;)*: The arguments to invoke `func` with. 2. `[args]` *(...&#42;)*: The arguments to invoke `func` with.
skipping to change at line 10114 skipping to change at line 10114
elements = []; elements = [];
} }
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_bindallobject-methodnames"><code>_.bindAll(object, methodNames)</code>< /h3> <h3 id="_bindallobject-methodnames"><code>_.bindAll(object, methodNames)</code>< /h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15310 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.bindall "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15358 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.bindall "See the npm package") [&#x24C9;][1]
Binds methods of an object to the object itself, overwriting the existing Binds methods of an object to the object itself, overwriting the existing
method. method.
<br> <br>
<br> <br>
**Note:** This method doesn't set the "length" property of bound functions. **Note:** This method doesn't set the "length" property of bound functions.
#### Since #### Since
0.1.0 0.1.0
skipping to change at line 10152 skipping to change at line 10152
jQuery(element).on('click', view.click); jQuery(element).on('click', view.click);
// => Logs 'clicked docs' when clicked. // => Logs 'clicked docs' when clicked.
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_condpairs"><code>_.cond(pairs)</code></h3> <h3 id="_condpairs"><code>_.cond(pairs)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15347 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.cond "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15395 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.cond "See the npm pa ckage") [&#x24C9;][1]
Creates a function that iterates over `pairs` and invokes the corresponding Creates a function that iterates over `pairs` and invokes the corresponding
function of the first predicate to return truthy. The predicate-function function of the first predicate to return truthy. The predicate-function
pairs are invoked with the `this` binding and arguments of the created pairs are invoked with the `this` binding and arguments of the created
function. function.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
skipping to change at line 10192 skipping to change at line 10192
func({ 'a': '1', 'b': '2' }); func({ 'a': '1', 'b': '2' });
// => 'no match' // => 'no match'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_conformssource"><code>_.conforms(source)</code></h3> <h3 id="_conformssource"><code>_.conforms(source)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15393 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.conforms "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15441 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.conforms "See the np m package") [&#x24C9;][1]
Creates a function that invokes the predicate properties of `source` with Creates a function that invokes the predicate properties of `source` with
the corresponding property values of a given object, returning `true` if the corresponding property values of a given object, returning `true` if
all predicates return truthy, else `false`. all predicates return truthy, else `false`.
<br> <br>
<br> <br>
**Note:** The created function is equivalent to `_.conformsTo` with **Note:** The created function is equivalent to `_.conformsTo` with
`source` partially applied. `source` partially applied.
#### Since #### Since
skipping to change at line 10228 skipping to change at line 10228
_.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
// => [{ 'a': 1, 'b': 2 }] // => [{ 'a': 1, 'b': 2 }]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_constantvalue"><code>_.constant(value)</code></h3> <h3 id="_constantvalue"><code>_.constant(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15416 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.constant "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15464 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.constant "See the np m package") [&#x24C9;][1]
Creates a function that returns `value`. Creates a function that returns `value`.
#### Since #### Since
2.4.0 2.4.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to return from the new function. 1. `value` *(&#42;)*: The value to return from the new function.
#### Returns #### Returns
skipping to change at line 10258 skipping to change at line 10258
console.log(objects[0] === objects[1]); console.log(objects[0] === objects[1]);
// => true // => true
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_defaulttovalue-defaultvalue"><code>_.defaultTo(value, defaultValue)</co de></h3> <h3 id="_defaulttovalue-defaultvalue"><code>_.defaultTo(value, defaultValue)</co de></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15442 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.defaultto "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15490 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.defaultto "See the n pm package") [&#x24C9;][1]
Checks `value` to determine whether a default value should be returned in Checks `value` to determine whether a default value should be returned in
its place. The `defaultValue` is returned if `value` is `NaN`, `null`, its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
or `undefined`. or `undefined`.
#### Since #### Since
4.14.0 4.14.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to check. 1. `value` *(&#42;)*: The value to check.
skipping to change at line 10289 skipping to change at line 10289
_.defaultTo(undefined, 10); _.defaultTo(undefined, 10);
// => 10 // => 10
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_flowfuncs"><code>_.flow([funcs])</code></h3> <h3 id="_flowfuncs"><code>_.flow([funcs])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15468 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.flow "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15516 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.flow "See the npm pa ckage") [&#x24C9;][1]
Creates a function that returns the result of invoking the given functions Creates a function that returns the result of invoking the given functions
with the `this` binding of the created function, where each successive with the `this` binding of the created function, where each successive
invocation is supplied the return value of the previous. invocation is supplied the return value of the previous.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `[funcs]` *(...(Function|Function&#91;&#93;))*: The functions to invoke. 1. `[funcs]` *(...(Function|Function&#91;&#93;))*: The functions to invoke.
skipping to change at line 10321 skipping to change at line 10321
addSquare(1, 2); addSquare(1, 2);
// => 9 // => 9
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_flowrightfuncs"><code>_.flowRight([funcs])</code></h3> <h3 id="_flowrightfuncs"><code>_.flowRight([funcs])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15491 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.flowright "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15539 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.flowright "See the n pm package") [&#x24C9;][1]
This method is like `_.flow` except that it creates a function that This method is like `_.flow` except that it creates a function that
invokes the given functions from right to left. invokes the given functions from right to left.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `[funcs]` *(...(Function|Function&#91;&#93;))*: The functions to invoke. 1. `[funcs]` *(...(Function|Function&#91;&#93;))*: The functions to invoke.
skipping to change at line 10352 skipping to change at line 10352
addSquare(1, 2); addSquare(1, 2);
// => 9 // => 9
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_identityvalue"><code>_.identity(value)</code></h3> <h3 id="_identityvalue"><code>_.identity(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15509 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.identity "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15557 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.identity "See the np m package") [&#x24C9;][1]
This method returns the first argument it receives. This method returns the first argument it receives.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: Any value. 1. `value` *(&#42;)*: Any value.
#### Returns #### Returns
skipping to change at line 10379 skipping to change at line 10379
console.log(_.identity(object) === object); console.log(_.identity(object) === object);
// => true // => true
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_iterateefunc_identity"><code>_.iteratee([func=_.identity])</code></h3> <h3 id="_iterateefunc_identity"><code>_.iteratee([func=_.identity])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15555 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.iteratee "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15603 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.iteratee "See the np m package") [&#x24C9;][1]
Creates a function that invokes `func` with the arguments of the created Creates a function that invokes `func` with the arguments of the created
function. If `func` is a property name, the created function returns the function. If `func` is a property name, the created function returns the
property value for a given element. If `func` is an array or object, the property value for a given element. If `func` is an array or object, the
created function returns `true` for elements that contain the equivalent created function returns `true` for elements that contain the equivalent
source properties, otherwise it returns `false`. source properties, otherwise it returns `false`.
#### Since #### Since
4.0.0 4.0.0
skipping to change at line 10432 skipping to change at line 10432
_.filter(['abc', 'def'], /ef/); _.filter(['abc', 'def'], /ef/);
// => ['def'] // => ['def']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_matchessource"><code>_.matches(source)</code></h3> <h3 id="_matchessource"><code>_.matches(source)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15594 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.matches "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15642 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.matches "See the npm package") [&#x24C9;][1]
Creates a function that performs a partial deep comparison between a given Creates a function that performs a partial deep comparison between a given
object and `source`, returning `true` if the given object has equivalent object and `source`, returning `true` if the given object has equivalent
property values, else `false`. property values, else `false`.
<br> <br>
<br> <br>
**Note:** The created function is equivalent to `_.isMatch` with `source` **Note:** The created function is equivalent to `_.isMatch` with `source`
partially applied. partially applied.
<br> <br>
<br> <br>
skipping to change at line 10481 skipping to change at line 10481
_.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
// => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_matchespropertypath-srcvalue"><code>_.matchesProperty(path, srcValue)</ code></h3> <h3 id="_matchespropertypath-srcvalue"><code>_.matchesProperty(path, srcValue)</ code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15631 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15679 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") [&#x24C9;][1]
Creates a function that performs a partial deep comparison between the Creates a function that performs a partial deep comparison between the
value at `path` of a given object to `srcValue`, returning `true` if the value at `path` of a given object to `srcValue`, returning `true` if the
object value is equivalent, else `false`. object value is equivalent, else `false`.
<br> <br>
<br> <br>
**Note:** Partial comparisons will match empty array and empty object **Note:** Partial comparisons will match empty array and empty object
`srcValue` values against any array or object value, respectively. See `srcValue` values against any array or object value, respectively. See
`_.isEqual` for a list of supported value comparisons. `_.isEqual` for a list of supported value comparisons.
<br> <br>
skipping to change at line 10527 skipping to change at line 10527
_.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)])); _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
// => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_methodpath-args"><code>_.method(path, [args])</code></h3> <h3 id="_methodpath-args"><code>_.method(path, [args])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15659 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.method "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15707 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.method "See the npm package") [&#x24C9;][1]
Creates a function that invokes the method at `path` of a given object. Creates a function that invokes the method at `path` of a given object.
Any additional arguments are provided to the invoked method. Any additional arguments are provided to the invoked method.
#### Since #### Since
3.7.0 3.7.0
#### Arguments #### Arguments
1. `path` *(Array|string)*: The path of the method to invoke. 1. `path` *(Array|string)*: The path of the method to invoke.
2. `[args]` *(...&#42;)*: The arguments to invoke the method with. 2. `[args]` *(...&#42;)*: The arguments to invoke the method with.
skipping to change at line 10562 skipping to change at line 10562
_.map(objects, _.method(['a', 'b'])); _.map(objects, _.method(['a', 'b']));
// => [2, 1] // => [2, 1]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_methodofobject-args"><code>_.methodOf(object, [args])</code></h3> <h3 id="_methodofobject-args"><code>_.methodOf(object, [args])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15688 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.methodof "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15736 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.methodof "See the np m package") [&#x24C9;][1]
The opposite of `_.method`; this method creates a function that invokes The opposite of `_.method`; this method creates a function that invokes
the method at a given path of `object`. Any additional arguments are the method at a given path of `object`. Any additional arguments are
provided to the invoked method. provided to the invoked method.
#### Since #### Since
3.7.0 3.7.0
#### Arguments #### Arguments
1. `object` *(Object)*: The object to query. 1. `object` *(Object)*: The object to query.
skipping to change at line 10596 skipping to change at line 10596
_.map([['a', '2'], ['c', '0']], _.methodOf(object)); _.map([['a', '2'], ['c', '0']], _.methodOf(object));
// => [2, 0] // => [2, 0]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_mixinobjectlodash-source-options"><code>_.mixin([object=lodash], source , [options={}])</code></h3> <h3 id="_mixinobjectlodash-source-options"><code>_.mixin([object=lodash], source , [options={}])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15730 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.mixin "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15778 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.mixin "See the npm p ackage") [&#x24C9;][1]
Adds all own enumerable string keyed function properties of a source Adds all own enumerable string keyed function properties of a source
object to the destination object. If `object` is a function, then methods object to the destination object. If `object` is a function, then methods
are added to its prototype as well. are added to its prototype as well.
<br> <br>
<br> <br>
**Note:** Use `_.runInContext` to create a pristine `lodash` function to **Note:** Use `_.runInContext` to create a pristine `lodash` function to
avoid conflicts caused by modifying the original. avoid conflicts caused by modifying the original.
#### Since #### Since
skipping to change at line 10644 skipping to change at line 10644
_('fred').vowels(); _('fred').vowels();
// => ['e'] // => ['e']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_noconflict"><code>_.noConflict()</code></h3> <h3 id="_noconflict"><code>_.noConflict()</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15779 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.noconflict "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15827 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.noconflict "See the npm package") [&#x24C9;][1]
Reverts the `_` variable to its previous value and returns a reference to Reverts the `_` variable to its previous value and returns a reference to
the `lodash` function. the `lodash` function.
#### Since #### Since
0.1.0 0.1.0
#### Returns #### Returns
*(Function)*: Returns the `lodash` function. *(Function)*: Returns the `lodash` function.
skipping to change at line 10666 skipping to change at line 10666
```js ```js
var lodash = _.noConflict(); var lodash = _.noConflict();
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_noop"><code>_.noop()</code></h3> <h3 id="_noop"><code>_.noop()</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15798 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.noop "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15846 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.noop "See the npm pa ckage") [&#x24C9;][1]
This method returns `undefined`. This method returns `undefined`.
#### Since #### Since
2.3.0 2.3.0
#### Example #### Example
```js ```js
_.times(2, _.noop); _.times(2, _.noop);
// => [undefined, undefined] // => [undefined, undefined]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_nthargn0"><code>_.nthArg([n=0])</code></h3> <h3 id="_nthargn0"><code>_.nthArg([n=0])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15822 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.ntharg "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15870 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.ntharg "See the npm package") [&#x24C9;][1]
Creates a function that gets the argument at index `n`. If `n` is negative, Creates a function that gets the argument at index `n`. If `n` is negative,
the nth argument from the end is returned. the nth argument from the end is returned.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `[n=0]` *(number)*: The index of the argument to return. 1. `[n=0]` *(number)*: The index of the argument to return.
skipping to change at line 10716 skipping to change at line 10716
func('a', 'b', 'c', 'd'); func('a', 'b', 'c', 'd');
// => 'c' // => 'c'
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_overiteratees_identity"><code>_.over([iteratees=[_.identity]])</code></ h3> <h3 id="_overiteratees_identity"><code>_.over([iteratees=[_.identity]])</code></ h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15847 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.over "See the npm pa ckage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15895 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.over "See the npm pa ckage") [&#x24C9;][1]
Creates a function that invokes `iteratees` with the arguments it receives Creates a function that invokes `iteratees` with the arguments it receives
and returns their results. and returns their results.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `[iteratees=[_.identity]]` *(...(Function|Function&#91;&#93;))*: The iteratee s to invoke. 1. `[iteratees=[_.identity]]` *(...(Function|Function&#91;&#93;))*: The iteratee s to invoke.
skipping to change at line 10744 skipping to change at line 10744
func(1, 2, 3, 4); func(1, 2, 3, 4);
// => [4, 1] // => [4, 1]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_overeverypredicates_identity"><code>_.overEvery([predicates=[_.identity ]])</code></h3> <h3 id="_overeverypredicates_identity"><code>_.overEvery([predicates=[_.identity ]])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15877 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.overevery "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15925 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.overevery "See the n pm package") [&#x24C9;][1]
Creates a function that checks if **all** of the `predicates` return Creates a function that checks if **all** of the `predicates` return
truthy when invoked with the arguments it receives. truthy when invoked with the arguments it receives.
<br> <br>
<br> <br>
Following shorthands are possible for providing predicates. Following shorthands are possible for providing predicates.
Pass an `Object` and it will be used as an parameter for `_.matches` to create t he predicate. Pass an `Object` and it will be used as an parameter for `_.matches` to create t he predicate.
Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
#### Since #### Since
skipping to change at line 10783 skipping to change at line 10783
func(NaN); func(NaN);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_oversomepredicates_identity"><code>_.overSome([predicates=[_.identity]] )</code></h3> <h3 id="_oversomepredicates_identity"><code>_.overSome([predicates=[_.identity]] )</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15910 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.oversome "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15958 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.oversome "See the np m package") [&#x24C9;][1]
Creates a function that checks if **any** of the `predicates` return Creates a function that checks if **any** of the `predicates` return
truthy when invoked with the arguments it receives. truthy when invoked with the arguments it receives.
<br> <br>
<br> <br>
Following shorthands are possible for providing predicates. Following shorthands are possible for providing predicates.
Pass an `Object` and it will be used as an parameter for `_.matches` to create t he predicate. Pass an `Object` and it will be used as an parameter for `_.matches` to create t he predicate.
Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
#### Since #### Since
skipping to change at line 10825 skipping to change at line 10825
var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }]) var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]]) var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_propertypath"><code>_.property(path)</code></h3> <h3 id="_propertypath"><code>_.property(path)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15934 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.property "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L15982 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.property "See the np m package") [&#x24C9;][1]
Creates a function that returns the value at `path` of a given object. Creates a function that returns the value at `path` of a given object.
#### Since #### Since
2.4.0 2.4.0
#### Arguments #### Arguments
1. `path` *(Array|string)*: The path of the property to get. 1. `path` *(Array|string)*: The path of the property to get.
#### Returns #### Returns
skipping to change at line 10858 skipping to change at line 10858
_.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
// => [1, 2] // => [1, 2]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_propertyofobject"><code>_.propertyOf(object)</code></h3> <h3 id="_propertyofobject"><code>_.propertyOf(object)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L15959 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.propertyof "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16007 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.propertyof "See the npm package") [&#x24C9;][1]
The opposite of `_.property`; this method creates a function that returns The opposite of `_.property`; this method creates a function that returns
the value at a given path of `object`. the value at a given path of `object`.
#### Since #### Since
3.0.0 3.0.0
#### Arguments #### Arguments
1. `object` *(Object)*: The object to query. 1. `object` *(Object)*: The object to query.
skipping to change at line 10890 skipping to change at line 10890
_.map([['a', '2'], ['c', '0']], _.propertyOf(object)); _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
// => [2, 0] // => [2, 0]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_rangestart0-end-step1"><code>_.range([start=0], end, [step=1])</code></ h3> <h3 id="_rangestart0-end-step1"><code>_.range([start=0], end, [step=1])</code></ h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16006 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.range "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16054 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.range "See the npm p ackage") [&#x24C9;][1]
Creates an array of numbers *(positive and/or negative)* progressing from Creates an array of numbers *(positive and/or negative)* progressing from
`start` up to, but not including, `end`. A step of `-1` is used if a negative `start` up to, but not including, `end`. A step of `-1` is used if a negative
`start` is specified without an `end` or `step`. If `end` is not specified, `start` is specified without an `end` or `step`. If `end` is not specified,
it's set to `start` with `start` then set to `0`. it's set to `start` with `start` then set to `0`.
<br> <br>
<br> <br>
**Note:** JavaScript follows the IEEE-754 standard for resolving **Note:** JavaScript follows the IEEE-754 standard for resolving
floating-point values which can produce unexpected results. floating-point values which can produce unexpected results.
skipping to change at line 10942 skipping to change at line 10942
_.range(0); _.range(0);
// => [] // => []
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_rangerightstart0-end-step1"><code>_.rangeRight([start=0], end, [step=1] )</code></h3> <h3 id="_rangerightstart0-end-step1"><code>_.rangeRight([start=0], end, [step=1] )</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16044 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.rangeright "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16092 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.rangeright "See the npm package") [&#x24C9;][1]
This method is like `_.range` except that it populates values in This method is like `_.range` except that it populates values in
descending order. descending order.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `[start=0]` *(number)*: The start of the range. 1. `[start=0]` *(number)*: The start of the range.
2. `end` *(number)*: The end of the range. 2. `end` *(number)*: The end of the range.
skipping to change at line 10988 skipping to change at line 10988
_.rangeRight(0); _.rangeRight(0);
// => [] // => []
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_runincontextcontextroot"><code>_.runInContext([context=root])</code></h 3> <h3 id="_runincontextcontextroot"><code>_.runInContext([context=root])</code></h 3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L1406 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.runincontext "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L1448 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.runincontext "See the npm package") [&#x24C9;][1]
Create a new pristine `lodash` function using the `context` object. Create a new pristine `lodash` function using the `context` object.
#### Since #### Since
1.1.0 1.1.0
#### Arguments #### Arguments
1. `[context=root]` *(Object)*: The context object. 1. `[context=root]` *(Object)*: The context object.
#### Returns #### Returns
skipping to change at line 11028 skipping to change at line 11028
// Create a suped-up `defer` in Node.js. // Create a suped-up `defer` in Node.js.
var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_stubarray"><code>_.stubArray()</code></h3> <h3 id="_stubarray"><code>_.stubArray()</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16064 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.stubarray "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16112 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.stubarray "See the n pm package") [&#x24C9;][1]
This method returns a new empty array. This method returns a new empty array.
#### Since #### Since
4.13.0 4.13.0
#### Returns #### Returns
*(Array)*: Returns the new empty array. *(Array)*: Returns the new empty array.
#### Example #### Example
skipping to change at line 11055 skipping to change at line 11055
console.log(arrays[0] === arrays[1]); console.log(arrays[0] === arrays[1]);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_stubfalse"><code>_.stubFalse()</code></h3> <h3 id="_stubfalse"><code>_.stubFalse()</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16081 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.stubfalse "See the n pm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16129 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.stubfalse "See the n pm package") [&#x24C9;][1]
This method returns `false`. This method returns `false`.
#### Since #### Since
4.13.0 4.13.0
#### Returns #### Returns
*(boolean)*: Returns `false`. *(boolean)*: Returns `false`.
#### Example #### Example
skipping to change at line 11077 skipping to change at line 11077
_.times(2, _.stubFalse); _.times(2, _.stubFalse);
// => [false, false] // => [false, false]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_stubobject"><code>_.stubObject()</code></h3> <h3 id="_stubobject"><code>_.stubObject()</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16103 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.stubobject "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16151 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.stubobject "See the npm package") [&#x24C9;][1]
This method returns a new empty object. This method returns a new empty object.
#### Since #### Since
4.13.0 4.13.0
#### Returns #### Returns
*(Object)*: Returns the new empty object. *(Object)*: Returns the new empty object.
#### Example #### Example
skipping to change at line 11104 skipping to change at line 11104
console.log(objects[0] === objects[1]); console.log(objects[0] === objects[1]);
// => false // => false
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_stubstring"><code>_.stubString()</code></h3> <h3 id="_stubstring"><code>_.stubString()</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16120 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.stubstring "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16168 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.stubstring "See the npm package") [&#x24C9;][1]
This method returns an empty string. This method returns an empty string.
#### Since #### Since
4.13.0 4.13.0
#### Returns #### Returns
*(string)*: Returns the empty string. *(string)*: Returns the empty string.
#### Example #### Example
skipping to change at line 11126 skipping to change at line 11126
_.times(2, _.stubString); _.times(2, _.stubString);
// => ['', ''] // => ['', '']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_stubtrue"><code>_.stubTrue()</code></h3> <h3 id="_stubtrue"><code>_.stubTrue()</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16137 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.stubtrue "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16185 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.stubtrue "See the np m package") [&#x24C9;][1]
This method returns `true`. This method returns `true`.
#### Since #### Since
4.13.0 4.13.0
#### Returns #### Returns
*(boolean)*: Returns `true`. *(boolean)*: Returns `true`.
#### Example #### Example
skipping to change at line 11148 skipping to change at line 11148
_.times(2, _.stubTrue); _.times(2, _.stubTrue);
// => [true, true] // => [true, true]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_timesn-iteratee_identity"><code>_.times(n, [iteratee=_.identity])</code ></h3> <h3 id="_timesn-iteratee_identity"><code>_.times(n, [iteratee=_.identity])</code ></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16160 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.times "See the npm p ackage") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16208 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.times "See the npm p ackage") [&#x24C9;][1]
Invokes the iteratee `n` times, returning an array of the results of Invokes the iteratee `n` times, returning an array of the results of
each invocation. The iteratee is invoked with one argument; *(index)*. each invocation. The iteratee is invoked with one argument; *(index)*.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `n` *(number)*: The number of times to invoke `iteratee`. 1. `n` *(number)*: The number of times to invoke `iteratee`.
2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration. 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
skipping to change at line 11178 skipping to change at line 11178
_.times(4, _.constant(0)); _.times(4, _.constant(0));
// => [0, 0, 0, 0] // => [0, 0, 0, 0]
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_topathvalue"><code>_.toPath(value)</code></h3> <h3 id="_topathvalue"><code>_.toPath(value)</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16195 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.topath "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16243 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.topath "See the npm package") [&#x24C9;][1]
Converts `value` to a property path array. Converts `value` to a property path array.
#### Since #### Since
4.0.0 4.0.0
#### Arguments #### Arguments
1. `value` *(&#42;)*: The value to convert. 1. `value` *(&#42;)*: The value to convert.
#### Returns #### Returns
skipping to change at line 11206 skipping to change at line 11206
_.toPath('a[0].b.c'); _.toPath('a[0].b.c');
// => ['a', '0', 'b', 'c'] // => ['a', '0', 'b', 'c']
``` ```
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_uniqueidprefix"><code>_.uniqueId([prefix=''])</code></h3> <h3 id="_uniqueidprefix"><code>_.uniqueId([prefix=''])</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16219 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.uniqueid "See the np m package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16267 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.uniqueid "See the np m package") [&#x24C9;][1]
Generates a unique ID. If `prefix` is given, the ID is appended to it. Generates a unique ID. If `prefix` is given, the ID is appended to it.
#### Since #### Since
0.1.0 0.1.0
#### Arguments #### Arguments
1. `[prefix='']` *(string)*: The value to prefix the ID with. 1. `[prefix='']` *(string)*: The value to prefix the ID with.
#### Returns #### Returns
skipping to change at line 11240 skipping to change at line 11240
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
## `Properties` ## `Properties`
<!-- div --> <!-- div -->
<h3 id="_version"><code>_.VERSION</code></h3> <h3 id="_version"><code>_.VERSION</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L16910 "View in source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L16958 "View in source") [&#x24C9;][1]
(string): The semantic version number. (string): The semantic version number.
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_templatesettings"><code>_.templateSettings</code></h3> <h3 id="_templatesettings"><code>_.templateSettings</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L1717 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.templatesettings "See the npm package") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L1759 "View i n source") [&#x24C3;](https://www.npmjs.com/package/lodash.templatesettings "See the npm package") [&#x24C9;][1]
(Object): By default, the template delimiters used by lodash are like those in (Object): By default, the template delimiters used by lodash are like those in
embedded Ruby *(ERB)* as well as ES2015 template strings. Change the embedded Ruby *(ERB)* as well as ES2015 template strings. Change the
following template settings to use alternative delimiters. following template settings to use alternative delimiters.
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_templatesettingsescape"><code>_.templateSettings.escape</code></h3> <h3 id="_templatesettingsescape"><code>_.templateSettings.escape</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L1725 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L1767 "View i n source") [&#x24C9;][1]
(RegExp): Used to detect `data` property values to be HTML-escaped. (RegExp): Used to detect `data` property values to be HTML-escaped.
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_templatesettingsevaluate"><code>_.templateSettings.evaluate</code></h3> <h3 id="_templatesettingsevaluate"><code>_.templateSettings.evaluate</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L1733 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L1775 "View i n source") [&#x24C9;][1]
(RegExp): Used to detect code to be evaluated. (RegExp): Used to detect code to be evaluated.
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_templatesettingsimports"><code>_.templateSettings.imports</code></h3> <h3 id="_templatesettingsimports"><code>_.templateSettings.imports</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L1757 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L1799 "View i n source") [&#x24C9;][1]
(Object): Used to import variables into the compiled template. (Object): Used to import variables into the compiled template.
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_templatesettingsinterpolate"><code>_.templateSettings.interpolate</code ></h3> <h3 id="_templatesettingsinterpolate"><code>_.templateSettings.interpolate</code ></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L1741 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L1783 "View i n source") [&#x24C9;][1]
(RegExp): Used to detect `data` property values to inject. (RegExp): Used to detect `data` property values to inject.
--- ---
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
<h3 id="_templatesettingsvariable"><code>_.templateSettings.variable</code></h3> <h3 id="_templatesettingsvariable"><code>_.templateSettings.variable</code></h3>
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L1749 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L1791 "View i n source") [&#x24C9;][1]
(string): Used to reference the data object in the template text. (string): Used to reference the data object in the template text.
--- ---
<!-- /div --> <!-- /div -->
<!-- /div --> <!-- /div -->
<!-- div --> <!-- div -->
## `Methods` ## `Methods`
<!-- div --> <!-- div -->
<h3 id="_templatesettingsimports_"><code>_.templateSettings.imports._</code></h3 > <h3 id="_templatesettingsimports_"><code>_.templateSettings.imports._</code></h3 >
[&#x24C8;](https://github.com/lodash/lodash/blob/4.17.20/lodash.js#L1765 "View i n source") [&#x24C9;][1] [&#x24C8;](https://github.com/lodash/lodash/blob/4.17.21/lodash.js#L1807 "View i n source") [&#x24C9;][1]
A reference to the `lodash` function. A reference to the `lodash` function.
--- ---
<!-- /div --> <!-- /div -->
<!-- /div --> <!-- /div -->
<!-- /div --> <!-- /div -->
 End of changes. 316 change blocks. 
316 lines changed or deleted 316 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)