mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Minor doc tweaks. [ci skip]
This commit is contained in:
242
doc/README.md
242
doc/README.md
@@ -232,7 +232,7 @@
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_compactarray"></a>`_.compact(array)`
|
||||
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4146 "View in source") [Ⓣ][1]
|
||||
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4156 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array with all falsey values removed. The values `false`, `null`, `0`, `""`, `undefined`, and `NaN` are all falsey.
|
||||
|
||||
@@ -256,7 +256,7 @@ _.compact([0, 1, false, 2, '', 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_differencearray--array"></a>`_.difference(array, [array])`
|
||||
<a href="#_differencearray--array">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4175 "View in source") [Ⓣ][1]
|
||||
<a href="#_differencearray--array">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4185 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array excluding all values of the provided arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -281,7 +281,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findindexarray--callbackidentity--thisarg"></a>`_.findIndex(array, [callback=identity], [thisArg])`
|
||||
<a href="#_findindexarray--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4225 "View in source") [Ⓣ][1]
|
||||
<a href="#_findindexarray--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4235 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.find` except that it returns the index of the first element that passes the callback check, instead of the element itself.
|
||||
|
||||
@@ -309,7 +309,7 @@ _.findIndex(['apple', 'banana', 'beet'], function(food) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findlastindexarray--callbackidentity--thisarg"></a>`_.findLastIndex(array, [callback=identity], [thisArg])`
|
||||
<a href="#_findlastindexarray--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4258 "View in source") [Ⓣ][1]
|
||||
<a href="#_findlastindexarray--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4268 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.findIndex` except that it iterates over elements of a `collection` from right to left.
|
||||
|
||||
@@ -337,7 +337,7 @@ _.findLastIndex(['apple', 'banana', 'beet'], function(food) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_firstarray--callback--thisarg"></a>`_.first(array, [callback], [thisArg])`
|
||||
<a href="#_firstarray--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4325 "View in source") [Ⓣ][1]
|
||||
<a href="#_firstarray--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4335 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the first element or first `n` elements of an array. If a callback is provided elements at the beginning of the array are returned as long as the callback returns truey. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -397,7 +397,7 @@ _.first(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_flattenarray--isshallowfalse--callbackidentity--thisarg"></a>`_.flatten(array, [isShallow=false], [callback=identity], [thisArg])`
|
||||
<a href="#_flattenarray--isshallowfalse--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4385 "View in source") [Ⓣ][1]
|
||||
<a href="#_flattenarray--isshallowfalse--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4395 "View in source") [Ⓣ][1]
|
||||
|
||||
Flattens a nested array *(the nesting can be to any depth)*. If `isShallow` is truey, the array will only be flattened a single level. If a callback is provided each element of the array is passed through the callback before flattening. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -440,7 +440,7 @@ _.flatten(stooges, 'quotes');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_indexofarray-value--fromindex0"></a>`_.indexOf(array, value, [fromIndex=0])`
|
||||
<a href="#_indexofarray-value--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4422 "View in source") [Ⓣ][1]
|
||||
<a href="#_indexofarray-value--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4432 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the index at which the first occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If the array is already sorted providing `true` for `fromIndex` will run a faster binary search.
|
||||
|
||||
@@ -472,7 +472,7 @@ _.indexOf([1, 1, 2, 2, 3, 3], 2, true);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_initialarray--callback1--thisarg"></a>`_.initial(array, [callback=1], [thisArg])`
|
||||
<a href="#_initialarray--callback1--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4488 "View in source") [Ⓣ][1]
|
||||
<a href="#_initialarray--callback1--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4498 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets all but the last element or last `n` elements of an array. If a callback is provided elements at the end of the array are excluded from the result as long as the callback returns truey. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -529,7 +529,7 @@ _.initial(food, { 'type': 'vegetable' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_intersectionarray"></a>`_.intersection([array])`
|
||||
<a href="#_intersectionarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4518 "View in source") [Ⓣ][1]
|
||||
<a href="#_intersectionarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4528 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of unique values present in all provided arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -553,7 +553,7 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_lastarray--callback--thisarg"></a>`_.last(array, [callback], [thisArg])`
|
||||
<a href="#_lastarray--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4618 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastarray--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4628 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the last element or last `n` elements of an array. If a callback is provided elements at the end of the array are returned as long as the callback returns truey. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -610,7 +610,7 @@ _.last(food, { 'type': 'vegetable' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_lastindexofarray-value--fromindexarraylength-1"></a>`_.lastIndexOf(array, value, [fromIndex=array.length-1])`
|
||||
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4657 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4667 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection.
|
||||
|
||||
@@ -639,7 +639,7 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pullarray--value"></a>`_.pull(array, [value])`
|
||||
<a href="#_pullarray--value">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4687 "View in source") [Ⓣ][1]
|
||||
<a href="#_pullarray--value">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4697 "View in source") [Ⓣ][1]
|
||||
|
||||
Removes all provided values from the given array using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -666,7 +666,7 @@ console.log(array);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_rangestart0-end--step1"></a>`_.range([start=0], end, [step=1])`
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4738 "View in source") [Ⓣ][1]
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4748 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `end`. If `start` is less than `stop` a zero-length range is created unless a negative `step` is specified.
|
||||
|
||||
@@ -707,7 +707,7 @@ _.range(0);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_removearray--callbackidentity--thisarg"></a>`_.remove(array, [callback=identity], [thisArg])`
|
||||
<a href="#_removearray--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4791 "View in source") [Ⓣ][1]
|
||||
<a href="#_removearray--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4801 "View in source") [Ⓣ][1]
|
||||
|
||||
Removes all elements from an array that the callback returns truey for and returns an array of removed elements. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -743,7 +743,7 @@ console.log(evens);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_restarray--callback1--thisarg"></a>`_.rest(array, [callback=1], [thisArg])`
|
||||
<a href="#_restarray--callback1--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4865 "View in source") [Ⓣ][1]
|
||||
<a href="#_restarray--callback1--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4875 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.initial` this method gets all but the first element or first `n` elements of an array. If a callback function is provided elements at the beginning of the array are excluded from the result as long as the callback returns truey. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -803,7 +803,7 @@ _.rest(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sortedindexarray-value--callbackidentity--thisarg"></a>`_.sortedIndex(array, value, [callback=identity], [thisArg])`
|
||||
<a href="#_sortedindexarray-value--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4929 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortedindexarray-value--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4939 "View in source") [Ⓣ][1]
|
||||
|
||||
Uses a binary search to determine the smallest index at which a value should be inserted into a given sorted array in order to maintain the sort order of the array. If a callback is provided it will be executed for `value` and each element of `array` to compute their sort ranking. The callback is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -852,7 +852,7 @@ _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unionarray"></a>`_.union([array])`
|
||||
<a href="#_unionarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4960 "View in source") [Ⓣ][1]
|
||||
<a href="#_unionarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4970 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of unique values, in order, of the provided arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -876,7 +876,7 @@ _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_uniqarray--issortedfalse--callbackidentity--thisarg"></a>`_.uniq(array, [isSorted=false], [callback=identity], [thisArg])`
|
||||
<a href="#_uniqarray--issortedfalse--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5008 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqarray--issortedfalse--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5018 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a duplicate-value-free version of an array using strict equality for comparisons, i.e. `===`. If the array is sorted, providing `true` for `isSorted` will use a faster algorithm. If a callback is provided each element of `array` is passed through the callback before uniqueness is computed. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -923,7 +923,7 @@ _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_withoutarray--value"></a>`_.without(array, [value])`
|
||||
<a href="#_withoutarray--value">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5036 "View in source") [Ⓣ][1]
|
||||
<a href="#_withoutarray--value">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5046 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array excluding all provided values using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -948,7 +948,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_ziparray"></a>`_.zip([array])`
|
||||
<a href="#_ziparray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5056 "View in source") [Ⓣ][1]
|
||||
<a href="#_ziparray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5066 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the second elements of the given arrays, and so on.
|
||||
|
||||
@@ -975,7 +975,7 @@ _.zip(['moe', 'larry'], [30, 40], [true, false]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_zipobjectkeys--values"></a>`_.zipObject(keys, [values=[]])`
|
||||
<a href="#_zipobjectkeys--values">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5086 "View in source") [Ⓣ][1]
|
||||
<a href="#_zipobjectkeys--values">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5096 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed from arrays of `keys` and `values`. Provide either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` or two arrays, one of `keys` and one of corresponding `values`.
|
||||
|
||||
@@ -1063,9 +1063,9 @@ _.isArray(squares.value());
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_chainvalue"></a>`_.chain(value)`
|
||||
<a href="#_chainvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6285 "View in source") [Ⓣ][1]
|
||||
<a href="#_chainvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6295 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a `lodash` object that wraps the given `value`.
|
||||
Creates a `lodash` object that wraps the given value.
|
||||
|
||||
#### Arguments
|
||||
1. `value` *(\*)*: The value to wrap.
|
||||
@@ -1096,7 +1096,7 @@ var youngest = _.chain(stooges)
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6313 "View in source") [Ⓣ][1]
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6323 "View in source") [Ⓣ][1]
|
||||
|
||||
Invokes `interceptor` with the `value` as the first argument and then returns `value`. The purpose of this method is to "tap into" a method chain in order to perform operations on intermediate results within the chain.
|
||||
|
||||
@@ -1126,7 +1126,7 @@ _([1, 2, 3, 4])
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypechain"></a>`_.prototype.chain()`
|
||||
<a href="#_prototypechain">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6333 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypechain">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6343 "View in source") [Ⓣ][1]
|
||||
|
||||
Enables method chaining on the wrapper object.
|
||||
|
||||
@@ -1150,7 +1150,7 @@ var sum = _([1, 2, 3])
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypetostring"></a>`_.prototype.toString()`
|
||||
<a href="#_prototypetostring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6350 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypetostring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6360 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces the `toString` result of the wrapped value.
|
||||
|
||||
@@ -1171,7 +1171,7 @@ _([1, 2, 3]).toString();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypevalueof"></a>`_.prototype.valueOf()`
|
||||
<a href="#_prototypevalueof">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6367 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypevalueof">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6377 "View in source") [Ⓣ][1]
|
||||
|
||||
Extracts the wrapped value.
|
||||
|
||||
@@ -1202,7 +1202,7 @@ _([1, 2, 3]).valueOf();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_atcollection--index"></a>`_.at(collection, [index])`
|
||||
<a href="#_atcollection--index">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3002 "View in source") [Ⓣ][1]
|
||||
<a href="#_atcollection--index">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3012 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of elements from the specified indexes, or keys, of the `collection`. Indexes may be specified as individual arguments or as arrays of indexes.
|
||||
|
||||
@@ -1230,7 +1230,7 @@ _.at(['moe', 'larry', 'curly'], 0, 2);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_containscollection-target--fromindex0"></a>`_.contains(collection, target, [fromIndex=0])`
|
||||
<a href="#_containscollection-target--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3045 "View in source") [Ⓣ][1]
|
||||
<a href="#_containscollection-target--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3055 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a given value is present in a collection using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection.
|
||||
|
||||
@@ -1268,7 +1268,7 @@ _.contains('curly', 'ur');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_countbycollection--callbackidentity--thisarg"></a>`_.countBy(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_countbycollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3100 "View in source") [Ⓣ][1]
|
||||
<a href="#_countbycollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3110 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of keys generated from the results of running each element of `collection` through the callback. The corresponding value of each key is the number of times the key was returned by the callback. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1304,7 +1304,7 @@ _.countBy(['one', 'two', 'three'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_everycollection--callbackidentity--thisarg"></a>`_.every(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_everycollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3145 "View in source") [Ⓣ][1]
|
||||
<a href="#_everycollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3155 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the given callback returns truey value for **all** elements of a collection. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1350,7 +1350,7 @@ _.every(stooges, { 'age': 50 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_filtercollection--callbackidentity--thisarg"></a>`_.filter(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_filtercollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3206 "View in source") [Ⓣ][1]
|
||||
<a href="#_filtercollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3216 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over elements of a collection, returning an array of all elements the callback returns truey for. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1396,7 +1396,7 @@ _.filter(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findcollection--callbackidentity--thisarg"></a>`_.find(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_findcollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3273 "View in source") [Ⓣ][1]
|
||||
<a href="#_findcollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3283 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over elements of a collection, returning the first element that the callback returns truey for. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1445,7 +1445,7 @@ _.find(food, 'organic');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findlastcollection--callbackidentity--thisarg"></a>`_.findLast(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_findlastcollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3318 "View in source") [Ⓣ][1]
|
||||
<a href="#_findlastcollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3328 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.find` except that it iterates over elements of a `collection` from right to left.
|
||||
|
||||
@@ -1473,7 +1473,7 @@ _.findLast([1, 2, 3, 4], function(num) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_foreachcollection--callbackidentity--thisarg"></a>`_.forEach(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_foreachcollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3352 "View in source") [Ⓣ][1]
|
||||
<a href="#_foreachcollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3362 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over elements of a collection, executing the callback for each element. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -1505,7 +1505,7 @@ _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_foreachrightcollection--callbackidentity--thisarg"></a>`_.forEachRight(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_foreachrightcollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3385 "View in source") [Ⓣ][1]
|
||||
<a href="#_foreachrightcollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3395 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.forEach` except that it iterates over elements of a `collection` from right to left.
|
||||
|
||||
@@ -1534,7 +1534,7 @@ _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(',');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_groupbycollection--callbackidentity--thisarg"></a>`_.groupBy(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_groupbycollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3446 "View in source") [Ⓣ][1]
|
||||
<a href="#_groupbycollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3456 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of keys generated from the results of running each element of a collection through the callback. The corresponding value of each key is an array of the elements responsible for generating the key. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1571,7 +1571,7 @@ _.groupBy(['one', 'two', 'three'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_indexbycollection--callbackidentity--thisarg"></a>`_.indexBy(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_indexbycollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3489 "View in source") [Ⓣ][1]
|
||||
<a href="#_indexbycollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3499 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of keys generated from the results of running each element of the collection through the given callback. The corresponding value of each key is the last element responsible for generating the key. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1612,7 +1612,7 @@ _.indexBy(stooges, function(key) { this.fromCharCode(key.code); }, String);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_invokecollection-methodname--arg"></a>`_.invoke(collection, methodName, [arg])`
|
||||
<a href="#_invokecollection-methodname--arg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3515 "View in source") [Ⓣ][1]
|
||||
<a href="#_invokecollection-methodname--arg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3525 "View in source") [Ⓣ][1]
|
||||
|
||||
Invokes the method named by `methodName` on each element in the `collection` returning an array of the results of each invoked method. Additional arguments will be provided to each invoked method. If `methodName` is a function it will be invoked for, and `this` bound to, each element in the `collection`.
|
||||
|
||||
@@ -1641,7 +1641,7 @@ _.invoke([123, 456], String.prototype.split, '');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mapcollection--callbackidentity--thisarg"></a>`_.map(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_mapcollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3567 "View in source") [Ⓣ][1]
|
||||
<a href="#_mapcollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3577 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of values by running each element in the collection through the callback. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1686,7 +1686,7 @@ _.map(stooges, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_maxcollection--callbackidentity--thisarg"></a>`_.max(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_maxcollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3624 "View in source") [Ⓣ][1]
|
||||
<a href="#_maxcollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3634 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the maximum value of an array. If a callback is provided it will be executed for each value in the array to generate the criterion by which the value is ranked. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
||||
|
||||
@@ -1728,7 +1728,7 @@ _.max(stooges, 'age');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mincollection--callbackidentity--thisarg"></a>`_.min(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_mincollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3693 "View in source") [Ⓣ][1]
|
||||
<a href="#_mincollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3703 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the minimum value of an array. If a callback is provided it will be executed for each value in the array to generate the criterion by which the value is ranked. The callback is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
||||
|
||||
@@ -1770,7 +1770,7 @@ _.min(stooges, 'age');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pluckcollection-property"></a>`_.pluck(collection, property)`
|
||||
<a href="#_pluckcollection-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3743 "View in source") [Ⓣ][1]
|
||||
<a href="#_pluckcollection-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3753 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the value of a specified property from all elements in the `collection`.
|
||||
|
||||
@@ -1800,7 +1800,7 @@ _.pluck(stooges, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_reducecollection--callbackidentity--accumulator--thisarg"></a>`_.reduce(collection, [callback=identity], [accumulator], [thisArg])`
|
||||
<a href="#_reducecollection--callbackidentity--accumulator--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3775 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducecollection--callbackidentity--accumulator--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3785 "View in source") [Ⓣ][1]
|
||||
|
||||
Reduces a collection to a value which is the accumulated result of running each element in the collection through the callback, where each successive callback execution consumes the return value of the previous execution. If `accumulator` is not provided the first element of the collection will be used as the initial `accumulator` value. The callback is bound to `thisArg` and invoked with four arguments; *(accumulator, value, index|key, collection)*.
|
||||
|
||||
@@ -1838,7 +1838,7 @@ var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_reducerightcollection--callbackidentity--accumulator--thisarg"></a>`_.reduceRight(collection, [callback=identity], [accumulator], [thisArg])`
|
||||
<a href="#_reducerightcollection--callbackidentity--accumulator--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3818 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducerightcollection--callbackidentity--accumulator--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3828 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.reduce` except that it iterates over elements of a `collection` from right to left.
|
||||
|
||||
@@ -1869,7 +1869,7 @@ var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_rejectcollection--callbackidentity--thisarg"></a>`_.reject(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_rejectcollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3867 "View in source") [Ⓣ][1]
|
||||
<a href="#_rejectcollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3877 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.filter` this method returns the elements of a collection that the callback does **not** return truey for.
|
||||
|
||||
@@ -1912,7 +1912,7 @@ _.reject(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_samplecollection--n"></a>`_.sample(collection, [n])`
|
||||
<a href="#_samplecollection--n">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3893 "View in source") [Ⓣ][1]
|
||||
<a href="#_samplecollection--n">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3903 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves a random element or `n` random elements from a collection.
|
||||
|
||||
@@ -1940,7 +1940,7 @@ _.sample([1, 2, 3, 4], 2);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_shufflecollection"></a>`_.shuffle(collection)`
|
||||
<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3922 "View in source") [Ⓣ][1]
|
||||
<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3932 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of shuffled values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
|
||||
|
||||
@@ -1964,7 +1964,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sizecollection"></a>`_.size(collection)`
|
||||
<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3955 "View in source") [Ⓣ][1]
|
||||
<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3965 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the size of the `collection` by returning `collection.length` for arrays and array-like objects or the number of own enumerable properties for objects.
|
||||
|
||||
@@ -1994,7 +1994,7 @@ _.size('curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_somecollection--callbackidentity--thisarg"></a>`_.some(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_somecollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4002 "View in source") [Ⓣ][1]
|
||||
<a href="#_somecollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4012 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the callback returns a truey value for **any** element of a collection. The function returns as soon as it finds a passing value and does not iterate over the entire collection. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -2040,7 +2040,7 @@ _.some(food, { 'type': 'meat' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sortbycollection--callbackidentity--thisarg"></a>`_.sortBy(collection, [callback=identity], [thisArg])`
|
||||
<a href="#_sortbycollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4058 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortbycollection--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4068 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of elements, sorted in ascending order by the results of running each element in a collection through the callback. This method performs a stable sort, that is, it will preserve the original sort order of equal elements. The callback is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -2077,7 +2077,7 @@ _.sortBy(['banana', 'strawberry', 'apple'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_toarraycollection"></a>`_.toArray(collection)`
|
||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4094 "View in source") [Ⓣ][1]
|
||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4104 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the `collection` to an array.
|
||||
|
||||
@@ -2101,7 +2101,7 @@ Converts the `collection` to an array.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wherecollection-properties"></a>`_.where(collection, properties)`
|
||||
<a href="#_wherecollection-properties">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4128 "View in source") [Ⓣ][1]
|
||||
<a href="#_wherecollection-properties">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4138 "View in source") [Ⓣ][1]
|
||||
|
||||
Performs a deep comparison of each element in a `collection` to the given `properties` object, returning an array of all elements that have equivalent property values.
|
||||
|
||||
@@ -2110,7 +2110,7 @@ Performs a deep comparison of each element in a `collection` to the given `prope
|
||||
2. `properties` *(Object)*: The object of property values to filter by.
|
||||
|
||||
#### Returns
|
||||
*(Array)*: Returns a new array of elements that have the given `properties`.
|
||||
*(Array)*: Returns a new array of elements that have the given properties.
|
||||
|
||||
#### Example
|
||||
```js
|
||||
@@ -2141,7 +2141,7 @@ _.where(stooges, { 'quotes': ['Poifect!'] });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_aftern-func"></a>`_.after(n, func)`
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5128 "View in source") [Ⓣ][1]
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5138 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that executes `func`, with the `this` binding and arguments of the created function, only after being called `n` times.
|
||||
|
||||
@@ -2174,7 +2174,7 @@ _.forEach(saves, function(type) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindfunc--thisarg--arg"></a>`_.bind(func, [thisArg], [arg])`
|
||||
<a href="#_bindfunc--thisarg--arg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5161 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindfunc--thisarg--arg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5171 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those provided to the bound function.
|
||||
|
||||
@@ -2205,7 +2205,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindallobject--methodname"></a>`_.bindAll(object, [methodName])`
|
||||
<a href="#_bindallobject--methodname">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5191 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindallobject--methodname">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5201 "View in source") [Ⓣ][1]
|
||||
|
||||
Binds methods of an object to the object itself, overwriting the existing method. Method names may be specified as individual arguments or as arrays of method names. If no method names are provided all the function properties of `object` will be bound.
|
||||
|
||||
@@ -2236,7 +2236,7 @@ jQuery('#docs').on('click', view.onClick);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindkeyobject-key--arg"></a>`_.bindKey(object, key, [arg])`
|
||||
<a href="#_bindkeyobject-key--arg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5237 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindkeyobject-key--arg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5247 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes the method at `object[key]` and prepends any additional `bindKey` arguments to those provided to the bound function. This method differs from `_.bind` by allowing bound functions to reference methods that will be redefined or don't yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern.
|
||||
|
||||
@@ -2277,7 +2277,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_composefunc"></a>`_.compose([func])`
|
||||
<a href="#_composefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5273 "View in source") [Ⓣ][1]
|
||||
<a href="#_composefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5283 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that is the composition of the provided functions, where each function consumes the return value of the function that follows. For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. Each function is executed with the `this` binding of the composed function.
|
||||
|
||||
@@ -2315,7 +2315,7 @@ welcome('curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_createcallbackfuncidentity--thisarg--argcount"></a>`_.createCallback([func=identity], [thisArg], [argCount])`
|
||||
<a href="#_createcallbackfuncidentity--thisarg--argcount">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5324 "View in source") [Ⓣ][1]
|
||||
<a href="#_createcallbackfuncidentity--thisarg--argcount">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5334 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a callback bound to an optional `thisArg`. If `func` is a property name the created callback will return the property value for a given element. If `func` is an object the created callback will return `true` for elements that contain the equivalent object properties, otherwise it will return `false`.
|
||||
|
||||
@@ -2354,7 +2354,7 @@ _.filter(stooges, 'age__gt45');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_curryfunc--arityfunclength"></a>`_.curry(func, [arity=func.length])`
|
||||
<a href="#_curryfunc--arityfunclength">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5389 "View in source") [Ⓣ][1]
|
||||
<a href="#_curryfunc--arityfunclength">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5399 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function which accepts one or more arguments of `func` that when invoked either executes `func` returning its result, if all `func` arguments have been provided, or returns a function that accepts one or more of the remaining `func` arguments, and so on. The arity of `func` can be specified if `func.length` is not sufficient.
|
||||
|
||||
@@ -2389,7 +2389,7 @@ curried(1, 2, 3);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_debouncefunc-wait--options--optionsmaxwait"></a>`_.debounce(func, wait, [options], [options.maxWait])`
|
||||
<a href="#_debouncefunc-wait--options--optionsmaxwait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5433 "View in source") [Ⓣ][1]
|
||||
<a href="#_debouncefunc-wait--options--optionsmaxwait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5443 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Provide an options object to indicate that `func` should be invoked on the leading and/or trailing edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
|
||||
|
||||
@@ -2433,7 +2433,7 @@ source.addEventListener('message', _.debounce(batchLog, 250, {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_deferfunc--arg"></a>`_.defer(func, [arg])`
|
||||
<a href="#_deferfunc--arg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5534 "View in source") [Ⓣ][1]
|
||||
<a href="#_deferfunc--arg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5544 "View in source") [Ⓣ][1]
|
||||
|
||||
Defers executing the `func` function until the current call stack has cleared. Additional arguments will be provided to `func` when it is invoked.
|
||||
|
||||
@@ -2458,7 +2458,7 @@ _.defer(function() { console.log('deferred'); });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_delayfunc-wait--arg"></a>`_.delay(func, wait, [arg])`
|
||||
<a href="#_delayfunc-wait--arg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5568 "View in source") [Ⓣ][1]
|
||||
<a href="#_delayfunc-wait--arg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5578 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `func` function after `wait` milliseconds. Additional arguments will be provided to `func` when it is invoked.
|
||||
|
||||
@@ -2485,7 +2485,7 @@ _.delay(log, 1000, 'logged later');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_memoizefunc--resolver"></a>`_.memoize(func, [resolver])`
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5610 "View in source") [Ⓣ][1]
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5620 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that memoizes the result of `func`. If `resolver` is provided it will be used to determine the cache key for storing the result based on the arguments provided to the memoized function. By default, the first argument provided to the memoized function is used as the cache key. The `func` is executed with the `this` binding of the memoized function. The result cache is exposed as the `cache` property on the memoized function.
|
||||
|
||||
@@ -2525,7 +2525,7 @@ stooge('curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_oncefunc"></a>`_.once(func)`
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5643 "View in source") [Ⓣ][1]
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5653 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that is restricted to execute `func` once. Repeat calls to the function will return the value of the first call. The `func` is executed with the `this` binding of the created function.
|
||||
|
||||
@@ -2551,7 +2551,7 @@ initialize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialfunc--arg"></a>`_.partial(func, [arg])`
|
||||
<a href="#_partialfunc--arg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5681 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialfunc--arg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5691 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those provided to the new function. This method is similar to `_.bind` except it does **not** alter the `this` binding.
|
||||
|
||||
@@ -2578,7 +2578,7 @@ hi('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialrightfunc--arg"></a>`_.partialRight(func, [arg])`
|
||||
<a href="#_partialrightfunc--arg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5712 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialrightfunc--arg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5722 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.partial` except that `partial` arguments are appended to those provided to the new function.
|
||||
|
||||
@@ -2615,7 +2615,7 @@ options.imports
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_throttlefunc-wait--options"></a>`_.throttle(func, wait, [options])`
|
||||
<a href="#_throttlefunc-wait--options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5747 "View in source") [Ⓣ][1]
|
||||
<a href="#_throttlefunc-wait--options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5757 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. Provide an options object to indicate that `func` should be invoked on the leading and/or trailing edge of the `wait` timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
|
||||
|
||||
@@ -2651,7 +2651,7 @@ jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wrapvalue-wrapper"></a>`_.wrap(value, wrapper)`
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5791 "View in source") [Ⓣ][1]
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5801 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that provides `value` to the wrapper function as its first argument. Additional arguments provided to the function are appended to those provided to the wrapper function. The wrapper is executed with the `this` binding of the created function.
|
||||
|
||||
@@ -2687,7 +2687,7 @@ hello();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_assignobject--source--callback--thisarg"></a>`_.assign(object, [source], [callback], [thisArg])`
|
||||
<a href="#_assignobject--source--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1928 "View in source") [Ⓣ][1]
|
||||
<a href="#_assignobject--source--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1938 "View in source") [Ⓣ][1]
|
||||
|
||||
Assigns own enumerable properties of source object(s) to the destination object. Subsequent sources will overwrite property assignments of previous sources. If a callback is provided it will be executed to produce the assigned values. The callback is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*.
|
||||
|
||||
@@ -2725,7 +2725,7 @@ defaults(food, { 'name': 'banana', 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_clonevalue--deepfalse--callback--thisarg"></a>`_.clone(value, [deep=false], [callback], [thisArg])`
|
||||
<a href="#_clonevalue--deepfalse--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1981 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonevalue--deepfalse--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1991 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a clone of `value`. If `deep` is `true` nested objects will also be cloned, otherwise they will be assigned by reference. If a callback is provided it will be executed to produce the cloned values. If the callback returns `undefined` cloning will be handled by the method instead. The callback is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -2772,7 +2772,7 @@ clone.childNodes.length;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_clonedeepvalue--callback--thisarg"></a>`_.cloneDeep(value, [callback], [thisArg])`
|
||||
<a href="#_clonedeepvalue--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2033 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonedeepvalue--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2043 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a deep clone of `value`. If a callback is provided it will be executed to produce the cloned values. If the callback returns `undefined` cloning will be handled by the method instead. The callback is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -2818,7 +2818,7 @@ clone.node == view.node;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_defaultsobject--source"></a>`_.defaults(object, [source])`
|
||||
<a href="#_defaultsobject--source">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2057 "View in source") [Ⓣ][1]
|
||||
<a href="#_defaultsobject--source">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2067 "View in source") [Ⓣ][1]
|
||||
|
||||
Assigns own enumerable properties of source object(s) to the destination object for all destination properties that resolve to `undefined`. Once a property is set, additional defaults of the same property will be ignored.
|
||||
|
||||
@@ -2844,7 +2844,7 @@ _.defaults(food, { 'name': 'banana', 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findkeyobject--callbackidentity--thisarg"></a>`_.findKey(object, [callback=identity], [thisArg])`
|
||||
<a href="#_findkeyobject--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2079 "View in source") [Ⓣ][1]
|
||||
<a href="#_findkeyobject--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2089 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.findIndex` except that it returns the key of the first element that passes the callback check, instead of the element itself.
|
||||
|
||||
@@ -2872,7 +2872,7 @@ _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findlastkeyobject--callbackidentity--thisarg"></a>`_.findLastKey(object, [callback=identity], [thisArg])`
|
||||
<a href="#_findlastkeyobject--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2111 "View in source") [Ⓣ][1]
|
||||
<a href="#_findlastkeyobject--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2121 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.findKey` except that it iterates over elements of a `collection` in the opposite order.
|
||||
|
||||
@@ -2900,7 +2900,7 @@ _.findLastKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forinobject--callbackidentity--thisarg"></a>`_.forIn(object, [callback=identity], [thisArg])`
|
||||
<a href="#_forinobject--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2152 "View in source") [Ⓣ][1]
|
||||
<a href="#_forinobject--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2162 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over own and inherited enumerable properties of an object, executing the callback for each property. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -2936,7 +2936,7 @@ _.forIn(new Dog('Dagny'), function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forinrightobject--callbackidentity--thisarg"></a>`_.forInRight(object, [callback=identity], [thisArg])`
|
||||
<a href="#_forinrightobject--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2182 "View in source") [Ⓣ][1]
|
||||
<a href="#_forinrightobject--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2192 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.forIn` except that it iterates over elements of a `collection` in the opposite order.
|
||||
|
||||
@@ -2972,7 +2972,7 @@ _.forInRight(new Dog('Dagny'), function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forownobject--callbackidentity--thisarg"></a>`_.forOwn(object, [callback=identity], [thisArg])`
|
||||
<a href="#_forownobject--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2220 "View in source") [Ⓣ][1]
|
||||
<a href="#_forownobject--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2230 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over own enumerable properties of an object, executing the callback for each property. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -3000,7 +3000,7 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forownrightobject--callbackidentity--thisarg"></a>`_.forOwnRight(object, [callback=identity], [thisArg])`
|
||||
<a href="#_forownrightobject--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2240 "View in source") [Ⓣ][1]
|
||||
<a href="#_forownrightobject--callbackidentity--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2250 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is like `_.forOwn` except that it iterates over elements of a `collection` in the opposite order.
|
||||
|
||||
@@ -3028,7 +3028,7 @@ _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_functionsobject"></a>`_.functions(object)`
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2269 "View in source") [Ⓣ][1]
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2279 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a sorted array of property names of all enumerable properties, own and inherited, of `object` that have function values.
|
||||
|
||||
@@ -3055,7 +3055,7 @@ _.functions(_);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_hasobject-property"></a>`_.has(object, property)`
|
||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2294 "View in source") [Ⓣ][1]
|
||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2304 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
|
||||
|
||||
@@ -3080,7 +3080,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_invertobject"></a>`_.invert(object)`
|
||||
<a href="#_invertobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2311 "View in source") [Ⓣ][1]
|
||||
<a href="#_invertobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2321 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of the inverted keys and values of the given object.
|
||||
|
||||
@@ -3104,7 +3104,7 @@ _.invert({ 'first': 'moe', 'second': 'larry' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isargumentsvalue"></a>`_.isArguments(value)`
|
||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1756 "View in source") [Ⓣ][1]
|
||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1766 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an `arguments` object.
|
||||
|
||||
@@ -3131,7 +3131,7 @@ _.isArguments([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isarrayvalue"></a>`_.isArray(value)`
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1783 "View in source") [Ⓣ][1]
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1793 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an array.
|
||||
|
||||
@@ -3158,7 +3158,7 @@ _.isArray([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isbooleanvalue"></a>`_.isBoolean(value)`
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2337 "View in source") [Ⓣ][1]
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2347 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a boolean value.
|
||||
|
||||
@@ -3182,7 +3182,7 @@ _.isBoolean(null);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isdatevalue"></a>`_.isDate(value)`
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2354 "View in source") [Ⓣ][1]
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2364 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a date.
|
||||
|
||||
@@ -3206,7 +3206,7 @@ _.isDate(new Date);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_iselementvalue"></a>`_.isElement(value)`
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2371 "View in source") [Ⓣ][1]
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2381 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a DOM element.
|
||||
|
||||
@@ -3230,7 +3230,7 @@ _.isElement(document.body);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2396 "View in source") [Ⓣ][1]
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2406 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is empty. Arrays, strings, or `arguments` objects with a length of `0` and objects with no own enumerable properties are considered "empty".
|
||||
|
||||
@@ -3260,7 +3260,7 @@ _.isEmpty('');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isequala-b--callback--thisarg"></a>`_.isEqual(a, b, [callback], [thisArg])`
|
||||
<a href="#_isequala-b--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2453 "View in source") [Ⓣ][1]
|
||||
<a href="#_isequala-b--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2463 "View in source") [Ⓣ][1]
|
||||
|
||||
Performs a deep comparison between two values to determine if they are equivalent to each other. If a callback is provided it will be executed to compare values. If the callback returns `undefined` comparisons will be handled by the method instead. The callback is bound to `thisArg` and invoked with two arguments; *(a, b)*.
|
||||
|
||||
@@ -3305,7 +3305,7 @@ _.isEqual(words, otherWords, function(a, b) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isfinitevalue"></a>`_.isFinite(value)`
|
||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2485 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2495 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is, or can be coerced to, a finite number.
|
||||
|
||||
@@ -3343,7 +3343,7 @@ _.isFinite(Infinity);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isfunctionvalue"></a>`_.isFunction(value)`
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2502 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2512 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a function.
|
||||
|
||||
@@ -3367,7 +3367,7 @@ _.isFunction(_);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnanvalue"></a>`_.isNaN(value)`
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2565 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2575 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `NaN`.
|
||||
|
||||
@@ -3402,7 +3402,7 @@ _.isNaN(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnullvalue"></a>`_.isNull(value)`
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2587 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2597 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `null`.
|
||||
|
||||
@@ -3429,7 +3429,7 @@ _.isNull(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnumbervalue"></a>`_.isNumber(value)`
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2606 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2616 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a number.
|
||||
|
||||
@@ -3455,7 +3455,7 @@ _.isNumber(8.4 * 5);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isobjectvalue"></a>`_.isObject(value)`
|
||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2532 "View in source") [Ⓣ][1]
|
||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2542 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is the language type of Object. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)*
|
||||
|
||||
@@ -3485,7 +3485,7 @@ _.isObject(1);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isplainobjectvalue"></a>`_.isPlainObject(value)`
|
||||
<a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2634 "View in source") [Ⓣ][1]
|
||||
<a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2644 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an object created by the `Object` constructor.
|
||||
|
||||
@@ -3520,7 +3520,7 @@ _.isPlainObject({ 'name': 'moe', 'age': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isregexpvalue"></a>`_.isRegExp(value)`
|
||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2659 "View in source") [Ⓣ][1]
|
||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2669 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a regular expression.
|
||||
|
||||
@@ -3544,7 +3544,7 @@ _.isRegExp(/moe/);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isstringvalue"></a>`_.isString(value)`
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2676 "View in source") [Ⓣ][1]
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2686 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a string.
|
||||
|
||||
@@ -3568,7 +3568,7 @@ _.isString('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isundefinedvalue"></a>`_.isUndefined(value)`
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2693 "View in source") [Ⓣ][1]
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2703 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `undefined`.
|
||||
|
||||
@@ -3592,7 +3592,7 @@ _.isUndefined(void 0);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_keysobject"></a>`_.keys(object)`
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1816 "View in source") [Ⓣ][1]
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1826 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property names of an object.
|
||||
|
||||
@@ -3616,7 +3616,7 @@ _.keys({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mergeobject--source--callback--thisarg"></a>`_.merge(object, [source], [callback], [thisArg])`
|
||||
<a href="#_mergeobject--source--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2748 "View in source") [Ⓣ][1]
|
||||
<a href="#_mergeobject--source--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2758 "View in source") [Ⓣ][1]
|
||||
|
||||
Recursively merges own enumerable properties of the source object(s), that don't resolve to `undefined` into the destination object. Subsequent sources will overwrite property assignments of previous sources. If a callback is provided it will be executed to produce the merged values of the destination and source properties. If the callback returns `undefined` merging will be handled by the method instead. The callback is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*.
|
||||
|
||||
@@ -3672,7 +3672,7 @@ _.merge(food, otherFood, function(a, b) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_omitobject--callback--thisarg"></a>`_.omit(object, [callback], [thisArg])`
|
||||
<a href="#_omitobject--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2804 "View in source") [Ⓣ][1]
|
||||
<a href="#_omitobject--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2814 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a shallow clone of `object` excluding the specified properties. Property names may be specified as individual arguments or as arrays of property names. If a callback is provided it will be executed for each property of `object` omitting the properties the callback returns truey for. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
|
||||
|
||||
@@ -3703,7 +3703,7 @@ _.omit({ 'name': 'moe', 'age': 40 }, function(value) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pairsobject"></a>`_.pairs(object)`
|
||||
<a href="#_pairsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2839 "View in source") [Ⓣ][1]
|
||||
<a href="#_pairsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2849 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a two dimensional array of an object's key-value pairs, i.e. `[[key1, value1], [key2, value2]]`.
|
||||
|
||||
@@ -3727,7 +3727,7 @@ _.pairs({ 'moe': 30, 'larry': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pickobject--callback--thisarg"></a>`_.pick(object, [callback], [thisArg])`
|
||||
<a href="#_pickobject--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2879 "View in source") [Ⓣ][1]
|
||||
<a href="#_pickobject--callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2889 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a shallow clone of `object` composed of the specified properties. Property names may be specified as individual arguments or as arrays of property names. If a callback is provided it will be executed for each property of `object` picking the properties the callback returns truey for. The callback is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
|
||||
|
||||
@@ -3758,7 +3758,7 @@ _.pick({ 'name': 'moe', '_userid': 'moe1' }, function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_transformcollection--callbackidentity--accumulator--thisarg"></a>`_.transform(collection, [callback=identity], [accumulator], [thisArg])`
|
||||
<a href="#_transformcollection--callbackidentity--accumulator--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2934 "View in source") [Ⓣ][1]
|
||||
<a href="#_transformcollection--callbackidentity--accumulator--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2944 "View in source") [Ⓣ][1]
|
||||
|
||||
An alternative to `_.reduce` this method transforms `object` to a new `accumulator` object which is the result of running each of its elements through a callback, with each callback execution potentially mutating the `accumulator` object. The callback is bound to `thisArg` and invoked with four arguments; *(accumulator, value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -3795,7 +3795,7 @@ var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key)
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_valuesobject"></a>`_.values(object)`
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2967 "View in source") [Ⓣ][1]
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2977 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property values of `object`.
|
||||
|
||||
@@ -3826,7 +3826,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_escapestring"></a>`_.escape(string)`
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5818 "View in source") [Ⓣ][1]
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5828 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities.
|
||||
|
||||
@@ -3850,7 +3850,7 @@ _.escape('Moe, Larry & Curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_identityvalue"></a>`_.identity(value)`
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5836 "View in source") [Ⓣ][1]
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5846 "View in source") [Ⓣ][1]
|
||||
|
||||
This method returns the first argument provided to it.
|
||||
|
||||
@@ -3875,7 +3875,7 @@ moe === _.identity(moe);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mixinobject-object"></a>`_.mixin(object, object)`
|
||||
<a href="#_mixinobject-object">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5863 "View in source") [Ⓣ][1]
|
||||
<a href="#_mixinobject-object">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5873 "View in source") [Ⓣ][1]
|
||||
|
||||
Adds function properties of a source object to the `lodash` function and chainable wrapper.
|
||||
|
||||
@@ -3906,7 +3906,7 @@ _('moe').capitalize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_noconflict"></a>`_.noConflict()`
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5901 "View in source") [Ⓣ][1]
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5911 "View in source") [Ⓣ][1]
|
||||
|
||||
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
|
||||
|
||||
@@ -3926,9 +3926,9 @@ var lodash = _.noConflict();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_parseintvalue--radix"></a>`_.parseInt(value, [radix])`
|
||||
<a href="#_parseintvalue--radix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5925 "View in source") [Ⓣ][1]
|
||||
<a href="#_parseintvalue--radix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5935 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the given `value` into an integer of the specified `radix`. If `radix` is `undefined` or `0` a `radix` of `10` is used unless the `value` is a hexadecimal, in which case a `radix` of `16` is used.
|
||||
Converts the given value into an integer of the specified radix. If `radix` is `undefined` or `0` a `radix` of `10` is used unless the `value` is a hexadecimal, in which case a `radix` of `16` is used.
|
||||
|
||||
Note: This method avoids differences in native ES3 and ES5 `parseInt` implementations. See http://es5.github.io/#E.
|
||||
|
||||
@@ -3953,7 +3953,7 @@ _.parseInt('08');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_randommin0--max1"></a>`_.random([min=0], [max=1])`
|
||||
<a href="#_randommin0--max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5949 "View in source") [Ⓣ][1]
|
||||
<a href="#_randommin0--max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5959 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a random number between `min` and `max` *(inclusive)*. If only one argument is provided a number between `0` and the given number will be returned.
|
||||
|
||||
@@ -3981,7 +3981,7 @@ _.random(5);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_resultobject-property"></a>`_.result(object, property)`
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5993 "View in source") [Ⓣ][1]
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6003 "View in source") [Ⓣ][1]
|
||||
|
||||
Resolves the value of `property` on `object`. If `property` is a function it will be invoked with the `this` binding of `object` and its result returned, else the property value is returned. If `object` is falsey then `undefined` is returned.
|
||||
|
||||
@@ -4018,7 +4018,7 @@ _.result(object, 'stuff');
|
||||
### <a id="_runincontextcontextroot"></a>`_.runInContext([context=root])`
|
||||
<a href="#_runincontextcontextroot">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L452 "View in source") [Ⓣ][1]
|
||||
|
||||
Create a new `lodash` function using the given `context` object.
|
||||
Create a new `lodash` function using the given context object.
|
||||
|
||||
#### Arguments
|
||||
1. `[context=root]` *(Object)*: The context object.
|
||||
@@ -4034,7 +4034,7 @@ Create a new `lodash` function using the given `context` object.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatetext-data--options--optionsescape--optionsevaluate--optionsimports--optionsinterpolate--sourceurl--variable"></a>`_.template(text, data, [options], [options.escape], [options.evaluate], [options.imports], [options.interpolate], [sourceURL], [variable])`
|
||||
<a href="#_templatetext-data--options--optionsescape--optionsevaluate--optionsimports--optionsinterpolate--sourceurl--variable">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6086 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatetext-data--options--optionsescape--optionsevaluate--optionsimports--optionsinterpolate--sourceurl--variable">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6096 "View in source") [Ⓣ][1]
|
||||
|
||||
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
|
||||
|
||||
@@ -4128,7 +4128,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_timesn-callback--thisarg"></a>`_.times(n, callback, [thisArg])`
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6209 "View in source") [Ⓣ][1]
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6219 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the callback `n` times, returning an array of the results of each callback execution. The callback is bound to `thisArg` and invoked with one argument; *(index)*.
|
||||
|
||||
@@ -4160,7 +4160,7 @@ _.times(3, function(n) { this.cast(n); }, mage);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unescapestring"></a>`_.unescape(string)`
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6236 "View in source") [Ⓣ][1]
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6246 "View in source") [Ⓣ][1]
|
||||
|
||||
The inverse of `_.escape` this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters.
|
||||
|
||||
@@ -4184,7 +4184,7 @@ _.unescape('Moe, Larry & Curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix])`
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6256 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6266 "View in source") [Ⓣ][1]
|
||||
|
||||
Generates a unique ID. If `prefix` is provided the ID will be appended to it.
|
||||
|
||||
@@ -4237,7 +4237,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_version"></a>`_.VERSION`
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6565 "View in source") [Ⓣ][1]
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L6575 "View in source") [Ⓣ][1]
|
||||
|
||||
*(string)*: The semantic version number.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user