Simplify regexp that escapes special regexp characters for reNative, and add callback and thisArg arguments to _.clone, _.cloneDeep, and _.isEqual.

Former-commit-id: 86715543147d2965a562016cf0b08f945fa38fe6
This commit is contained in:
John-David Dalton
2013-01-27 23:28:13 -08:00
parent 8ea8fa3a8a
commit a4454ea5f9
5 changed files with 299 additions and 257 deletions

View File

@@ -108,8 +108,8 @@
## `Objects`
* [`_.assign`](#_assignobject--source1-source2-)
* [`_.clone`](#_clonevalue-deep)
* [`_.cloneDeep`](#_clonedeepvalue)
* [`_.clone`](#_clonevalue--deepfalse-callback-thisarg)
* [`_.cloneDeep`](#_clonedeepvalue--callback-thisarg)
* [`_.defaults`](#_defaultsobject--source1-source2-)
* [`_.extend`](#_assignobject--source1-source2-)
* [`_.forIn`](#_forinobject--callbackidentity-thisarg)
@@ -123,7 +123,7 @@
* [`_.isDate`](#_isdatevalue)
* [`_.isElement`](#_iselementvalue)
* [`_.isEmpty`](#_isemptyvalue)
* [`_.isEqual`](#_isequala-b)
* [`_.isEqual`](#_isequala-b--callback-thisarg)
* [`_.isFinite`](#_isfinitevalue)
* [`_.isFunction`](#_isfunctionvalue)
* [`_.isNaN`](#_isnanvalue)
@@ -197,7 +197,7 @@
<!-- div -->
### <a id="_compactarray"></a>`_.compact(array)`
<a href="#_compactarray">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2817 "View in source") [&#x24C9;][1]
<a href="#_compactarray">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2859 "View in source") [&#x24C9;][1]
Creates an array with all falsey values of `array` removed. The values `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey.
@@ -221,7 +221,7 @@ _.compact([0, 1, false, 2, '', 3]);
<!-- div -->
### <a id="_differencearray--array1-array2-"></a>`_.difference(array [, array1, array2, ...])`
<a href="#_differencearray--array1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2847 "View in source") [&#x24C9;][1]
<a href="#_differencearray--array1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2889 "View in source") [&#x24C9;][1]
Creates an array of `array` elements not present in the other arrays using strict equality for comparisons, i.e. `===`.
@@ -246,7 +246,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
<!-- div -->
### <a id="_firstarray--callbackn-thisarg"></a>`_.first(array [, callback|n, thisArg])`
<a href="#_firstarray--callbackn-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2891 "View in source") [&#x24C9;][1]
<a href="#_firstarray--callbackn-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2933 "View in source") [&#x24C9;][1]
Gets the first element of the `array`. If a number `n` is passed, the first `n` elements of the `array` are returned. If a `callback` function is passed, the first elements the `callback` returns truthy for are returned. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
@@ -283,7 +283,7 @@ _.first([1, 2, 3], function(num) {
<!-- div -->
### <a id="_flattenarray-shallow"></a>`_.flatten(array, shallow)`
<a href="#_flattenarray-shallow">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2930 "View in source") [&#x24C9;][1]
<a href="#_flattenarray-shallow">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2972 "View in source") [&#x24C9;][1]
Flattens a nested array *(the nesting can be to any depth)*. If `shallow` is truthy, `array` will only be flattened a single level.
@@ -311,7 +311,7 @@ _.flatten([1, [2], [3, [[4]]]], true);
<!-- div -->
### <a id="_indexofarray-value--fromindex0"></a>`_.indexOf(array, value [, fromIndex=0])`
<a href="#_indexofarray-value--fromindex0">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2972 "View in source") [&#x24C9;][1]
<a href="#_indexofarray-value--fromindex0">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3014 "View in source") [&#x24C9;][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, passing `true` for `fromIndex` will run a faster binary search.
@@ -343,7 +343,7 @@ _.indexOf([1, 1, 2, 2, 3, 3], 2, true);
<!-- div -->
### <a id="_initialarray--callbackn1-thisarg"></a>`_.initial(array [, callback|n=1, thisArg])`
<a href="#_initialarray--callbackn1-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3018 "View in source") [&#x24C9;][1]
<a href="#_initialarray--callbackn1-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3060 "View in source") [&#x24C9;][1]
Gets all but the last element of `array`. If a number `n` is passed, the last `n` elements are excluded from the result. If a `callback` function is passed, the last elements the `callback` returns truthy for are excluded from the result. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
@@ -377,7 +377,7 @@ _.initial([1, 2, 3], function(num) {
<!-- div -->
### <a id="_intersectionarray1-array2-"></a>`_.intersection([array1, array2, ...])`
<a href="#_intersectionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3052 "View in source") [&#x24C9;][1]
<a href="#_intersectionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3094 "View in source") [&#x24C9;][1]
Computes the intersection of all the passed-in arrays using strict equality for comparisons, i.e. `===`.
@@ -401,7 +401,7 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
<!-- div -->
### <a id="_lastarray--callbackn-thisarg"></a>`_.last(array [, callback|n, thisArg])`
<a href="#_lastarray--callbackn-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3114 "View in source") [&#x24C9;][1]
<a href="#_lastarray--callbackn-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3156 "View in source") [&#x24C9;][1]
Gets the last element of the `array`. If a number `n` is passed, the last `n` elements of the `array` are returned. If a `callback` function is passed, the last elements the `callback` returns truthy for are returned. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
@@ -435,7 +435,7 @@ _.last([1, 2, 3], function(num) {
<!-- div -->
### <a id="_lastindexofarray-value--fromindexarraylength-1"></a>`_.lastIndexOf(array, value [, fromIndex=array.length-1])`
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3155 "View in source") [&#x24C9;][1]
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3197 "View in source") [&#x24C9;][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.
@@ -464,7 +464,7 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3);
<!-- div -->
### <a id="_objectkeys--values"></a>`_.object(keys [, values=[]])`
<a href="#_objectkeys--values">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3185 "View in source") [&#x24C9;][1]
<a href="#_objectkeys--values">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3227 "View in source") [&#x24C9;][1]
Creates an object composed from arrays of `keys` and `values`. Pass either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or two arrays, one of `keys` and one of corresponding `values`.
@@ -489,7 +489,7 @@ _.object(['moe', 'larry'], [30, 40]);
<!-- div -->
### <a id="_rangestart0-end--step1"></a>`_.range([start=0], end [, step=1])`
<a href="#_rangestart0-end--step1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3229 "View in source") [&#x24C9;][1]
<a href="#_rangestart0-end--step1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3271 "View in source") [&#x24C9;][1]
Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `end`.
@@ -527,7 +527,7 @@ _.range(0);
<!-- div -->
### <a id="_restarray--callbackn1-thisarg"></a>`_.rest(array [, callback|n=1, thisArg])`
<a href="#_restarray--callbackn1-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3279 "View in source") [&#x24C9;][1]
<a href="#_restarray--callbackn1-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3321 "View in source") [&#x24C9;][1]
The opposite of `_.initial`, this method gets all but the first value of `array`. If a number `n` is passed, the first `n` values are excluded from the result. If a `callback` function is passed, the first elements the `callback` returns truthy for are excluded from the result. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
@@ -564,7 +564,7 @@ _.rest([1, 2, 3], function(num) {
<!-- div -->
### <a id="_sortedindexarray-value--callbackidentityproperty-thisarg"></a>`_.sortedIndex(array, value [, callback=identity|property, thisArg])`
<a href="#_sortedindexarray-value--callbackidentityproperty-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3335 "View in source") [&#x24C9;][1]
<a href="#_sortedindexarray-value--callbackidentityproperty-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3377 "View in source") [&#x24C9;][1]
Uses a binary search to determine the smallest index at which the `value` should be inserted into `array` in order to maintain the sort order of the sorted `array`. If `callback` is passed, it will be executed for `value` and each element in `array` to compute their sort ranking. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*. The `callback` argument may also be the name of a property to order by.
@@ -608,7 +608,7 @@ _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
<!-- div -->
### <a id="_unionarray1-array2-"></a>`_.union([array1, array2, ...])`
<a href="#_unionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3367 "View in source") [&#x24C9;][1]
<a href="#_unionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3409 "View in source") [&#x24C9;][1]
Computes the union of the passed-in arrays using strict equality for comparisons, i.e. `===`.
@@ -632,7 +632,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3401 "View in source") [&#x24C9;][1]
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3443 "View in source") [&#x24C9;][1]
Creates a duplicate-value-free version of the `array` using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster algorithm. If `callback` is passed, each element of `array` is passed through a callback` before uniqueness is computed. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
@@ -671,7 +671,7 @@ _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math);
<!-- div -->
### <a id="_withoutarray--value1-value2-"></a>`_.without(array [, value1, value2, ...])`
<a href="#_withoutarray--value1-value2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3460 "View in source") [&#x24C9;][1]
<a href="#_withoutarray--value1-value2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3502 "View in source") [&#x24C9;][1]
Creates an array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
@@ -696,7 +696,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
<!-- div -->
### <a id="_ziparray1-array2-"></a>`_.zip([array1, array2, ...])`
<a href="#_ziparray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3491 "View in source") [&#x24C9;][1]
<a href="#_ziparray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3533 "View in source") [&#x24C9;][1]
Groups the elements of each array at their corresponding indexes. Useful for separate data sources that are coordinated through matching array indexes. For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix in a similar fashion.
@@ -756,7 +756,7 @@ The wrapper functions `first` and `last` return wrapped values when `n` is passe
<!-- div -->
### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
<a href="#_tapvalue-interceptor">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4386 "View in source") [&#x24C9;][1]
<a href="#_tapvalue-interceptor">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4428 "View in source") [&#x24C9;][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.
@@ -786,7 +786,7 @@ _([1, 2, 3, 4])
<!-- div -->
### <a id="_prototypetostring"></a>`_.prototype.toString()`
<a href="#_prototypetostring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4403 "View in source") [&#x24C9;][1]
<a href="#_prototypetostring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4445 "View in source") [&#x24C9;][1]
Produces the `toString` result of the wrapped value.
@@ -807,7 +807,7 @@ _([1, 2, 3]).toString();
<!-- div -->
### <a id="_prototypevalueof"></a>`_.prototype.valueOf()`
<a href="#_prototypevalueof">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4420 "View in source") [&#x24C9;][1]
<a href="#_prototypevalueof">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4462 "View in source") [&#x24C9;][1]
Extracts the wrapped value.
@@ -838,7 +838,7 @@ _([1, 2, 3]).valueOf();
<!-- div -->
### <a id="_atcollection--index1-index2-"></a>`_.at(collection [, index1, index2, ...])`
<a href="#_atcollection--index1-index2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2005 "View in source") [&#x24C9;][1]
<a href="#_atcollection--index1-index2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2047 "View in source") [&#x24C9;][1]
Creates an array of elements from the specified index(es), or keys, of the `collection`. Indexes may be specified as individual arguments or as arrays of indexes.
@@ -866,7 +866,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2047 "View in source") [&#x24C9;][1]
<a href="#_containscollection-target--fromindex0">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2089 "View in source") [&#x24C9;][1]
Checks if a given `target` element 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.
@@ -904,7 +904,7 @@ _.contains('curly', 'ur');
<!-- div -->
### <a id="_countbycollection-callbackproperty--thisarg"></a>`_.countBy(collection, callback|property [, thisArg])`
<a href="#_countbycollection-callbackproperty--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2094 "View in source") [&#x24C9;][1]
<a href="#_countbycollection-callbackproperty--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2136 "View in source") [&#x24C9;][1]
Creates an object composed of keys returned from running each element of `collection` through a `callback`. The corresponding value of each key is the number of times the key was returned by `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to count by *(e.g. 'length')*.
@@ -936,7 +936,7 @@ _.countBy(['one', 'two', 'three'], 'length');
<!-- div -->
### <a id="_everycollection--callbackidentity-thisarg"></a>`_.every(collection [, callback=identity, thisArg])`
<a href="#_everycollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2124 "View in source") [&#x24C9;][1]
<a href="#_everycollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2166 "View in source") [&#x24C9;][1]
Checks if the `callback` returns a truthy value for **all** elements of a `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
@@ -965,7 +965,7 @@ _.every([true, 1, null, 'yes'], Boolean);
<!-- div -->
### <a id="_filtercollection--callbackidentity-thisarg"></a>`_.filter(collection [, callback=identity, thisArg])`
<a href="#_filtercollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2163 "View in source") [&#x24C9;][1]
<a href="#_filtercollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2205 "View in source") [&#x24C9;][1]
Examines each element in a `collection`, returning an array of all elements the `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
@@ -994,7 +994,7 @@ var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; })
<!-- div -->
### <a id="_findcollection--callbackidentity-thisarg"></a>`_.find(collection [, callback=identity, thisArg])`
<a href="#_findcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2207 "View in source") [&#x24C9;][1]
<a href="#_findcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2249 "View in source") [&#x24C9;][1]
Examines each element in a `collection`, returning the first one the `callback` returns truthy for. The function returns as soon as it finds an acceptable element, and does not iterate over the entire `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
@@ -1023,7 +1023,7 @@ var even = _.find([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
<!-- div -->
### <a id="_foreachcollection--callbackidentity-thisarg"></a>`_.forEach(collection [, callback=identity, thisArg])`
<a href="#_foreachcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2242 "View in source") [&#x24C9;][1]
<a href="#_foreachcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2284 "View in source") [&#x24C9;][1]
Iterates over a `collection`, executing the `callback` for each element in the `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. Callbacks may exit iteration early by explicitly returning `false`.
@@ -1055,7 +1055,7 @@ _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert);
<!-- div -->
### <a id="_groupbycollection-callbackproperty--thisarg"></a>`_.groupBy(collection, callback|property [, thisArg])`
<a href="#_groupbycollection-callbackproperty--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2284 "View in source") [&#x24C9;][1]
<a href="#_groupbycollection-callbackproperty--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2326 "View in source") [&#x24C9;][1]
Creates an object composed of keys returned from running each element of `collection` through a `callback`. The corresponding value of each key is an array of elements passed to `callback` that returned the key. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to group by *(e.g. 'length')*.
@@ -1087,7 +1087,7 @@ _.groupBy(['one', 'two', 'three'], 'length');
<!-- div -->
### <a id="_invokecollection-methodname--arg1-arg2-"></a>`_.invoke(collection, methodName [, arg1, arg2, ...])`
<a href="#_invokecollection-methodname--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2317 "View in source") [&#x24C9;][1]
<a href="#_invokecollection-methodname--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2359 "View in source") [&#x24C9;][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 passed to each invoked method. If `methodName` is a function, it will be invoked for, and `this` bound to, each element in the `collection`.
@@ -1116,7 +1116,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2351 "View in source") [&#x24C9;][1]
<a href="#_mapcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2393 "View in source") [&#x24C9;][1]
Creates an array of values by running each element in the `collection` through a `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
@@ -1148,7 +1148,7 @@ _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; });
<!-- div -->
### <a id="_maxcollection--callback-thisarg"></a>`_.max(collection [, callback, thisArg])`
<a href="#_maxcollection--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2395 "View in source") [&#x24C9;][1]
<a href="#_maxcollection--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2437 "View in source") [&#x24C9;][1]
Retrieves the maximum value of an `array`. If `callback` is passed, 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)*.
@@ -1182,7 +1182,7 @@ _.max(stooges, function(stooge) { return stooge.age; });
<!-- div -->
### <a id="_mincollection--callback-thisarg"></a>`_.min(collection [, callback, thisArg])`
<a href="#_mincollection--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2451 "View in source") [&#x24C9;][1]
<a href="#_mincollection--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2493 "View in source") [&#x24C9;][1]
Retrieves the minimum value of an `array`. If `callback` is passed, 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)*.
@@ -1216,7 +1216,7 @@ _.min(stooges, function(stooge) { return stooge.age; });
<!-- div -->
### <a id="_pluckcollection-property"></a>`_.pluck(collection, property)`
<a href="#_pluckcollection-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2501 "View in source") [&#x24C9;][1]
<a href="#_pluckcollection-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2543 "View in source") [&#x24C9;][1]
Retrieves the value of a specified property from all elements in the `collection`.
@@ -1246,7 +1246,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2525 "View in source") [&#x24C9;][1]
<a href="#_reducecollection--callbackidentity-accumulator-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2567 "View in source") [&#x24C9;][1]
Reduces a `collection` to a single value. The initial state of the reduction is `accumulator` and each successive step of it should be returned by the `callback`. The `callback` is bound to `thisArg` and invoked with four arguments; for arrays they are *(accumulator, value, index|key, collection)*.
@@ -1276,7 +1276,7 @@ var sum = _.reduce([1, 2, 3], function(memo, num) { return memo + num; });
<!-- div -->
### <a id="_reducerightcollection--callbackidentity-accumulator-thisarg"></a>`_.reduceRight(collection [, callback=identity, accumulator, thisArg])`
<a href="#_reducerightcollection--callbackidentity-accumulator-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2568 "View in source") [&#x24C9;][1]
<a href="#_reducerightcollection--callbackidentity-accumulator-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2610 "View in source") [&#x24C9;][1]
This method is similar to `_.reduce`, except that it iterates over a `collection` from right to left.
@@ -1307,7 +1307,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2606 "View in source") [&#x24C9;][1]
<a href="#_rejectcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2648 "View in source") [&#x24C9;][1]
The opposite of `_.filter`, this method returns the elements of a `collection` that `callback` does **not** return truthy for.
@@ -1333,7 +1333,7 @@ var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
<!-- div -->
### <a id="_shufflecollection"></a>`_.shuffle(collection)`
<a href="#_shufflecollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2627 "View in source") [&#x24C9;][1]
<a href="#_shufflecollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2669 "View in source") [&#x24C9;][1]
Creates an array of shuffled `array` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
@@ -1357,7 +1357,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
<!-- div -->
### <a id="_sizecollection"></a>`_.size(collection)`
<a href="#_sizecollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2660 "View in source") [&#x24C9;][1]
<a href="#_sizecollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2702 "View in source") [&#x24C9;][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.
@@ -1387,7 +1387,7 @@ _.size('curly');
<!-- div -->
### <a id="_somecollection--callbackidentity-thisarg"></a>`_.some(collection [, callback=identity, thisArg])`
<a href="#_somecollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2685 "View in source") [&#x24C9;][1]
<a href="#_somecollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2727 "View in source") [&#x24C9;][1]
Checks if the `callback` returns a truthy value for **any** element of a `collection`. The function returns as soon as it finds 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)*.
@@ -1416,7 +1416,7 @@ _.some([null, 0, 'yes', false], Boolean);
<!-- div -->
### <a id="_sortbycollection-callbackproperty--thisarg"></a>`_.sortBy(collection, callback|property [, thisArg])`
<a href="#_sortbycollection-callbackproperty--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2731 "View in source") [&#x24C9;][1]
<a href="#_sortbycollection-callbackproperty--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2773 "View in source") [&#x24C9;][1]
Creates an array, stable sorted in ascending order by the results of running each element of `collection` through a `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to sort by *(e.g. 'length')*.
@@ -1448,7 +1448,7 @@ _.sortBy(['banana', 'strawberry', 'apple'], 'length');
<!-- div -->
### <a id="_toarraycollection"></a>`_.toArray(collection)`
<a href="#_toarraycollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2766 "View in source") [&#x24C9;][1]
<a href="#_toarraycollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2808 "View in source") [&#x24C9;][1]
Converts the `collection` to an array.
@@ -1472,7 +1472,7 @@ Converts the `collection` to an array.
<!-- div -->
### <a id="_wherecollection-properties"></a>`_.where(collection, properties)`
<a href="#_wherecollection-properties">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2797 "View in source") [&#x24C9;][1]
<a href="#_wherecollection-properties">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2839 "View in source") [&#x24C9;][1]
Examines each element in a `collection`, returning an array of all elements that have the given `properties`. When checking `properties`, this method performs a deep comparison between values to determine if they are equivalent to each other.
@@ -1509,7 +1509,7 @@ _.where(stooges, { 'age': 40 });
<!-- div -->
### <a id="_aftern-func"></a>`_.after(n, func)`
<a href="#_aftern-func">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3524 "View in source") [&#x24C9;][1]
<a href="#_aftern-func">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3566 "View in source") [&#x24C9;][1]
Creates a function that is restricted to executing `func` only after it is called `n` times. The `func` is executed with the `this` binding of the created function.
@@ -1537,7 +1537,7 @@ _.forEach(notes, function(note) {
<!-- div -->
### <a id="_bindfunc--thisarg-arg1-arg2-"></a>`_.bind(func [, thisArg, arg1, arg2, ...])`
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3557 "View in source") [&#x24C9;][1]
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3599 "View in source") [&#x24C9;][1]
Creates a function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those passed to the bound function.
@@ -1568,7 +1568,7 @@ func();
<!-- div -->
### <a id="_bindallobject--methodname1-methodname2-"></a>`_.bindAll(object [, methodName1, methodName2, ...])`
<a href="#_bindallobject--methodname1-methodname2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3588 "View in source") [&#x24C9;][1]
<a href="#_bindallobject--methodname1-methodname2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3630 "View in source") [&#x24C9;][1]
Binds methods on `object` to `object`, 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.
@@ -1599,7 +1599,7 @@ jQuery('#lodash_button').on('click', buttonView.onClick);
<!-- div -->
### <a id="_bindkeyobject-key--arg1-arg2-"></a>`_.bindKey(object, key [, arg1, arg2, ...])`
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3634 "View in source") [&#x24C9;][1]
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3676 "View in source") [&#x24C9;][1]
Creates a function that, when called, invokes the method at `object[key]` and prepends any additional `bindKey` arguments to those passed 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.
@@ -1640,7 +1640,7 @@ func();
<!-- div -->
### <a id="_composefunc1-func2-"></a>`_.compose([func1, func2, ...])`
<a href="#_composefunc1-func2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3657 "View in source") [&#x24C9;][1]
<a href="#_composefunc1-func2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3699 "View in source") [&#x24C9;][1]
Creates a function that is the composition of the passed 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.
@@ -1667,7 +1667,7 @@ welcome('moe');
<!-- div -->
### <a id="_debouncefunc-wait-immediate"></a>`_.debounce(func, wait, immediate)`
<a href="#_debouncefunc-wait-immediate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3690 "View in source") [&#x24C9;][1]
<a href="#_debouncefunc-wait-immediate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3732 "View in source") [&#x24C9;][1]
Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass `true` for `immediate` to cause debounce to invoke `func` on the leading, instead of the trailing, edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
@@ -1693,7 +1693,7 @@ jQuery(window).on('resize', lazyLayout);
<!-- div -->
### <a id="_deferfunc--arg1-arg2-"></a>`_.defer(func [, arg1, arg2, ...])`
<a href="#_deferfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3754 "View in source") [&#x24C9;][1]
<a href="#_deferfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3796 "View in source") [&#x24C9;][1]
Defers executing the `func` function until the current call stack has cleared. Additional arguments will be passed to `func` when it is invoked.
@@ -1718,7 +1718,7 @@ _.defer(function() { alert('deferred'); });
<!-- div -->
### <a id="_delayfunc-wait--arg1-arg2-"></a>`_.delay(func, wait [, arg1, arg2, ...])`
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3734 "View in source") [&#x24C9;][1]
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3776 "View in source") [&#x24C9;][1]
Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked.
@@ -1745,7 +1745,7 @@ _.delay(log, 1000, 'logged later');
<!-- div -->
### <a id="_memoizefunc--resolver"></a>`_.memoize(func [, resolver])`
<a href="#_memoizefunc--resolver">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3778 "View in source") [&#x24C9;][1]
<a href="#_memoizefunc--resolver">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3820 "View in source") [&#x24C9;][1]
Creates a function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key. The `func` is executed with the `this` binding of the memoized function.
@@ -1771,7 +1771,7 @@ var fibonacci = _.memoize(function(n) {
<!-- div -->
### <a id="_oncefunc"></a>`_.once(func)`
<a href="#_oncefunc">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3805 "View in source") [&#x24C9;][1]
<a href="#_oncefunc">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3847 "View in source") [&#x24C9;][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.
@@ -1797,7 +1797,7 @@ initialize();
<!-- div -->
### <a id="_partialfunc--arg1-arg2-"></a>`_.partial(func [, arg1, arg2, ...])`
<a href="#_partialfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3840 "View in source") [&#x24C9;][1]
<a href="#_partialfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3882 "View in source") [&#x24C9;][1]
Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the new function. This method is similar to `_.bind`, except it does **not** alter the `this` binding.
@@ -1824,7 +1824,7 @@ hi('moe');
<!-- div -->
### <a id="_partialrightfunc--arg1-arg2-"></a>`_.partialRight(func [, arg1, arg2, ...])`
<a href="#_partialrightfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3873 "View in source") [&#x24C9;][1]
<a href="#_partialrightfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3915 "View in source") [&#x24C9;][1]
This method is similar to `_.partial`, except that `partial` arguments are appended to those passed to the new function.
@@ -1863,7 +1863,7 @@ options.imports
<!-- div -->
### <a id="_throttlefunc-wait"></a>`_.throttle(func, wait)`
<a href="#_throttlefunc-wait">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3895 "View in source") [&#x24C9;][1]
<a href="#_throttlefunc-wait">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3937 "View in source") [&#x24C9;][1]
Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once during the `wait` timeout, `func` will also be called on the trailing edge of the timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
@@ -1888,7 +1888,7 @@ jQuery(window).on('scroll', throttled);
<!-- div -->
### <a id="_wrapvalue-wrapper"></a>`_.wrap(value, wrapper)`
<a href="#_wrapvalue-wrapper">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3948 "View in source") [&#x24C9;][1]
<a href="#_wrapvalue-wrapper">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3990 "View in source") [&#x24C9;][1]
Creates a function that passes `value` to the `wrapper` function as its first argument. Additional arguments passed to the function are appended to those passed to the `wrapper` function. The `wrapper` is executed with the `this` binding of the created function.
@@ -1924,7 +1924,7 @@ hello();
<!-- div -->
### <a id="_assignobject--source1-source2-"></a>`_.assign(object [, source1, source2, ...])`
<a href="#_assignobject--source1-source2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1025 "View in source") [&#x24C9;][1]
<a href="#_assignobject--source1-source2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1035 "View in source") [&#x24C9;][1]
Assigns own enumerable properties of source object(s) to the `destination` object. Subsequent sources will overwrite propery assignments of previous sources.
@@ -1951,14 +1951,16 @@ _.assign({ 'name': 'moe' }, { 'age': 40 });
<!-- div -->
### <a id="_clonevalue-deep"></a>`_.clone(value, deep)`
<a href="#_clonevalue-deep">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1056 "View in source") [&#x24C9;][1]
### <a id="_clonevalue--deepfalse-callback-thisarg"></a>`_.clone(value [, deep=false, callback, thisArg])`
<a href="#_clonevalue--deepfalse-callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1069 "View in source") [&#x24C9;][1]
Creates a clone of `value`. If `deep` is `true`, nested objects will also be cloned, otherwise they will be assigned by reference.
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` function is passed, it will be executed to produce the cloned values. If `callback` returns the value it was passed, cloning will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*.
#### Arguments
1. `value` *(Mixed)*: The value to clone.
2. `deep` *(Boolean)*: A flag to indicate a deep clone.
2. `[deep=false]` *(Boolean)*: A flag to indicate a deep clone.
3. `[callback]` *(Function)*: The function to customize cloning values.
4. `[thisArg]` *(Mixed)*: The `this` binding of `callback`.
#### Returns
*(Mixed)*: Returns the cloned `value`.
@@ -1986,8 +1988,8 @@ deep[0] === stooges[0];
<!-- div -->
### <a id="_clonedeepvalue"></a>`_.cloneDeep(value)`
<a href="#_clonedeepvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1146 "View in source") [&#x24C9;][1]
### <a id="_clonedeepvalue--callback-thisarg"></a>`_.cloneDeep(value [, callback, thisArg])`
<a href="#_clonedeepvalue--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1175 "View in source") [&#x24C9;][1]
Creates a deep clone of `value`. Functions and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and objects created by constructors other than `Object` are cloned to plain `Object` objects.
@@ -1995,6 +1997,8 @@ Note: This function is loosely based on the structured clone algorithm. See http
#### Arguments
1. `value` *(Mixed)*: The value to deep clone.
2. `[callback]` *(Function)*: The function called to produce custom cloned values.
3. `[thisArg]` *(Mixed)*: The `this` binding of `callback`.
#### Returns
*(Mixed)*: Returns the deep cloned `value`.
@@ -2019,7 +2023,7 @@ deep[0] === stooges[0];
<!-- div -->
### <a id="_defaultsobject--source1-source2-"></a>`_.defaults(object [, source1, source2, ...])`
<a href="#_defaultsobject--source1-source2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1170 "View in source") [&#x24C9;][1]
<a href="#_defaultsobject--source1-source2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1199 "View in source") [&#x24C9;][1]
Assigns own enumerable properties of source object(s) to the `destination` object for all `destination` properties that resolve to `null`/`undefined`. Once a property is set, additional defaults of the same property will be ignored.
@@ -2045,7 +2049,7 @@ _.defaults(iceCream, { 'flavor': 'vanilla', 'sprinkles': 'rainbow' });
<!-- div -->
### <a id="_forinobject--callbackidentity-thisarg"></a>`_.forIn(object [, callback=identity, thisArg])`
<a href="#_forinobject--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L861 "View in source") [&#x24C9;][1]
<a href="#_forinobject--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L871 "View in source") [&#x24C9;][1]
Iterates over `object`'s own and inherited enumerable properties, 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`.
@@ -2081,7 +2085,7 @@ _.forIn(new Dog('Dagny'), function(value, key) {
<!-- div -->
### <a id="_forownobject--callbackidentity-thisarg"></a>`_.forOwn(object [, callback=identity, thisArg])`
<a href="#_forownobject--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L885 "View in source") [&#x24C9;][1]
<a href="#_forownobject--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L895 "View in source") [&#x24C9;][1]
Iterates over an object's own enumerable properties, 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`.
@@ -2109,7 +2113,7 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
<!-- div -->
### <a id="_functionsobject"></a>`_.functions(object)`
<a href="#_functionsobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1189 "View in source") [&#x24C9;][1]
<a href="#_functionsobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1218 "View in source") [&#x24C9;][1]
Creates a sorted array of all enumerable properties, own and inherited, of `object` that have function values.
@@ -2136,7 +2140,7 @@ _.functions(_);
<!-- div -->
### <a id="_hasobject-property"></a>`_.has(object, property)`
<a href="#_hasobject-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1214 "View in source") [&#x24C9;][1]
<a href="#_hasobject-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1243 "View in source") [&#x24C9;][1]
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
@@ -2161,7 +2165,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
<!-- div -->
### <a id="_invertobject"></a>`_.invert(object)`
<a href="#_invertobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1231 "View in source") [&#x24C9;][1]
<a href="#_invertobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1260 "View in source") [&#x24C9;][1]
Creates an object composed of the inverted keys and values of the given `object`.
@@ -2185,7 +2189,7 @@ _.invert({ 'first': 'moe', 'second': 'larry' });
<!-- div -->
### <a id="_isargumentsvalue"></a>`_.isArguments(value)`
<a href="#_isargumentsvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L823 "View in source") [&#x24C9;][1]
<a href="#_isargumentsvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L833 "View in source") [&#x24C9;][1]
Checks if `value` is an `arguments` object.
@@ -2212,7 +2216,7 @@ _.isArguments([1, 2, 3]);
<!-- div -->
### <a id="_isarrayvalue"></a>`_.isArray(value)`
<a href="#_isarrayvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L903 "View in source") [&#x24C9;][1]
<a href="#_isarrayvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L913 "View in source") [&#x24C9;][1]
Checks if `value` is an array.
@@ -2239,7 +2243,7 @@ _.isArray([1, 2, 3]);
<!-- div -->
### <a id="_isbooleanvalue"></a>`_.isBoolean(value)`
<a href="#_isbooleanvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1257 "View in source") [&#x24C9;][1]
<a href="#_isbooleanvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1286 "View in source") [&#x24C9;][1]
Checks if `value` is a boolean value.
@@ -2263,7 +2267,7 @@ _.isBoolean(null);
<!-- div -->
### <a id="_isdatevalue"></a>`_.isDate(value)`
<a href="#_isdatevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1274 "View in source") [&#x24C9;][1]
<a href="#_isdatevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1303 "View in source") [&#x24C9;][1]
Checks if `value` is a date.
@@ -2287,7 +2291,7 @@ _.isDate(new Date);
<!-- div -->
### <a id="_iselementvalue"></a>`_.isElement(value)`
<a href="#_iselementvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1291 "View in source") [&#x24C9;][1]
<a href="#_iselementvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1320 "View in source") [&#x24C9;][1]
Checks if `value` is a DOM element.
@@ -2311,7 +2315,7 @@ _.isElement(document.body);
<!-- div -->
### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
<a href="#_isemptyvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1316 "View in source") [&#x24C9;][1]
<a href="#_isemptyvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1345 "View in source") [&#x24C9;][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".
@@ -2340,14 +2344,16 @@ _.isEmpty('');
<!-- div -->
### <a id="_isequala-b"></a>`_.isEqual(a, b)`
<a href="#_isequala-b">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1360 "View in source") [&#x24C9;][1]
### <a id="_isequala-b--callback-thisarg"></a>`_.isEqual(a, b [, callback, thisArg])`
<a href="#_isequala-b--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1394 "View in source") [&#x24C9;][1]
Performs a deep comparison between two values to determine if they are equivalent to each other.
Performs a deep comparison between two values to determine if they are equivalent to each other. If `callback` is passed, it will be executed to compare values. If `callback` returns a non-boolean value, comparisons will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with two arguments; *(a, b)*.
#### Arguments
1. `a` *(Mixed)*: The value to compare.
2. `b` *(Mixed)*: The other value to compare.
3. `[callback]` *(Function)*: The function to customize comparing values.
4. `[thisArg]` *(Mixed)*: The `this` binding of `callback`.
#### Returns
*(Boolean)*: Returns `true`, if the values are equvalent, else `false`.
@@ -2372,7 +2378,7 @@ _.isEqual(moe, clone);
<!-- div -->
### <a id="_isfinitevalue"></a>`_.isFinite(value)`
<a href="#_isfinitevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1516 "View in source") [&#x24C9;][1]
<a href="#_isfinitevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1557 "View in source") [&#x24C9;][1]
Checks if `value` is, or can be coerced to, a finite number.
@@ -2410,7 +2416,7 @@ _.isFinite(Infinity);
<!-- div -->
### <a id="_isfunctionvalue"></a>`_.isFunction(value)`
<a href="#_isfunctionvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1533 "View in source") [&#x24C9;][1]
<a href="#_isfunctionvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1574 "View in source") [&#x24C9;][1]
Checks if `value` is a function.
@@ -2434,7 +2440,7 @@ _.isFunction(_);
<!-- div -->
### <a id="_isnanvalue"></a>`_.isNaN(value)`
<a href="#_isnanvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1596 "View in source") [&#x24C9;][1]
<a href="#_isnanvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1637 "View in source") [&#x24C9;][1]
Checks if `value` is `NaN`.
@@ -2469,7 +2475,7 @@ _.isNaN(undefined);
<!-- div -->
### <a id="_isnullvalue"></a>`_.isNull(value)`
<a href="#_isnullvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1618 "View in source") [&#x24C9;][1]
<a href="#_isnullvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1659 "View in source") [&#x24C9;][1]
Checks if `value` is `null`.
@@ -2496,7 +2502,7 @@ _.isNull(undefined);
<!-- div -->
### <a id="_isnumbervalue"></a>`_.isNumber(value)`
<a href="#_isnumbervalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1635 "View in source") [&#x24C9;][1]
<a href="#_isnumbervalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1676 "View in source") [&#x24C9;][1]
Checks if `value` is a number.
@@ -2520,7 +2526,7 @@ _.isNumber(8.4 * 5);
<!-- div -->
### <a id="_isobjectvalue"></a>`_.isObject(value)`
<a href="#_isobjectvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1563 "View in source") [&#x24C9;][1]
<a href="#_isobjectvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1604 "View in source") [&#x24C9;][1]
Checks if `value` is the language type of Object. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)*
@@ -2550,7 +2556,7 @@ _.isObject(1);
<!-- div -->
### <a id="_isplainobjectvalue"></a>`_.isPlainObject(value)`
<a href="#_isplainobjectvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1663 "View in source") [&#x24C9;][1]
<a href="#_isplainobjectvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1704 "View in source") [&#x24C9;][1]
Checks if a given `value` is an object created by the `Object` constructor.
@@ -2585,7 +2591,7 @@ _.isPlainObject({ 'name': 'moe', 'age': 40 });
<!-- div -->
### <a id="_isregexpvalue"></a>`_.isRegExp(value)`
<a href="#_isregexpvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1688 "View in source") [&#x24C9;][1]
<a href="#_isregexpvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1729 "View in source") [&#x24C9;][1]
Checks if `value` is a regular expression.
@@ -2609,7 +2615,7 @@ _.isRegExp(/moe/);
<!-- div -->
### <a id="_isstringvalue"></a>`_.isString(value)`
<a href="#_isstringvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1705 "View in source") [&#x24C9;][1]
<a href="#_isstringvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1746 "View in source") [&#x24C9;][1]
Checks if `value` is a string.
@@ -2633,7 +2639,7 @@ _.isString('moe');
<!-- div -->
### <a id="_isundefinedvalue"></a>`_.isUndefined(value)`
<a href="#_isundefinedvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1722 "View in source") [&#x24C9;][1]
<a href="#_isundefinedvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1763 "View in source") [&#x24C9;][1]
Checks if `value` is `undefined`.
@@ -2657,7 +2663,7 @@ _.isUndefined(void 0);
<!-- div -->
### <a id="_keysobject"></a>`_.keys(object)`
<a href="#_keysobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L922 "View in source") [&#x24C9;][1]
<a href="#_keysobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L932 "View in source") [&#x24C9;][1]
Creates an array composed of the own enumerable property names of `object`.
@@ -2681,14 +2687,14 @@ _.keys({ 'one': 1, 'two': 2, 'three': 3 });
<!-- div -->
### <a id="_mergeobject--source1-source2--callback-thisarg"></a>`_.merge(object [, source1, source2, ..., callback, thisArg])`
<a href="#_mergeobject--source1-source2--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1766 "View in source") [&#x24C9;][1]
<a href="#_mergeobject--source1-source2--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1807 "View in source") [&#x24C9;][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 propery assignments of previous sources. If a `callback` function is passed, it will be executed to produce the merged values of the destination and source object properties. The `callback` is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*.
Recursively merges own enumerable properties of the source object(s), that don't resolve to `undefined`, into the `destination` object. Subsequent sources will overwrite propery assignments of previous sources. If a `callback` function is passed, it will be executed to produce the merged values of the destination and source properties. The `callback` is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*.
#### Arguments
1. `object` *(Object)*: The destination object.
2. `[source1, source2, ...]` *(Object)*: The source objects.
3. `[callback]` *(Function)*: The function called for each property to merge.
3. `[callback]` *(Function)*: The function to customize merging properties.
4. `[thisArg]` *(Mixed)*: The `this` binding of `callback`.
#### Returns
@@ -2722,9 +2728,9 @@ _.merge(names, ages);
<!-- div -->
### <a id="_omitobject-callback-prop1-prop2--thisarg"></a>`_.omit(object, callback|[prop1, prop2, ..., thisArg])`
<a href="#_omitobject-callback-prop1-prop2--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1861 "View in source") [&#x24C9;][1]
<a href="#_omitobject-callback-prop1-prop2--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1903 "View in source") [&#x24C9;][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 `callback` is passed, it will be executed for each property in the `object`, omitting the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
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` function is passed, it will be executed for each property in the `object`, omitting the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
#### Arguments
1. `object` *(Object)*: The source object.
@@ -2753,7 +2759,7 @@ _.omit({ 'name': 'moe', '_hint': 'knucklehead', '_seed': '96c4eb' }, function(va
<!-- div -->
### <a id="_pairsobject"></a>`_.pairs(object)`
<a href="#_pairsobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1895 "View in source") [&#x24C9;][1]
<a href="#_pairsobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1937 "View in source") [&#x24C9;][1]
Creates a two dimensional array of the given object's key-value pairs, i.e. `[[key1, value1], [key2, value2]]`.
@@ -2777,7 +2783,7 @@ _.pairs({ 'moe': 30, 'larry': 40 });
<!-- div -->
### <a id="_pickobject-callback-prop1-prop2--thisarg"></a>`_.pick(object, callback|[prop1, prop2, ..., thisArg])`
<a href="#_pickobject-callback-prop1-prop2--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1933 "View in source") [&#x24C9;][1]
<a href="#_pickobject-callback-prop1-prop2--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1975 "View in source") [&#x24C9;][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 `callback` is passed, it will be executed for each property in the `object`, picking the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
@@ -2808,7 +2814,7 @@ _.pick({ 'name': 'moe', '_userid': 'moe1' }, function(value, key) {
<!-- div -->
### <a id="_valuesobject"></a>`_.values(object)`
<a href="#_valuesobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1970 "View in source") [&#x24C9;][1]
<a href="#_valuesobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2012 "View in source") [&#x24C9;][1]
Creates an array composed of the own enumerable property values of `object`.
@@ -2839,7 +2845,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
<!-- div -->
### <a id="_escapestring"></a>`_.escape(string)`
<a href="#_escapestring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3972 "View in source") [&#x24C9;][1]
<a href="#_escapestring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4014 "View in source") [&#x24C9;][1]
Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities.
@@ -2863,7 +2869,7 @@ _.escape('Moe, Larry & Curly');
<!-- div -->
### <a id="_identityvalue"></a>`_.identity(value)`
<a href="#_identityvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3990 "View in source") [&#x24C9;][1]
<a href="#_identityvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4032 "View in source") [&#x24C9;][1]
This function returns the first argument passed to it.
@@ -2888,7 +2894,7 @@ moe === _.identity(moe);
<!-- div -->
### <a id="_mixinobject"></a>`_.mixin(object)`
<a href="#_mixinobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4016 "View in source") [&#x24C9;][1]
<a href="#_mixinobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4058 "View in source") [&#x24C9;][1]
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
@@ -2918,7 +2924,7 @@ _('moe').capitalize();
<!-- div -->
### <a id="_noconflict"></a>`_.noConflict()`
<a href="#_noconflict">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4040 "View in source") [&#x24C9;][1]
<a href="#_noconflict">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4082 "View in source") [&#x24C9;][1]
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
@@ -2938,7 +2944,7 @@ var lodash = _.noConflict();
<!-- div -->
### <a id="_randommin0-max1"></a>`_.random([min=0, max=1])`
<a href="#_randommin0-max1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4063 "View in source") [&#x24C9;][1]
<a href="#_randommin0-max1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4105 "View in source") [&#x24C9;][1]
Produces a random number between `min` and `max` *(inclusive)*. If only one argument is passed, a number between `0` and the given number will be returned.
@@ -2966,7 +2972,7 @@ _.random(5);
<!-- div -->
### <a id="_resultobject-property"></a>`_.result(object, property)`
<a href="#_resultobject-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4101 "View in source") [&#x24C9;][1]
<a href="#_resultobject-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4143 "View in source") [&#x24C9;][1]
Resolves the value of `property` on `object`. If `property` is a function, it will be invoked and its result returned, else the property value is returned. If `object` is falsey, then `null` is returned.
@@ -3001,7 +3007,7 @@ _.result(object, 'stuff');
<!-- div -->
### <a id="_templatetext-data-options"></a>`_.template(text, data, options)`
<a href="#_templatetext-data-options">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4186 "View in source") [&#x24C9;][1]
<a href="#_templatetext-data-options">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4228 "View in source") [&#x24C9;][1]
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
@@ -3079,7 +3085,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4312 "View in source") [&#x24C9;][1]
<a href="#_timesn-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4354 "View in source") [&#x24C9;][1]
Executes the `callback` function `n` times, returning an array of the results of each `callback` execution. The `callback` is bound to `thisArg` and invoked with one argument; *(index)*.
@@ -3111,7 +3117,7 @@ _.times(3, function(n) { this.cast(n); }, mage);
<!-- div -->
### <a id="_unescapestring"></a>`_.unescape(string)`
<a href="#_unescapestring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4338 "View in source") [&#x24C9;][1]
<a href="#_unescapestring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4380 "View in source") [&#x24C9;][1]
The opposite of `_.escape`, this method converts the HTML entities `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#x27;` in `string` to their corresponding characters.
@@ -3135,7 +3141,7 @@ _.unescape('Moe, Larry &amp; Curly');
<!-- div -->
### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix])`
<a href="#_uniqueidprefix">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4358 "View in source") [&#x24C9;][1]
<a href="#_uniqueidprefix">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4400 "View in source") [&#x24C9;][1]
Generates a unique ID. If `prefix` is passed, the ID will be appended to it.
@@ -3188,7 +3194,7 @@ A reference to the `lodash` function.
<!-- div -->
### <a id="_version"></a>`_.VERSION`
<a href="#_version">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4588 "View in source") [&#x24C9;][1]
<a href="#_version">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4630 "View in source") [&#x24C9;][1]
*(String)*: The semantic version number.

162
lodash.js
View File

@@ -603,18 +603,18 @@
}
/**
* Produces an iteration callback bound to an optional `thisArg`. If `func` is
* a property name, the callback will return the property value for a given element.
* 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`.
*
* @private
* @param {Function|String} [func=identity|property] The function called per
* iteration or property name to query.
* @param {Mixed} [thisArg] The `this` binding of `callback`.
* @param {Object} [accumulating] Used to indicate that the callback should
* accept an `accumulator` argument.
* @param {Mixed} [func=identity] The value to convert to a callback.
* @param {Mixed} [thisArg] The `this` binding of the created callback.
* @param {Number} [argCount=3] The number of arguments the callback accepts.
* @returns {Function} Returns a callback function.
*/
function createCallback(func, thisArg, accumulating) {
function createCallback(func, thisArg, argCount) {
if (!func) {
return identity;
}
@@ -630,7 +630,7 @@
var length = props.length,
result = false;
while (length--) {
if (!(result = isEqual(object[props[length]], func[props[length]], indicatorObject))) {
if (!(result = isEqual(object[props[length]], func[props[length]], undefined, undefined, indicatorObject))) {
break;
}
}
@@ -638,7 +638,17 @@
};
}
if (typeof thisArg != 'undefined') {
if (accumulating) {
if (argCount === 1) {
return function(value) {
return func.call(thisArg, value);
};
}
if (argCount === 2) {
return function(a, b) {
return func.call(thisArg, a, b);
};
}
if (argCount === 4) {
return function(accumulator, value, index, object) {
return func.call(thisArg, accumulator, value, index, object);
};
@@ -1025,18 +1035,21 @@
var assign = createIterator(assignIteratorOptions);
/**
* Creates a clone of `value`. If `deep` is `true`, nested objects will also
* be cloned, otherwise they will be assigned by reference.
* 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` function
* is passed, it will be executed to produce the cloned values. If `callback`
* returns the value it was passed, cloning will be handled by the method instead.
* The `callback` is bound to `thisArg` and invoked with one argument; (value).
*
* @static
* @memberOf _
* @category Objects
* @param {Mixed} value The value to clone.
* @param {Boolean} deep A flag to indicate a deep clone.
* @param- {Object} [guard] Internally used to allow working with "Collections"
* methods without using their `callback` argument, `index`, for `deep`.
* @param {Boolean} [deep=false] A flag to indicate a deep clone.
* @param {Function} [callback] The function to customize cloning values.
* @param {Mixed} [thisArg] The `this` binding of `callback`.
* @param- {Array} [stackA=[]] Internally used to track traversed source objects.
* @param- {Array} [stackB=[]] Internally used to associate clones with their source counterparts.
* @param- {Array} [stackB=[]] Internally used to associate clones with source counterparts.
* @returns {Mixed} Returns the cloned `value`.
* @example
*
@@ -1053,36 +1066,48 @@
* deep[0] === stooges[0];
* // => false
*/
function clone(value, deep, guard, stackA, stackB) {
deep = !guard && deep;
function clone(value, deep, callback, thisArg, stackA, stackB) {
var result = value;
// allows working with "Collections" methods without using their `callback`
// argument, `index|key`, for this method's `callback`
if (typeof deep == 'function') {
thisArg = callback;
callback = deep;
deep = false;
}
if (typeof callback == 'function') {
callback = typeof thisArg == 'undefined' ? callback : createCallback(callback, thisArg, 1);
result = callback(result);
var done = value !== result;
}
// inspect [[Class]]
var isObj = isObject(value);
var isObj = isObject(result);
if (isObj) {
var className = toString.call(value);
if (!cloneableClasses[className] || (noNodeClass && isNode(value))) {
return value;
var className = toString.call(result);
if (!cloneableClasses[className] || (noNodeClass && isNode(result))) {
return result;
}
var isArr = isArray(value);
var isArr = isArray(result);
}
// shallow clone
if (!isObj || !deep) {
return isObj
? (isArr ? slice(value) : assign({}, value))
: value;
return isObj && !done
? (isArr ? slice(result) : assign({}, result))
: result;
}
var ctor = ctorByClass[className];
switch (className) {
case boolClass:
case dateClass:
return new ctor(+value);
return done ? result : new ctor(+result);
case numberClass:
case stringClass:
return new ctor(value);
return done ? result : new ctor(result);
case regexpClass:
return ctor(value.source, reFlags.exec(value));
return done ? result : ctor(result.source, reFlags.exec(result));
}
// check for circular references and return corresponding clone
stackA || (stackA = []);
@@ -1095,27 +1120,29 @@
}
}
// init cloned object
var result = isArr ? ctor(value.length) : {};
if (!done) {
result = isArr ? ctor(result.length) : {};
// add array properties assigned by `RegExp#exec`
if (isArr) {
if (hasOwnProperty.call(value, 'index')) {
result.index = value.index;
}
if (hasOwnProperty.call(value, 'input')) {
result.input = value.input;
}
}
}
// add the source value to the stack of traversed objects
// and associate it with its clone
stackA.push(value);
stackB.push(result);
// recursively populate clone (susceptible to call stack limits)
(isArr ? forEach : forOwn)(value, function(objValue, key) {
result[key] = clone(objValue, deep, null, stackA, stackB);
(isArr ? forEach : forOwn)(done ? result : value, function(objValue, key) {
result[key] = clone(objValue, deep, callback, undefined, stackA, stackB);
});
// add array properties assigned by `RegExp#exec`
if (isArr) {
if (hasOwnProperty.call(value, 'index')) {
result.index = value.index;
}
if (hasOwnProperty.call(value, 'input')) {
result.input = value.input;
}
}
return result;
}
@@ -1131,6 +1158,8 @@
* @memberOf _
* @category Objects
* @param {Mixed} value The value to deep clone.
* @param {Function} [callback] The function called to produce custom cloned values.
* @param {Mixed} [thisArg] The `this` binding of `callback`.
* @returns {Mixed} Returns the deep cloned `value`.
* @example
*
@@ -1143,8 +1172,8 @@
* deep[0] === stooges[0];
* // => false
*/
function cloneDeep(value) {
return clone(value, true);
function cloneDeep(value, callback, thisArg) {
return clone(value, true, callback, thisArg);
}
/**
@@ -1334,13 +1363,18 @@
/**
* Performs a deep comparison between two values to determine if they are
* equivalent to each other.
* equivalent to each other. If `callback` is passed, it will be executed to
* compare values. If `callback` returns a non-boolean value, comparisons will
* be handled by the method instead. The `callback` is bound to `thisArg` and
* invoked with two arguments; (a, b).
*
* @static
* @memberOf _
* @category Objects
* @param {Mixed} a The value to compare.
* @param {Mixed} b The other value to compare.
* @param {Function} [callback] The function to customize comparing values.
* @param {Mixed} [thisArg] The `this` binding of `callback`.
* @param- {Object} [whereIndicator] Internally used to indicate that when
* comparing objects, `a` has at least the properties of `b`.
* @param- {Object} [stackA=[]] Internally used track traversed `a` objects.
@@ -1357,7 +1391,14 @@
* _.isEqual(moe, clone);
* // => true
*/
function isEqual(a, b, whereIndicator, stackA, stackB) {
function isEqual(a, b, callback, thisArg, whereIndicator, stackA, stackB) {
if (callback) {
callback = typeof thisArg == 'undefined' ? callback : createCallback(callback, thisArg, 2);
var result = callback(a, b);
if (typeof result == 'boolean') {
return result;
}
}
// exit early for identical values
if (a === b) {
// treat `+0` vs. `-0` as not equal
@@ -1409,7 +1450,7 @@
if (!isArr) {
// unwrap any `lodash` wrapped values
if (a.__wrapped__ || b.__wrapped__) {
return isEqual(a.__wrapped__ || a, b.__wrapped__ || b, whereIndicator);
return isEqual(a.__wrapped__ || a, b.__wrapped__ || b, callback, undefined, whereIndicator, stackA, stackB);
}
// exit for functions and DOM nodes
if (className != objectClass || (noNodeClass && (isNode(a) || isNode(b)))) {
@@ -1439,8 +1480,8 @@
return stackB[length] == b;
}
}
var result = true,
size = 0;
var size = 0;
result = true;
// add `a` and `b` to the stack of traversed objects
stackA.push(a);
@@ -1455,7 +1496,7 @@
if (result) {
// deep compare the contents, ignoring non-numeric properties
while (size--) {
if (!(result = isEqual(a[size], b[size], whereIndicator, stackA, stackB))) {
if (!(result = isEqual(a[size], b[size], callback, undefined, whereIndicator, stackA, stackB))) {
break;
}
}
@@ -1469,7 +1510,7 @@
// count the number of properties.
size++;
// deep compare each property value.
return (result = hasOwnProperty.call(a, key) && isEqual(a[key], value, whereIndicator, stackA, stackB));
return (result = hasOwnProperty.call(a, key) && isEqual(a[key], value, callback, undefined, whereIndicator, stackA, stackB));
}
});
@@ -1728,15 +1769,15 @@
* don't resolve to `undefined`, into the `destination` object. Subsequent sources
* will overwrite propery assignments of previous sources. If a `callback` function
* is passed, it will be executed to produce the merged values of the destination
* and source object properties. The `callback` is bound to `thisArg` and invoked
* with two arguments; (objectValue, sourceValue).
* and source properties. The `callback` is bound to `thisArg` and invoked with
* two arguments; (objectValue, sourceValue).
*
* @static
* @memberOf _
* @category Objects
* @param {Object} object The destination object.
* @param {Object} [source1, source2, ...] The source objects.
* @param {Function} [callback] The function called for each property to merge.
* @param {Function} [callback] The function to customize merging properties.
* @param {Mixed} [thisArg] The `this` binding of `callback`.
* @param- {Object} [deepIndicator] Internally used to indicate that `stackA`
* and `stackB` are arrays of traversed objects instead of source objects.
@@ -1785,7 +1826,7 @@
if (typeof deepIndicator != 'number') {
length = args.length;
callback = typeof (callback = args[length - 2]) == 'function'
? createCallback(callback, args[--length])
? createCallback(callback, args[--length], 2)
: (typeof (callback = args[length - 1]) == 'function' && callback);
}
}
@@ -1836,9 +1877,10 @@
/**
* 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 `callback` is passed, it will be executed for each property
* in the `object`, omitting the properties `callback` returns truthy for. The
* `callback` is bound to `thisArg` and invoked with three arguments; (value, key, object).
* property names. If a `callback` function is passed, it will be executed
* for each property in the `object`, omitting the properties `callback`
* returns truthy for. The `callback` is bound to `thisArg` and invoked
* with three arguments; (value, key, object).
*
* @static
* @memberOf _
@@ -2524,7 +2566,7 @@
*/
function reduce(collection, callback, accumulator, thisArg) {
var noaccum = arguments.length < 3;
callback = createCallback(callback, thisArg, indicatorObject);
callback = createCallback(callback, thisArg, 4);
if (isArray(collection)) {
var index = -1,
@@ -2576,7 +2618,7 @@
} else if (noCharByIndex && isString(collection)) {
iterable = collection.split('');
}
callback = createCallback(callback, thisArg, indicatorObject);
callback = createCallback(callback, thisArg, 4);
forEach(collection, function(value, index, collection) {
index = props ? props[--length] : --length;
accumulator = noaccum
@@ -3337,7 +3379,7 @@
high = array ? array.length : low;
// explicitly reference `identity` for better inlining in Firefox
callback = callback ? createCallback(callback, thisArg) : identity;
callback = callback ? createCallback(callback, thisArg, 1) : identity;
value = callback(value);
while (low < high) {

42
lodash.min.js vendored
View File

@@ -4,24 +4,24 @@
* Underscore.js 1.4.3 underscorejs.org/LICENSE
*/
;(function(n,t){function r(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof r?(this.__wrapped__=n,void 0):new r(n)}function e(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||et);if(u){var o={};for(r=t-1;++r<e;){var i=n[r]+"";(jt.call(o,i)?o[i]:o[i]=[]).push(n[r])}}return function(r){if(u){var e=r+"";return jt.call(o,e)&&-1<C(o[e],r)}return-1<C(n,r,t)}}function u(n){return n.charCodeAt(0)}function o(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1
}return r<e?-1:1}function i(n,t,r,e){function u(){var f=arguments,c=i?this:t;return o||(n=t[a]),r.length&&(f=f.length?(f=v(f),e?f.concat(r):r.concat(f)):r),this instanceof u?(s.prototype=n.prototype,c=new s,s.prototype=null,f=n.apply(c,f),x(f)?f:c):n.apply(c,f)}var o=w(n),i=!r,a=t;return i&&(r=t),o||(t=n),u}function a(n,t,r){if(!n)return G;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=cr(n);return function(t){for(var r=u.length,e=!1;r--&&(e=j(t[u[r]],n[u[r]],rt)););return e
}}return typeof t!="undefined"?r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n}function f(){for(var n,t={e:X,f:Ut,h:Gt,i:Qt,j:yt,b:"k(m)",c:"",g:"",k:"",l:!0},r=0;n=arguments[r];r++)for(var e in n)t[e]=n[e];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],r=Function,e="var i,m="+t.d+",u=m;if(!m)return u;"+t.k+";",t.b?(e+="var n=m.length;i=-1;if("+t.b+"){",t.i&&(e+="if(l(m)){m=m.split('')}"),e+="while(++i<n){"+t.g+"}}else{"):t.h&&(e+="var n=m.length;i=-1;if(n&&j(m)){while(++i<n){i+='';"+t.g+"}}else{"),t.e||(e+="var v=typeof m=='function'&&t.call(m,'prototype');"),t.f&&t.l?(e+="var r=-1,s=q[typeof m]?o(m):[],n=s.length;while(++r<n){i=s[r];",t.e||(e+="if(!(v&&i=='prototype')){"),e+=t.g+"",t.e||(e+="}")):(e+="for(i in m){",(!t.e||t.l)&&(e+="if(",t.e||(e+="!(v&&i=='prototype')"),!t.e&&t.l&&(e+="&&"),t.l&&(e+="h.call(m,i)"),e+="){"),e+=t.g+";",(!t.e||t.l)&&(e+="}")),e+="}",t.e){e+="var f=m.constructor;";
for(var u=0;7>u;u++)e+="i='"+t.j[u]+"';if(","constructor"==t.j[u]&&(e+="!(f&&f.prototype===m)&&"),e+="h.call(m,i)){"+t.g+"}"}return(t.b||t.h)&&(e+="}"),e+=t.c+";return u",r("e,h,j,k,l,q,o,t","return function("+n+"){"+e+"}")(a,jt,h,fr,A,nr,qt,xt)}function c(n){return"\\"+tr[n]}function l(n){return lr[n]}function p(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function s(){}function v(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=Array(0>r?0:r);++e<r;)u[e]=n[t+e];
return u}function g(n){return pr[n]}function h(n){return Ot.call(n)==Ft}function y(n){var t=!1;if(!n||typeof n!="object"||h(n))return t;var r=n.constructor;return!w(r)&&(!Wt||!p(n))||r instanceof r?Y?(ir(n,function(n,r,e){return t=!jt.call(e,r),!1}),!1===t):(ir(n,function(n,r){t=r}),!1===t||jt.call(n,t)):t}function m(n){var t=[];return ar(n,function(n,r){t.push(r)}),t}function _(n,t,r,e,u){if(t=!r&&t,r=x(n)){var o=Ot.call(n);if(!Yt[o]||Wt&&p(n))return n;var i=fr(n)}if(!r||!t)return r?i?v(n):sr({},n):n;
switch(r=Zt[o],o){case It:case Tt:return new r(+n);case Bt:case zt:return new r(n);case Pt:return r(n.source,ct.exec(n))}for(e||(e=[]),u||(u=[]),o=e.length;o--;)if(e[o]==n)return u[o];var a=i?r(n.length):{};return e.push(n),u.push(a),(i?$:ar)(n,function(n,r){a[r]=_(n,t,null,e,u)}),i&&(jt.call(n,"index")&&(a.index=n.index),jt.call(n,"input")&&(a.input=n.input)),a}function d(n){var t=[];return ir(n,function(n,r){w(n)&&t.push(r)}),t.sort()}function b(n){for(var t=-1,r=cr(n),e=r.length,u={};++t<e;){var o=r[t];
u[n[o]]=o}return u}function j(n,t,r,e,u){if(n===t)return 0!==n||1/n==1/t;var o=typeof n,i=typeof t;if(n===n&&(!n||"function"!=o&&"object"!=o)&&(!t||"function"!=i&&"object"!=i))return!1;if(i=Ot.call(n),o=Ot.call(t),i==Ft&&(i=Mt),o==Ft&&(o=Mt),i!=o)return!1;switch(i){case It:case Tt:return+n==+t;case Bt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case Pt:case zt:return n==t+""}if(o=i==Dt,!o){if(n.__wrapped__||t.__wrapped__)return j(n.__wrapped__||n,t.__wrapped__||t,r);if(i!=Mt||Wt&&(p(n)||p(t)))return!1;
var i=!Ht&&h(n)?Object:n.constructor,a=!Ht&&h(t)?Object:t.constructor;if(i!=a&&(!w(i)||!(i instanceof i&&w(a)&&a instanceof a)))return!1}for(e||(e=[]),u||(u=[]),i=e.length;i--;)if(e[i]==n)return u[i]==t;var f=!0,c=0;if(e.push(n),u.push(t),o){if(c=t.length,f=r==rt||c==n.length)for(;c--&&(f=j(n[c],t[c],r,e,u)););return f}return ir(t,function(t,o,i){return jt.call(i,o)?(c++,f=jt.call(n,o)&&j(n[o],t,r,e,u)):void 0}),f&&r!=rt&&ir(n,function(n,t,r){return jt.call(r,t)?f=-1<--c:void 0}),f}function w(n){return typeof n=="function"
}function x(n){return n?nr[typeof n]:!1}function O(n){return typeof n=="number"||Ot.call(n)==Bt}function A(n){return typeof n=="string"||Ot.call(n)==zt}function S(n,t,r){var e=arguments,u=0,o=2;if(!x(n))return n;if(r===rt)var i=e[3],f=e[4],c=e[5];else f=[],c=[],typeof r!="number"&&(o=e.length,i=typeof(i=e[o-2])=="function"?a(i,e[--o]):typeof(i=e[o-1])=="function"&&i);for(;++u<o;){var l=fr(e[u]);(l?$:ar)(e[u],function(t,r){var e,u,o=n[r];if(t&&((u=gr(t))||fr(t))){for(var a=f.length;a--;)if(e=f[a]==t){o=c[a];
break}e||(o=u?gr(o)?o:{}:fr(o)?o:[],i&&(o=i(o,t)),f.push(t),c.push(o),o=o&&S(o,t,rt,i,f,c))}else i?o=i(o,t):(l||typeof t!="undefined")&&(o=t);n[r]=o})}return n}function k(n){for(var t=-1,r=cr(n),e=r.length,u=Array(e);++t<e;)u[t]=n[r[t]];return u}function E(n,t,r){var e=-1,u=n?n.length:0,o=!1;return r=(0>r?Nt(0,u+r):r)||0,typeof u=="number"?o=-1<(A(n)?n.indexOf(t,r):C(n,t,r)):or(n,function(n){return++e<r?void 0:!(o=n===t)}),o}function q(n,t,r){var e=!0;if(t=a(t,r),fr(n)){r=-1;for(var u=n.length;++r<u&&(e=!!t(n[r],r,n)););}else or(n,function(n,r,u){return e=!!t(n,r,u)
});return e}function N(n,t,r){var e=[];if(t=a(t,r),fr(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}}else or(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function R(n,t,r){var e;return t=a(t,r),$(n,function(n,r,u){return t(n,r,u)?(e=n,!1):void 0}),e}function $(n,t,r){if(t&&typeof r=="undefined"&&fr(n)){r=-1;for(var e=n.length;++r<e&&!1!==t(n[r],r,n););}else or(n,t,r);return n}function F(n,t,r){var e=-1,u=n?n.length:0,o=Array(typeof u=="number"?u:0);if(t=a(t,r),fr(n))for(;++e<u;)o[e]=t(n[e],e,n);
else or(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function D(n,t,r){var e=-1/0,o=e;if(!t&&fr(n)){r=-1;for(var i=n.length;++r<i;){var f=n[r];f>o&&(o=f)}}else t=!t&&A(n)?u:a(t,r),or(n,function(n,r,u){r=t(n,r,u),r>e&&(e=r,o=n)});return o}function I(n,t){return F(n,t+"")}function T(n,t,r,e){var u=3>arguments.length;if(t=a(t,e,rt),fr(n)){var o=-1,i=n.length;for(u&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n)}else or(n,function(n,e,o){r=u?(u=!1,n):t(r,n,e,o)});return r}function B(n,t,r,e){var u=n,o=n?n.length:0,i=3>arguments.length;
if(typeof o!="number")var f=cr(n),o=f.length;else Qt&&A(n)&&(u=n.split(""));return t=a(t,e,rt),$(n,function(n,e,a){e=f?f[--o]:--o,r=i?(i=!1,u[e]):t(r,u[e],e,a)}),r}function M(n,t,r){var e;if(t=a(t,r),fr(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else or(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function P(n,t,r){if(n){var e=0,u=n.length;if(typeof t=="function"){var o=-1;for(t=a(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[0];return v(n,0,Rt(Nt(0,e),u))}}function z(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];
fr(o)?wt.apply(u,t?o:z(o)):u.push(o)}return u}function C(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?Nt(0,u+r):r||0)-1;else if(r)return e=L(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function K(n,t,r){if(typeof t=="function"){var e=0,u=-1,o=n?n.length:0;for(t=a(t,r);++u<o&&t(n[u],u,n);)e++}else e=null==t||r?1:Nt(0,t);return v(n,e)}function L(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?a(r,e):G,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function U(n,t,r,e){var u=-1,o=n?n.length:0,i=[],f=i;
typeof t=="function"&&(e=r,r=t,t=!1);var c=!t&&75<=o;if(c)var l={};for(r&&(f=[],r=a(r,e));++u<o;){e=n[u];var p=r?r(e,u,n):e;if(c)var s=p+"",s=jt.call(l,s)?!(f=l[s]):f=l[s]=[];(t?!u||f[f.length-1]!==p:s||0>C(f,p))&&((r||c)&&f.push(p),i.push(e))}return i}function V(n,t){return Lt||At&&2<arguments.length?At.call.apply(At,arguments):i(n,t,v(arguments,2))}function G(n){return n}function H(n){$(d(n),function(t){var e=r[t]=n[t];r.prototype[t]=function(){var n=[this.__wrapped__];return wt.apply(n,arguments),new r(e.apply(r,n))
}})}function J(){return this.__wrapped__}var Q=typeof exports=="object"&&exports,W=typeof global=="object"&&global;W.global===W&&(n=W);var X,Y,Z=[],nt={},tt=0,rt=nt,et=30,ut=n._,ot=/&(?:amp|lt|gt|quot|#x27);/g,it=/\b__p\+='';/g,at=/\b(__p\+=)''\+/g,ft=/(__e\(.*?\)|\b__t\))\+'';/g,ct=/\w*$/,lt=RegExp("^"+(nt.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),pt=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,st=/<%=([\s\S]+?)%>/g,vt=/($^)/,gt=/[&<>"']/g,ht=/['\n\r\t\u2028\u2029\\]/g,yt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),mt=Math.ceil,_t=Z.concat,dt=Math.floor,bt=lt.test(bt=Object.getPrototypeOf)&&bt,jt=nt.hasOwnProperty,wt=Z.push,xt=nt.propertyIsEnumerable,Ot=nt.toString,At=lt.test(At=v.bind)&&At,St=lt.test(St=Array.isArray)&&St,kt=n.isFinite,Et=n.isNaN,qt=lt.test(qt=Object.keys)&&qt,Nt=Math.max,Rt=Math.min,$t=Math.random,Ft="[object Arguments]",Dt="[object Array]",It="[object Boolean]",Tt="[object Date]",Bt="[object Number]",Mt="[object Object]",Pt="[object RegExp]",zt="[object String]",Ct=!!n.attachEvent,Kt=At&&!/\n|true/.test(At+Ct),Lt=At&&!Kt,Ut=qt&&(Ct||Kt),Vt=(Vt={0:1,length:1},Z.splice.call(Vt,0,1),Vt[0]),Gt=!0;
(function(){function n(){this.x=1}var t=[];n.prototype={valueOf:1,y:1};for(var r in new n)t.push(r);for(r in arguments)Gt=!r;X=!/valueOf/.test(t),Y="x"!=t[0]})(1);var Ht=arguments.constructor==Object,Jt=!h(arguments),Qt="xx"!="x"[0]+Object("x")[0];try{var Wt=Ot.call(document)==Mt&&!1}catch(Xt){}var Yt={"[object Function]":!1};Yt[Ft]=Yt[Dt]=Yt[It]=Yt[Tt]=Yt[Bt]=Yt[Mt]=Yt[Pt]=Yt[zt]=!0;var Zt={};Zt[Dt]=Array,Zt[It]=Boolean,Zt[Tt]=Date,Zt[Mt]=Object,Zt[Bt]=Number,Zt[Pt]=RegExp,Zt[zt]=String;var nr={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},tr={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};
r.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:st,variable:"",imports:{_:r}};var rr={a:"p,w,g",k:"var a=0,b=typeof g=='number'?2:arguments.length;while(++a<b){m=arguments[a];if(m&&q[typeof m]){",g:"u[i]=m[i]",c:"}}"},er={a:"d,c,x",k:"c=c&&typeof x=='undefined'?c:e(c,x)",b:"typeof n=='number'",g:"if(c(m[i],i,d)===false)return u"},ur={k:"if(!q[typeof m])return u;"+er.k,b:!1},or=f(er);Jt&&(h=function(n){return n?jt.call(n,"callee"):!1});var ir=f(er,ur,{l:!1}),ar=f(er,ur),fr=St||function(n){return Ht&&n instanceof Array||Ot.call(n)==Dt
},cr=qt?function(n){return typeof n=="function"&&xt.call(n,"prototype")?m(n):x(n)?qt(n):[]}:m,lr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},pr=b(lr),sr=f(rr),vr=f(rr,{g:"if(u[i]==null)"+rr.g});w(/x/)&&(w=function(n){return n instanceof Function||"[object Function]"==Ot.call(n)});var gr=bt?function(n){if(!n||typeof n!="object")return!1;var t=n.valueOf,r=typeof t=="function"&&(r=bt(t))&&bt(r);return r?n==r||bt(n)==r&&!h(n):y(n)}:y;r.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0
}return r<e?-1:1}function i(n,t,r,e){function u(){var f=arguments,c=i?this:t;return o||(n=t[a]),r.length&&(f=f.length?(f=v(f),e?f.concat(r):r.concat(f)):r),this instanceof u?(s.prototype=n.prototype,c=new s,s.prototype=null,f=n.apply(c,f),x(f)?f:c):n.apply(c,f)}var o=w(n),i=!r,a=t;return i&&(r=t),o||(t=n),u}function a(n,r,e){if(!n)return G;var u=typeof n;if("function"!=u){if("object"!=u)return function(t){return t[n]};var o=cr(n);return function(r){for(var e=o.length,u=!1;e--&&(u=j(r[o[e]],n[o[e]],t,t,rt)););return u
}}return typeof r!="undefined"?1===e?function(t){return n.call(r,t)}:2===e?function(t,e){return n.call(r,t,e)}:4===e?function(t,e,u,o){return n.call(r,t,e,u,o)}:function(t,e,u){return n.call(r,t,e,u)}:n}function f(){for(var n,t={e:X,f:Ut,h:Gt,i:Qt,j:ht,b:"k(m)",c:"",g:"",k:"",l:!0},r=0;n=arguments[r];r++)for(var e in n)t[e]=n[e];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],r=Function,e="var i,m="+t.d+",u=m;if(!m)return u;"+t.k+";",t.b?(e+="var n=m.length;i=-1;if("+t.b+"){",t.i&&(e+="if(l(m)){m=m.split('')}"),e+="while(++i<n){"+t.g+"}}else{"):t.h&&(e+="var n=m.length;i=-1;if(n&&j(m)){while(++i<n){i+='';"+t.g+"}}else{"),t.e||(e+="var v=typeof m=='function'&&t.call(m,'prototype');"),t.f&&t.l?(e+="var r=-1,s=q[typeof m]?o(m):[],n=s.length;while(++r<n){i=s[r];",t.e||(e+="if(!(v&&i=='prototype')){"),e+=t.g+"",t.e||(e+="}")):(e+="for(i in m){",(!t.e||t.l)&&(e+="if(",t.e||(e+="!(v&&i=='prototype')"),!t.e&&t.l&&(e+="&&"),t.l&&(e+="h.call(m,i)"),e+="){"),e+=t.g+";",(!t.e||t.l)&&(e+="}")),e+="}",t.e){e+="var f=m.constructor;";
for(var u=0;7>u;u++)e+="i='"+t.j[u]+"';if(","constructor"==t.j[u]&&(e+="!(f&&f.prototype===m)&&"),e+="h.call(m,i)){"+t.g+"}"}return(t.b||t.h)&&(e+="}"),e+=t.c+";return u",r("e,h,j,k,l,q,o,t","return function("+n+"){"+e+"}")(a,jt,y,fr,A,nr,qt,xt)}function c(n){return"\\"+tr[n]}function l(n){return lr[n]}function p(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function s(){}function v(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=Array(0>r?0:r);++e<r;)u[e]=n[t+e];
return u}function g(n){return pr[n]}function y(n){return Ot.call(n)==Ft}function h(n){var t=!1;if(!n||typeof n!="object"||y(n))return t;var r=n.constructor;return!w(r)&&(!Wt||!p(n))||r instanceof r?Y?(ir(n,function(n,r,e){return t=!jt.call(e,r),!1}),!1===t):(ir(n,function(n,r){t=r}),!1===t||jt.call(n,t)):t}function m(n){var t=[];return ar(n,function(n,r){t.push(r)}),t}function _(n,r,e,u,o,i){var f=n;if(typeof r=="function"&&(u=e,e=r,r=!1),typeof e=="function"){e=typeof u=="undefined"?e:a(e,u,1);var f=e(f),c=n!==f
}if(u=x(f)){var l=Ot.call(f);if(!Yt[l]||Wt&&p(f))return f;var s=fr(f)}if(!u||!r)return u&&!c?s?v(f):sr({},f):f;switch(u=Zt[l],l){case It:case Tt:return c?f:new u(+f);case Bt:case zt:return c?f:new u(f);case Pt:return c?f:u(f.source,ct.exec(f))}for(o||(o=[]),i||(i=[]),l=o.length;l--;)if(o[l]==n)return i[l];return c||(f=s?u(f.length):{},s&&(jt.call(n,"index")&&(f.index=n.index),jt.call(n,"input")&&(f.input=n.input))),o.push(n),i.push(f),(s?$:ar)(c?f:n,function(n,u){f[u]=_(n,r,e,t,o,i)}),f}function d(n){var t=[];
return ir(n,function(n,r){w(n)&&t.push(r)}),t.sort()}function b(n){for(var t=-1,r=cr(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function j(n,r,e,u,o,i,f){if(e){e=typeof u=="undefined"?e:a(e,u,2);var c=e(n,r);if(typeof c=="boolean")return c}if(n===r)return 0!==n||1/n==1/r;u=typeof n;var l=typeof r;if(n===n&&(!n||"function"!=u&&"object"!=u)&&(!r||"function"!=l&&"object"!=l))return!1;if(l=Ot.call(n),u=Ot.call(r),l==Ft&&(l=Mt),u==Ft&&(u=Mt),l!=u)return!1;switch(l){case It:case Tt:return+n==+r;
case Bt:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case Pt:case zt:return n==r+""}if(u=l==Dt,!u){if(n.__wrapped__||r.__wrapped__)return j(n.__wrapped__||n,r.__wrapped__||r,e,t,o,i,f);if(l!=Mt||Wt&&(p(n)||p(r)))return!1;var l=!Ht&&y(n)?Object:n.constructor,s=!Ht&&y(r)?Object:r.constructor;if(l!=s&&(!w(l)||!(l instanceof l&&w(s)&&s instanceof s)))return!1}for(i||(i=[]),f||(f=[]),l=i.length;l--;)if(i[l]==n)return f[l]==r;var v=0,c=!0;if(i.push(n),f.push(r),u){if(v=r.length,c=o==rt||v==n.length)for(;v--&&(c=j(n[v],r[v],e,t,o,i,f)););return c
}return ir(r,function(r,u,a){return jt.call(a,u)?(v++,c=jt.call(n,u)&&j(n[u],r,e,t,o,i,f)):void 0}),c&&o!=rt&&ir(n,function(n,t,r){return jt.call(r,t)?c=-1<--v:void 0}),c}function w(n){return typeof n=="function"}function x(n){return n?nr[typeof n]:!1}function O(n){return typeof n=="number"||Ot.call(n)==Bt}function A(n){return typeof n=="string"||Ot.call(n)==zt}function S(n,t,r){var e=arguments,u=0,o=2;if(!x(n))return n;if(r===rt)var i=e[3],f=e[4],c=e[5];else f=[],c=[],typeof r!="number"&&(o=e.length,i=typeof(i=e[o-2])=="function"?a(i,e[--o],2):typeof(i=e[o-1])=="function"&&i);
for(;++u<o;){var l=fr(e[u]);(l?$:ar)(e[u],function(t,r){var e,u,o=n[r];if(t&&((u=gr(t))||fr(t))){for(var a=f.length;a--;)if(e=f[a]==t){o=c[a];break}e||(o=u?gr(o)?o:{}:fr(o)?o:[],i&&(o=i(o,t)),f.push(t),c.push(o),o=o&&S(o,t,rt,i,f,c))}else i?o=i(o,t):(l||typeof t!="undefined")&&(o=t);n[r]=o})}return n}function k(n){for(var t=-1,r=cr(n),e=r.length,u=Array(e);++t<e;)u[t]=n[r[t]];return u}function E(n,t,r){var e=-1,u=n?n.length:0,o=!1;return r=(0>r?Nt(0,u+r):r)||0,typeof u=="number"?o=-1<(A(n)?n.indexOf(t,r):C(n,t,r)):or(n,function(n){return++e<r?void 0:!(o=n===t)
}),o}function q(n,t,r){var e=!0;if(t=a(t,r),fr(n)){r=-1;for(var u=n.length;++r<u&&(e=!!t(n[r],r,n)););}else or(n,function(n,r,u){return e=!!t(n,r,u)});return e}function N(n,t,r){var e=[];if(t=a(t,r),fr(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}}else or(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function R(n,t,r){var e;return t=a(t,r),$(n,function(n,r,u){return t(n,r,u)?(e=n,!1):void 0}),e}function $(n,t,r){if(t&&typeof r=="undefined"&&fr(n)){r=-1;for(var e=n.length;++r<e&&!1!==t(n[r],r,n););}else or(n,t,r);
return n}function F(n,t,r){var e=-1,u=n?n.length:0,o=Array(typeof u=="number"?u:0);if(t=a(t,r),fr(n))for(;++e<u;)o[e]=t(n[e],e,n);else or(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function D(n,t,r){var e=-1/0,o=e;if(!t&&fr(n)){r=-1;for(var i=n.length;++r<i;){var f=n[r];f>o&&(o=f)}}else t=!t&&A(n)?u:a(t,r),or(n,function(n,r,u){r=t(n,r,u),r>e&&(e=r,o=n)});return o}function I(n,t){return F(n,t+"")}function T(n,t,r,e){var u=3>arguments.length;if(t=a(t,e,4),fr(n)){var o=-1,i=n.length;for(u&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n)
}else or(n,function(n,e,o){r=u?(u=!1,n):t(r,n,e,o)});return r}function B(n,t,r,e){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var f=cr(n),o=f.length;else Qt&&A(n)&&(u=n.split(""));return t=a(t,e,4),$(n,function(n,e,a){e=f?f[--o]:--o,r=i?(i=!1,u[e]):t(r,u[e],e,a)}),r}function M(n,t,r){var e;if(t=a(t,r),fr(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else or(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function P(n,t,r){if(n){var e=0,u=n.length;if(typeof t=="function"){var o=-1;
for(t=a(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[0];return v(n,0,Rt(Nt(0,e),u))}}function z(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];fr(o)?wt.apply(u,t?o:z(o)):u.push(o)}return u}function C(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?Nt(0,u+r):r||0)-1;else if(r)return e=L(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function K(n,t,r){if(typeof t=="function"){var e=0,u=-1,o=n?n.length:0;for(t=a(t,r);++u<o&&t(n[u],u,n);)e++}else e=null==t||r?1:Nt(0,t);
return v(n,e)}function L(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?a(r,e,1):G,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function U(n,t,r,e){var u=-1,o=n?n.length:0,i=[],f=i;typeof t=="function"&&(e=r,r=t,t=!1);var c=!t&&75<=o;if(c)var l={};for(r&&(f=[],r=a(r,e));++u<o;){e=n[u];var p=r?r(e,u,n):e;if(c)var s=p+"",s=jt.call(l,s)?!(f=l[s]):f=l[s]=[];(t?!u||f[f.length-1]!==p:s||0>C(f,p))&&((r||c)&&f.push(p),i.push(e))}return i}function V(n,t){return Lt||At&&2<arguments.length?At.call.apply(At,arguments):i(n,t,v(arguments,2))
}function G(n){return n}function H(n){$(d(n),function(t){var e=r[t]=n[t];r.prototype[t]=function(){var n=[this.__wrapped__];return wt.apply(n,arguments),new r(e.apply(r,n))}})}function J(){return this.__wrapped__}var Q=typeof exports=="object"&&exports,W=typeof global=="object"&&global;W.global===W&&(n=W);var X,Y,Z=[],nt={},tt=0,rt=nt,et=30,ut=n._,ot=/&(?:amp|lt|gt|quot|#x27);/g,it=/\b__p\+='';/g,at=/\b(__p\+=)''\+/g,ft=/(__e\(.*?\)|\b__t\))\+'';/g,ct=/\w*$/,lt=RegExp("^"+(nt.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),pt=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,st=/<%=([\s\S]+?)%>/g,vt=/($^)/,gt=/[&<>"']/g,yt=/['\n\r\t\u2028\u2029\\]/g,ht="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),mt=Math.ceil,_t=Z.concat,dt=Math.floor,bt=lt.test(bt=Object.getPrototypeOf)&&bt,jt=nt.hasOwnProperty,wt=Z.push,xt=nt.propertyIsEnumerable,Ot=nt.toString,At=lt.test(At=v.bind)&&At,St=lt.test(St=Array.isArray)&&St,kt=n.isFinite,Et=n.isNaN,qt=lt.test(qt=Object.keys)&&qt,Nt=Math.max,Rt=Math.min,$t=Math.random,Ft="[object Arguments]",Dt="[object Array]",It="[object Boolean]",Tt="[object Date]",Bt="[object Number]",Mt="[object Object]",Pt="[object RegExp]",zt="[object String]",Ct=!!n.attachEvent,Kt=At&&!/\n|true/.test(At+Ct),Lt=At&&!Kt,Ut=qt&&(Ct||Kt),Vt=(Vt={0:1,length:1},Z.splice.call(Vt,0,1),Vt[0]),Gt=!0;
(function(){function n(){this.x=1}var t=[];n.prototype={valueOf:1,y:1};for(var r in new n)t.push(r);for(r in arguments)Gt=!r;X=!/valueOf/.test(t),Y="x"!=t[0]})(1);var Ht=arguments.constructor==Object,Jt=!y(arguments),Qt="xx"!="x"[0]+Object("x")[0];try{var Wt=Ot.call(document)==Mt&&!1}catch(Xt){}var Yt={"[object Function]":!1};Yt[Ft]=Yt[Dt]=Yt[It]=Yt[Tt]=Yt[Bt]=Yt[Mt]=Yt[Pt]=Yt[zt]=!0;var Zt={};Zt[Dt]=Array,Zt[It]=Boolean,Zt[Tt]=Date,Zt[Mt]=Object,Zt[Bt]=Number,Zt[Pt]=RegExp,Zt[zt]=String;var nr={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},tr={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};
r.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:st,variable:"",imports:{_:r}};var rr={a:"p,w,g",k:"var a=0,b=typeof g=='number'?2:arguments.length;while(++a<b){m=arguments[a];if(m&&q[typeof m]){",g:"u[i]=m[i]",c:"}}"},er={a:"d,c,x",k:"c=c&&typeof x=='undefined'?c:e(c,x)",b:"typeof n=='number'",g:"if(c(m[i],i,d)===false)return u"},ur={k:"if(!q[typeof m])return u;"+er.k,b:!1},or=f(er);Jt&&(y=function(n){return n?jt.call(n,"callee"):!1});var ir=f(er,ur,{l:!1}),ar=f(er,ur),fr=St||function(n){return Ht&&n instanceof Array||Ot.call(n)==Dt
},cr=qt?function(n){return typeof n=="function"&&xt.call(n,"prototype")?m(n):x(n)?qt(n):[]}:m,lr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},pr=b(lr),sr=f(rr),vr=f(rr,{g:"if(u[i]==null)"+rr.g});w(/x/)&&(w=function(n){return n instanceof Function||"[object Function]"==Ot.call(n)});var gr=bt?function(n){if(!n||typeof n!="object")return!1;var t=n.valueOf,r=typeof t=="function"&&(r=bt(t))&&bt(r);return r?n==r||bt(n)==r&&!y(n):h(n)}:h;r.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0
}},r.assign=sr,r.at=function(n){var t=-1,r=_t.apply(Z,v(arguments,1)),e=r.length,u=Array(e);for(Qt&&A(n)&&(n=n.split(""));++t<e;)u[t]=n[r[t]];return u},r.bind=V,r.bindAll=function(n){for(var t=_t.apply(Z,arguments),r=1<t.length?0:(t=d(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=V(n[u],n)}return n},r.bindKey=function(n,t){return i(n,t,v(arguments,2))},r.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},r.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];
return t[0]}},r.countBy=function(n,t,r){var e={};return t=a(t,r),$(n,function(n,r,u){r=t(n,r,u)+"",jt.call(e,r)?e[r]++:e[r]=1}),e},r.debounce=function(n,t,r){function e(){a=null,r||(o=n.apply(i,u))}var u,o,i,a;return function(){var f=r&&!a;return u=arguments,i=this,clearTimeout(a),a=setTimeout(e,t),f&&(o=n.apply(i,u)),o}},r.defaults=vr,r.defer=function(n){var r=v(arguments,1);return setTimeout(function(){n.apply(t,r)},1)},r.delay=function(n,r){var e=v(arguments,2);return setTimeout(function(){n.apply(t,e)
},r)},r.difference=function(n){for(var t=-1,r=n?n.length:0,u=_t.apply(Z,arguments),u=e(u,r),o=[];++t<r;){var i=n[t];u(i)||o.push(i)}return o},r.filter=N,r.flatten=z,r.forEach=$,r.forIn=ir,r.forOwn=ar,r.functions=d,r.groupBy=function(n,t,r){var e={};return t=a(t,r),$(n,function(n,r,u){r=t(n,r,u)+"",(jt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},r.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;if(typeof t=="function"){var o=u;for(t=a(t,r);o--&&t(n[o],o,n);)e++}else e=null==t||r?1:t||e;return v(n,0,Rt(Nt(0,u-e),u))
@@ -30,10 +30,10 @@ return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";return jt.ca
else var o=_t.apply(Z,arguments);return ir(n,function(n,r,i){(e?!t(n,r,i):0>C(o,r,1))&&(u[r]=n)}),u},r.once=function(n){var t,r;return function(){return t?r:(t=!0,r=n.apply(this,arguments),n=null,r)}},r.pairs=function(n){for(var t=-1,r=cr(n),e=r.length,u=Array(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},r.partial=function(n){return i(n,v(arguments,1))},r.partialRight=function(n){return i(n,v(arguments,1),null,rt)},r.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=0,o=_t.apply(Z,arguments),i=x(n)?o.length:0;++u<i;){var f=o[u];
f in n&&(e[f]=n[f])}else t=a(t,r),ir(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},r.pluck=I,r.range=function(n,t,r){n=+n||0,r=+r||1,null==t&&(t=n,n=0);var e=-1;t=Nt(0,mt((t-n)/r));for(var u=Array(t);++e<t;)u[e]=n,n+=r;return u},r.reject=function(n,t,r){return t=a(t,r),N(n,function(n,r,e){return!t(n,r,e)})},r.rest=K,r.shuffle=function(n){var t=-1,r=n?n.length:0,e=Array(typeof r=="number"?r:0);return $(n,function(n){var r=dt($t()*(++t+1));e[t]=e[r],e[r]=n}),e},r.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,i=Array(typeof u=="number"?u:0);
for(t=a(t,r),$(n,function(n,r,u){i[++e]={a:t(n,r,u),b:e,c:n}}),u=i.length,i.sort(o);u--;)i[u]=i[u].c;return i},r.tap=function(n,t){return t(n),n},r.throttle=function(n,t){function r(){a=new Date,i=null,u=n.apply(o,e)}var e,u,o,i,a=0;return function(){var f=new Date,c=t-(f-a);return e=arguments,o=this,0<c?i||(i=setTimeout(r,c)):(clearTimeout(i),i=null,a=f,u=n.apply(o,e)),u}},r.times=function(n,t,r){n=+n||0;for(var e=-1,u=Array(n);++e<n;)u[e]=t.call(r,e);return u},r.toArray=function(n){return n&&typeof n.length=="number"?Qt&&A(n)?n.split(""):v(n):k(n)
},r.union=function(){return U(_t.apply(Z,arguments))},r.uniq=U,r.values=k,r.where=function(n,t){return N(n,t)},r.without=function(n){for(var t=-1,r=n?n.length:0,u=e(arguments,1),o=[];++t<r;){var i=n[t];u(i)||o.push(i)}return o},r.wrap=function(n,t){return function(){var r=[n];return wt.apply(r,arguments),t.apply(this,r)}},r.zip=function(n){for(var t=-1,r=n?D(I(arguments,"length")):0,e=Array(r);++t<r;)e[t]=I(arguments,t);return e},r.collect=F,r.drop=K,r.each=$,r.extend=sr,r.methods=d,r.select=N,r.tail=K,r.unique=U,H(r),r.clone=_,r.cloneDeep=function(n){return _(n,!0)
},r.contains=E,r.escape=function(n){return null==n?"":(n+"").replace(gt,l)},r.every=q,r.find=R,r.has=function(n,t){return n?jt.call(n,t):!1},r.identity=G,r.indexOf=C,r.isArguments=h,r.isArray=fr,r.isBoolean=function(n){return!0===n||!1===n||Ot.call(n)==It},r.isDate=function(n){return n instanceof Date||Ot.call(n)==Tt},r.isElement=function(n){return n?1===n.nodeType:!1},r.isEmpty=function(n){var t=!0;if(!n)return t;var r=Ot.call(n),e=n.length;return r==Dt||r==zt||r==Ft||Jt&&h(n)||r==Mt&&typeof e=="number"&&w(n.splice)?!e:(ar(n,function(){return t=!1
},r.union=function(){return U(_t.apply(Z,arguments))},r.uniq=U,r.values=k,r.where=function(n,t){return N(n,t)},r.without=function(n){for(var t=-1,r=n?n.length:0,u=e(arguments,1),o=[];++t<r;){var i=n[t];u(i)||o.push(i)}return o},r.wrap=function(n,t){return function(){var r=[n];return wt.apply(r,arguments),t.apply(this,r)}},r.zip=function(n){for(var t=-1,r=n?D(I(arguments,"length")):0,e=Array(r);++t<r;)e[t]=I(arguments,t);return e},r.collect=F,r.drop=K,r.each=$,r.extend=sr,r.methods=d,r.select=N,r.tail=K,r.unique=U,H(r),r.clone=_,r.cloneDeep=function(n,t,r){return _(n,!0,t,r)
},r.contains=E,r.escape=function(n){return null==n?"":(n+"").replace(gt,l)},r.every=q,r.find=R,r.has=function(n,t){return n?jt.call(n,t):!1},r.identity=G,r.indexOf=C,r.isArguments=y,r.isArray=fr,r.isBoolean=function(n){return!0===n||!1===n||Ot.call(n)==It},r.isDate=function(n){return n instanceof Date||Ot.call(n)==Tt},r.isElement=function(n){return n?1===n.nodeType:!1},r.isEmpty=function(n){var t=!0;if(!n)return t;var r=Ot.call(n),e=n.length;return r==Dt||r==zt||r==Ft||Jt&&y(n)||r==Mt&&typeof e=="number"&&w(n.splice)?!e:(ar(n,function(){return t=!1
}),t)},r.isEqual=j,r.isFinite=function(n){return kt(n)&&!Et(parseFloat(n))},r.isFunction=w,r.isNaN=function(n){return O(n)&&n!=+n},r.isNull=function(n){return null===n},r.isNumber=O,r.isObject=x,r.isPlainObject=gr,r.isRegExp=function(n){return n instanceof RegExp||Ot.call(n)==Pt},r.isString=A,r.isUndefined=function(n){return typeof n=="undefined"},r.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Nt(0,e+r):Rt(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},r.mixin=H,r.noConflict=function(){return n._=ut,this
},r.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+dt($t()*((+t||0)-n+1))},r.reduce=T,r.reduceRight=B,r.result=function(n,t){var r=n?n[t]:null;return w(r)?n[t]():r},r.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:cr(n).length},r.some=M,r.sortedIndex=L,r.template=function(n,e,u){var o=r.templateSettings;n||(n=""),u=vr({},u,o);var i,a=vr({},u.imports,o.imports),o=cr(a),a=k(a),f=0,l=u.interpolate||vt,p="__p+='";n.replace(RegExp((u.escape||vt).source+"|"+l.source+"|"+(l===st?pt:vt).source+"|"+(u.evaluate||vt).source+"|$","g"),function(t,r,e,u,o,a){return e||(e=u),p+=n.slice(f,a).replace(ht,c),r&&(p+="'+__e("+r+")+'"),o&&(i=!0,p+="';"+o+";__p+='"),e&&(p+="'+((__t=("+e+"))==null?'':__t)+'"),f=a+t.length,t
},r.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+dt($t()*((+t||0)-n+1))},r.reduce=T,r.reduceRight=B,r.result=function(n,t){var r=n?n[t]:null;return w(r)?n[t]():r},r.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:cr(n).length},r.some=M,r.sortedIndex=L,r.template=function(n,e,u){var o=r.templateSettings;n||(n=""),u=vr({},u,o);var i,a=vr({},u.imports,o.imports),o=cr(a),a=k(a),f=0,l=u.interpolate||vt,p="__p+='";n.replace(RegExp((u.escape||vt).source+"|"+l.source+"|"+(l===st?pt:vt).source+"|"+(u.evaluate||vt).source+"|$","g"),function(t,r,e,u,o,a){return e||(e=u),p+=n.slice(f,a).replace(yt,c),r&&(p+="'+__e("+r+")+'"),o&&(i=!0,p+="';"+o+";__p+='"),e&&(p+="'+((__t=("+e+"))==null?'':__t)+'"),f=a+t.length,t
}),p+="';\n",l=u=u.variable,l||(u="obj",p="with("+u+"){"+p+"}"),p=(i?p.replace(it,""):p).replace(at,"$1").replace(ft,"$1;"),p="function("+u+"){"+(l?"":u+"||("+u+"={});")+"var __t,__p='',__e=_.escape"+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(l?"":",__d="+u+"."+u+"||"+u)+";")+p+"return __p}";try{var s=Function(o,"return "+p).apply(t,a)}catch(v){throw v.source=p,v}return e?s(e):(s.source=p,s)},r.unescape=function(n){return null==n?"":(n+"").replace(ot,g)},r.uniqueId=function(n){var t=++tt;
return(null==n?"":n+"")+t},r.all=q,r.any=M,r.detect=R,r.foldl=T,r.foldr=B,r.include=E,r.inject=T,ar(r,function(n,t){r.prototype[t]||(r.prototype[t]=function(){var t=[this.__wrapped__];return wt.apply(t,arguments),n.apply(r,t)})}),r.first=P,r.last=function(n,t,r){if(n){var e=0,u=n.length;if(typeof t=="function"){var o=u;for(t=a(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[u-1];return v(n,Nt(0,u-e))}},r.take=P,r.head=P,ar(r,function(n,t){r.prototype[t]||(r.prototype[t]=function(t,e){var u=n(this.__wrapped__,t,e);
return null==t||e&&typeof t!="function"?u:new r(u)})}),r.VERSION="1.0.0-rc.3",r.prototype.toString=function(){return this.__wrapped__+""},r.prototype.value=J,r.prototype.valueOf=J,or(["join","pop","shift"],function(n){var t=Z[n];r.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),or(["push","reverse","sort","unshift"],function(n){var t=Z[n];r.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),or(["concat","slice","splice"],function(n){var t=Z[n];r.prototype[n]=function(){return new r(t.apply(this.__wrapped__,arguments))

View File

@@ -45,7 +45,7 @@
/** Used to detect if a method is native */
var reNative = RegExp('^' +
(objectRef.valueOf + '')
.replace(/[.*+?^=!:${}()|[\]\/\\]/g, '\\$&')
.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
.replace(/valueOf|for [^\]]+/g, '.+?') + '$'
);
@@ -365,18 +365,18 @@
}
/**
* Produces an iteration callback bound to an optional `thisArg`. If `func` is
* a property name, the callback will return the property value for a given element.
* 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`.
*
* @private
* @param {Function|String} [func=identity|property] The function called per
* iteration or property name to query.
* @param {Mixed} [thisArg] The `this` binding of `callback`.
* @param {Object} [accumulating] Used to indicate that the callback should
* accept an `accumulator` argument.
* @param {Mixed} [func=identity] The value to convert to a callback.
* @param {Mixed} [thisArg] The `this` binding of the created callback.
* @param {Number} [argCount=3] The number of arguments the callback accepts.
* @returns {Function} Returns a callback function.
*/
function createCallback(func, thisArg, accumulating) {
function createCallback(func, thisArg, argCount) {
if (!func) {
return identity;
}
@@ -400,7 +400,17 @@
};
}
if (typeof thisArg != 'undefined') {
if (accumulating) {
if (argCount === 1) {
return function(value) {
return func.call(thisArg, value);
};
}
if (argCount === 2) {
return function(a, b) {
return func.call(thisArg, a, b);
};
}
if (argCount === 4) {
return function(accumulator, value, index, object) {
return func.call(thisArg, accumulator, value, index, object);
};
@@ -823,18 +833,21 @@
}
/**
* Creates a clone of `value`. If `deep` is `true`, nested objects will also
* be cloned, otherwise they will be assigned by reference.
* 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` function
* is passed, it will be executed to produce the cloned values. If `callback`
* returns the value it was passed, cloning will be handled by the method instead.
* The `callback` is bound to `thisArg` and invoked with one argument; (value).
*
* @static
* @memberOf _
* @category Objects
* @param {Mixed} value The value to clone.
* @param {Boolean} deep A flag to indicate a deep clone.
* @param- {Object} [guard] Internally used to allow working with "Collections"
* methods without using their `callback` argument, `index`, for `deep`.
* @param {Boolean} [deep=false] A flag to indicate a deep clone.
* @param {Function} [callback] The function to customize cloning values.
* @param {Mixed} [thisArg] The `this` binding of `callback`.
* @param- {Array} [stackA=[]] Internally used to track traversed source objects.
* @param- {Array} [stackB=[]] Internally used to associate clones with their source counterparts.
* @param- {Array} [stackB=[]] Internally used to associate clones with source counterparts.
* @returns {Mixed} Returns the cloned `value`.
* @example
*
@@ -1053,13 +1066,18 @@
/**
* Performs a deep comparison between two values to determine if they are
* equivalent to each other.
* equivalent to each other. If `callback` is passed, it will be executed to
* compare values. If `callback` returns a non-boolean value, comparisons will
* be handled by the method instead. The `callback` is bound to `thisArg` and
* invoked with two arguments; (a, b).
*
* @static
* @memberOf _
* @category Objects
* @param {Mixed} a The value to compare.
* @param {Mixed} b The other value to compare.
* @param {Function} [callback] The function to customize comparing values.
* @param {Mixed} [thisArg] The `this` binding of `callback`.
* @param- {Object} [whereIndicator] Internally used to indicate that when
* comparing objects, `a` has at least the properties of `b`.
* @param- {Object} [stackA=[]] Internally used track traversed `a` objects.
@@ -1076,22 +1094,18 @@
* _.isEqual(moe, clone);
* // => true
*/
function isEqual(a, b, whereIndicator, stackA, stackB) {
// exit early for identical values
function isEqual(a, b, stackA, stackB) {
if (a === b) {
// treat `+0` vs. `-0` as not equal
return a !== 0 || (1 / a == 1 / b);
}
var type = typeof a,
otherType = typeof b;
// exit early for unlike primitive values
if (a === a &&
(!a || (type != 'function' && type != 'object')) &&
(!b || (otherType != 'function' && otherType != 'object'))) {
return false;
}
// compare [[Class]] names
var className = toString.call(a),
otherClass = toString.call(b);
@@ -1101,38 +1115,28 @@
switch (className) {
case boolClass:
case dateClass:
// coerce dates and booleans to numbers, dates to milliseconds and booleans
// to `1` or `0`, treating invalid dates coerced to `NaN` as not equal
return +a == +b;
case numberClass:
// treat `NaN` vs. `NaN` as equal
return a != +a
? b != +b
// but treat `+0` vs. `-0` as not equal
: (a == 0 ? (1 / a == 1 / b) : a == +b);
case regexpClass:
case stringClass:
// coerce regexes to strings (http://es5.github.com/#x15.10.6.4)
// treat string primitives and their corresponding object instances as equal
return a == b + '';
}
var isArr = className == arrayClass;
if (!isArr) {
// unwrap any `lodash` wrapped values
if (a.__wrapped__ || b.__wrapped__) {
return isEqual(a.__wrapped__ || a, b.__wrapped__ || b, whereIndicator);
return isEqual(a.__wrapped__ || a, b.__wrapped__ || b, stackA, stackB);
}
// exit for functions and DOM nodes
if (className != objectClass) {
return false;
}
// in older versions of Opera, `arguments` objects have `Array` constructors
var ctorA = a.constructor,
ctorB = b.constructor;
// non `Object` object instances with different constructors are not equal
if (ctorA != ctorB && !(
isFunction(ctorA) && ctorA instanceof ctorA &&
isFunction(ctorB) && ctorB instanceof ctorB
@@ -1140,9 +1144,6 @@
return false;
}
}
// assume cyclic structures are equal
// the algorithm for detecting cyclic structures is adapted from ES 5.1
// section 15.12.3, abstract operation `JO` (http://es5.github.com/#x15.12.3)
stackA || (stackA = []);
stackB || (stackB = []);
@@ -1155,42 +1156,32 @@
var result = true,
size = 0;
// add `a` and `b` to the stack of traversed objects
stackA.push(a);
stackB.push(b);
// recursively compare objects and arrays (susceptible to call stack limits)
if (isArr) {
// compare lengths to determine if a deep comparison is necessary
size = b.length;
result = whereIndicator == indicatorObject || size == a.length;
result = size == a.length;
if (result) {
// deep compare the contents, ignoring non-numeric properties
while (size--) {
if (!(result = isEqual(a[size], b[size], whereIndicator, stackA, stackB))) {
if (!(result = isEqual(a[size], b[size], stackA, stackB))) {
break;
}
}
}
return result;
}
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
// which, in this case, is more costly
forIn(b, function(value, key, b) {
if (hasOwnProperty.call(b, key)) {
// count the number of properties.
size++;
// deep compare each property value.
return !(result = hasOwnProperty.call(a, key) && isEqual(a[key], value, whereIndicator, stackA, stackB)) && indicatorObject;
return !(result = hasOwnProperty.call(a, key) && isEqual(a[key], value, stackA, stackB)) && indicatorObject;
}
});
if (result && whereIndicator != indicatorObject) {
// ensure both objects have the same number of properties
if (result) {
forIn(a, function(value, key, a) {
if (hasOwnProperty.call(a, key)) {
// `size` will be `-1` if `a` has more properties than `b`
return !(result = --size > -1) && indicatorObject;
}
});
@@ -1403,9 +1394,10 @@
/**
* 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 `callback` is passed, it will be executed for each property
* in the `object`, omitting the properties `callback` returns truthy for. The
* `callback` is bound to `thisArg` and invoked with three arguments; (value, key, object).
* property names. If a `callback` function is passed, it will be executed
* for each property in the `object`, omitting the properties `callback`
* returns truthy for. The `callback` is bound to `thisArg` and invoked
* with three arguments; (value, key, object).
*
* @static
* @memberOf _
@@ -2025,7 +2017,7 @@
*/
function reduce(collection, callback, accumulator, thisArg) {
var noaccum = arguments.length < 3;
callback = createCallback(callback, thisArg, indicatorObject);
callback = createCallback(callback, thisArg, 4);
if (isArray(collection)) {
var index = -1,
@@ -2075,7 +2067,7 @@
var props = keys(collection);
length = props.length;
}
callback = createCallback(callback, thisArg, indicatorObject);
callback = createCallback(callback, thisArg, 4);
forEach(collection, function(value, index, collection) {
index = props ? props[--length] : --length;
accumulator = noaccum
@@ -2271,7 +2263,9 @@
/**
* Examines each element in a `collection`, returning an array of all elements
* that have the given `properties`.
* that have the given `properties`. When checking `properties`, this method
* performs a deep comparison between values to determine if they are equivalent
* to each other.
*
* @static
* @memberOf _
@@ -2819,7 +2813,7 @@
high = array ? array.length : low;
// explicitly reference `identity` for better inlining in Firefox
callback = callback ? createCallback(callback, thisArg) : identity;
callback = callback ? createCallback(callback, thisArg, 1) : identity;
value = callback(value);
while (low < high) {

View File

@@ -5,17 +5,17 @@
* Underscore.js 1.4.3 underscorejs.org/LICENSE
*/
;(function(n,t){function r(n,t){var r;if(n&&Nt[typeof n])for(r in t||(t=U),n)if(t(n[r],r,n)===X)break}function e(n,t,r){if(n){t=t&&typeof r=="undefined"?t:i(t,r);var e=n.length;if(r=-1,typeof e=="number")for(;++r<e&&t(n[r],r,n)!==X;);else for(r in n)if(at.call(n,r)&&t(n[r],r,n)===X)break}}function u(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof u?(this.__wrapped__=n,void 0):new u(n)}function o(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1
}return r<e?-1:1}function i(n,t,r){if(!n)return U;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=Tt(n);return function(t){for(var r=u.length,e=J;r--&&(e=t[u[r]]===n[u[r]]););return e}}return typeof t!="undefined"?r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n}function a(n){return"\\"+Ft[n]}function f(n){return qt[n]}function c(){}function l(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=Array(0>r?0:r);++e<r;)u[e]=n[t+e];
return u}function p(n){return Bt[n]}function s(n){return ct.call(n)==mt}function v(n){var t,r=[],e=function(n,t){r.push(t)};if(n&&Nt[typeof n])for(t in e||(e=U),n)if(at.call(n,t)&&e(n[t],t,n)===X)break;return r}function g(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];if(e)for(var u in e)n[u]=e[u]}return n}function h(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];if(e)for(var u in e)n[u]==H&&(n[u]=e[u])}return n}function y(n){var t=[];return r(n,function(n,r){d(n)&&t.push(r)
}),t.sort()}function _(n){for(var t=-1,r=Tt(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function m(n,t,e,u,o){if(n===t)return 0!==n||1/n==1/t;var i=typeof n,a=typeof t;if(n===n&&(!n||"function"!=i&&"object"!=i)&&(!t||"function"!=a&&"object"!=a))return J;if(a=ct.call(n),i=ct.call(t),a!=i)return J;switch(a){case bt:case jt:return+n==+t;case wt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case At:case Et:return n==t+""}if(i=a==dt,!i){if(n.__wrapped__||t.__wrapped__)return m(n.__wrapped__||n,t.__wrapped__||t,e);
if(a!=xt)return J;var a=n.constructor,f=t.constructor;if(a!=f&&(!d(a)||!(a instanceof a&&d(f)&&f instanceof f)))return J}for(u||(u=[]),o||(o=[]),a=u.length;a--;)if(u[a]==n)return o[a]==t;var c=G,l=0;if(u.push(n),o.push(t),i){if(l=t.length,c=e==X||l==n.length)for(;l--&&(c=m(n[l],t[l],e,u,o)););return c}return r(t,function(t,r,i){return at.call(i,r)?(l++,!(c=at.call(n,r)&&m(n[r],t,e,u,o))&&X):void 0}),c&&e!=X&&r(n,function(n,t,r){return at.call(r,t)?!(c=-1<--l)&&X:void 0}),c}function d(n){return typeof n=="function"
}return r<e?-1:1}function i(n,t,r){if(!n)return U;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=Tt(n);return function(t){for(var r=u.length,e=J;r--&&(e=t[u[r]]===n[u[r]]););return e}}return typeof t!="undefined"?1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n}function a(n){return"\\"+Ft[n]}function f(n){return qt[n]}function c(){}function l(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);
var e=-1;r=r-t||0;for(var u=Array(0>r?0:r);++e<r;)u[e]=n[t+e];return u}function p(n){return Bt[n]}function s(n){return ct.call(n)==mt}function v(n){var t,r=[],e=function(n,t){r.push(t)};if(n&&Nt[typeof n])for(t in e||(e=U),n)if(at.call(n,t)&&e(n[t],t,n)===X)break;return r}function g(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];if(e)for(var u in e)n[u]=e[u]}return n}function h(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];if(e)for(var u in e)n[u]==H&&(n[u]=e[u])
}return n}function y(n){var t=[];return r(n,function(n,r){d(n)&&t.push(r)}),t.sort()}function _(n){for(var t=-1,r=Tt(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function m(n,t,e,u){if(n===t)return 0!==n||1/n==1/t;var o=typeof n,i=typeof t;if(n===n&&(!n||"function"!=o&&"object"!=o)&&(!t||"function"!=i&&"object"!=i))return J;if(i=ct.call(n),o=ct.call(t),i!=o)return J;switch(i){case bt:case jt:return+n==+t;case wt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case At:case Et:return n==t+""}if(o=i==dt,!o){if(n.__wrapped__||t.__wrapped__)return m(n.__wrapped__||n,t.__wrapped__||t,e,u);
if(i!=xt)return J;var i=n.constructor,a=t.constructor;if(i!=a&&(!d(i)||!(i instanceof i&&d(a)&&a instanceof a)))return J}for(e||(e=[]),u||(u=[]),i=e.length;i--;)if(e[i]==n)return u[i]==t;var f=G,c=0;if(e.push(n),u.push(t),o){if(c=t.length,f=c==n.length)for(;c--&&(f=m(n[c],t[c],e,u)););return f}return r(t,function(t,r,o){return at.call(o,r)?(c++,!(f=at.call(n,r)&&m(n[r],t,e,u))&&X):void 0}),f&&r(n,function(n,t,r){return at.call(r,t)?!(f=-1<--c)&&X:void 0}),f}function d(n){return typeof n=="function"
}function b(n){return n?Nt[typeof n]:J}function j(n){return typeof n=="number"||ct.call(n)==wt}function w(n){return typeof n=="string"||ct.call(n)==Et}function x(n){for(var t=-1,r=Tt(n),e=r.length,u=Array(e);++t<e;)u[t]=n[r[t]];return u}function A(n,t){var r=J;return typeof(n?n.length:0)=="number"?r=-1<$(n,t):e(n,function(n){return(r=n===t)&&X}),r}function E(n,t,r){var u=G;if(t=i(t,r),Rt(n)){r=-1;for(var o=n.length;++r<o&&(u=!!t(n[r],r,n)););}else e(n,function(n,r,e){return!(u=!!t(n,r,e))&&X});return u
}function O(n,t,r){var u=[];if(t=i(t,r),Rt(n)){r=-1;for(var o=n.length;++r<o;){var a=n[r];t(a,r,n)&&u.push(a)}}else e(n,function(n,r,e){t(n,r,e)&&u.push(n)});return u}function S(n,t,r){var e;return t=i(t,r),k(n,function(n,r,u){return t(n,r,u)?(e=n,X):void 0}),e}function k(n,t,r){if(t&&typeof r=="undefined"&&Rt(n)){r=-1;for(var u=n.length;++r<u&&t(n[r],r,n)!==X;);}else e(n,t,r)}function N(n,t,r){var u=-1,o=n?n.length:0,a=Array(typeof o=="number"?o:0);if(t=i(t,r),Rt(n))for(;++u<o;)a[u]=t(n[u],u,n);
else e(n,function(n,r,e){a[++u]=t(n,r,e)});return a}function F(n,t,r){var u=-1/0,o=u;if(!t&&Rt(n)){r=-1;for(var a=n.length;++r<a;){var f=n[r];f>o&&(o=f)}}else t=i(t,r),e(n,function(n,r,e){r=t(n,r,e),r>u&&(u=r,o=n)});return o}function R(n,t){return N(n,t+"")}function T(n,t,r,u){var o=3>arguments.length;if(t=i(t,u,X),Rt(n)){var a=-1,f=n.length;for(o&&(r=n[++a]);++a<f;)r=t(r,n[a],a,n)}else e(n,function(n,e,u){r=o?(o=J,n):t(r,n,e,u)});return r}function q(n,t,r,e){var u=n?n.length:0,o=3>arguments.length;
if(typeof u!="number")var a=Tt(n),u=a.length;return t=i(t,e,X),k(n,function(e,i,f){i=a?a[--u]:--u,r=o?(o=J,n[i]):t(r,n[i],i,f)}),r}function B(n,t,r){var u;if(t=i(t,r),Rt(n)){r=-1;for(var o=n.length;++r<o&&!(u=t(n[r],r,n)););}else e(n,function(n,r,e){return(u=t(n,r,e))&&X});return!!u}function D(n,t,r){if(n){var e=0,u=n.length;if(typeof t=="function"){var o=-1;for(t=i(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,e==H||r)return n[0];return l(n,0,yt(ht(0,e),u))}}function M(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];
Rt(o)?ft.apply(u,t?o:M(o)):u.push(o)}return u}function $(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?ht(0,u+r):r||0)-1;else if(r)return e=z(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function I(n,t,r){if(typeof t=="function"){var e=0,u=-1,o=n?n.length:0;for(t=i(t,r);++u<o&&t(n[u],u,n);)e++}else e=t==H||r?1:ht(0,t);return l(n,e)}function z(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?i(r,e):U,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function C(n,t,r,e){var u=-1,o=n?n.length:0,a=[],f=a;
else e(n,function(n,r,e){a[++u]=t(n,r,e)});return a}function F(n,t,r){var u=-1/0,o=u;if(!t&&Rt(n)){r=-1;for(var a=n.length;++r<a;){var f=n[r];f>o&&(o=f)}}else t=i(t,r),e(n,function(n,r,e){r=t(n,r,e),r>u&&(u=r,o=n)});return o}function R(n,t){return N(n,t+"")}function T(n,t,r,u){var o=3>arguments.length;if(t=i(t,u,4),Rt(n)){var a=-1,f=n.length;for(o&&(r=n[++a]);++a<f;)r=t(r,n[a],a,n)}else e(n,function(n,e,u){r=o?(o=J,n):t(r,n,e,u)});return r}function q(n,t,r,e){var u=n?n.length:0,o=3>arguments.length;
if(typeof u!="number")var a=Tt(n),u=a.length;return t=i(t,e,4),k(n,function(e,i,f){i=a?a[--u]:--u,r=o?(o=J,n[i]):t(r,n[i],i,f)}),r}function B(n,t,r){var u;if(t=i(t,r),Rt(n)){r=-1;for(var o=n.length;++r<o&&!(u=t(n[r],r,n)););}else e(n,function(n,r,e){return(u=t(n,r,e))&&X});return!!u}function D(n,t,r){if(n){var e=0,u=n.length;if(typeof t=="function"){var o=-1;for(t=i(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,e==H||r)return n[0];return l(n,0,yt(ht(0,e),u))}}function M(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];
Rt(o)?ft.apply(u,t?o:M(o)):u.push(o)}return u}function $(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?ht(0,u+r):r||0)-1;else if(r)return e=z(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function I(n,t,r){if(typeof t=="function"){var e=0,u=-1,o=n?n.length:0;for(t=i(t,r);++u<o&&t(n[u],u,n);)e++}else e=t==H||r?1:ht(0,t);return l(n,e)}function z(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?i(r,e,1):U,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function C(n,t,r,e){var u=-1,o=n?n.length:0,a=[],f=a;
for(typeof t=="function"&&(e=r,r=t,t=J),r&&(f=[],r=i(r,e));++u<o;){e=n[u];var c=r?r(e,u,n):e;(t?!u||f[f.length-1]!==c:0>$(f,c))&&(r&&f.push(c),a.push(e))}return a}function P(n,t){var r;if(Ot||lt&&2<arguments.length)r=lt.call.apply(lt,arguments);else{var e=n,u=t,o=l(arguments,2),i=function(){var n=arguments,t=u;return o.length&&(n=n.length?o.concat(l(n)):o),this instanceof i?(c.prototype=e.prototype,t=new c,c.prototype=H,n=e.apply(t,n),b(n)?n:t):e.apply(t,n)};r=i}return r}function U(n){return n}function V(n){k(y(n),function(t){var r=u[t]=n[t];
u.prototype[t]=function(){var n=[this.__wrapped__];return ft.apply(n,arguments),n=r.apply(u,n),this.__chain__&&(n=new u(n),n.__chain__=G),n}})}var G=!0,H=null,J=!1,K=typeof exports=="object"&&exports,L=typeof global=="object"&&global;L.global===L&&(n=L);var Q=[],L={},W=0,X=L,Y=n._,Z=/&(?:amp|lt|gt|quot|#x27);/g,nt=RegExp("^"+(L.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),tt=/($^)/,rt=/[&<>"']/g,et=/['\n\r\t\u2028\u2029\\]/g,ut=Math.ceil,ot=Q.concat,it=Math.floor,at=L.hasOwnProperty,ft=Q.push,ct=L.toString,lt=nt.test(lt=l.bind)&&lt,pt=nt.test(pt=Array.isArray)&&pt,st=n.isFinite,vt=n.isNaN,gt=nt.test(gt=Object.keys)&&gt,ht=Math.max,yt=Math.min,_t=Math.random,mt="[object Arguments]",dt="[object Array]",bt="[object Boolean]",jt="[object Date]",wt="[object Number]",xt="[object Object]",At="[object RegExp]",Et="[object String]",L=!!n.attachEvent,L=lt&&!/\n|true/.test(lt+L),Ot=lt&&!L,St=(St={0:1,length:1},Q.splice.call(St,0,1),St[0]),kt=arguments.constructor==Object,Nt={"boolean":J,"function":G,object:G,number:J,string:J,undefined:J},Ft={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};
u.prototype[t]=function(){var n=[this.__wrapped__];return ft.apply(n,arguments),n=r.apply(u,n),this.__chain__&&(n=new u(n),n.__chain__=G),n}})}var G=!0,H=null,J=!1,K=typeof exports=="object"&&exports,L=typeof global=="object"&&global;L.global===L&&(n=L);var Q=[],L={},W=0,X=L,Y=n._,Z=/&(?:amp|lt|gt|quot|#x27);/g,nt=RegExp("^"+(L.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),tt=/($^)/,rt=/[&<>"']/g,et=/['\n\r\t\u2028\u2029\\]/g,ut=Math.ceil,ot=Q.concat,it=Math.floor,at=L.hasOwnProperty,ft=Q.push,ct=L.toString,lt=nt.test(lt=l.bind)&&lt,pt=nt.test(pt=Array.isArray)&&pt,st=n.isFinite,vt=n.isNaN,gt=nt.test(gt=Object.keys)&&gt,ht=Math.max,yt=Math.min,_t=Math.random,mt="[object Arguments]",dt="[object Array]",bt="[object Boolean]",jt="[object Date]",wt="[object Number]",xt="[object Object]",At="[object RegExp]",Et="[object String]",L=!!n.attachEvent,L=lt&&!/\n|true/.test(lt+L),Ot=lt&&!L,St=(St={0:1,length:1},Q.splice.call(St,0,1),St[0]),kt=arguments.constructor==Object,Nt={"boolean":J,"function":G,object:G,number:J,string:J,undefined:J},Ft={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};
u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},s(arguments)||(s=function(n){return n?at.call(n,"callee"):J});var Rt=pt||function(n){return kt&&n instanceof Array||ct.call(n)==dt},Tt=gt?function(n){return b(n)?gt(n):[]}:v,qt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},Bt=_(qt);d(/x/)&&(d=function(n){return n instanceof Function||"[object Function]"==ct.call(n)}),u.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0
}},u.bind=P,u.bindAll=function(n){for(var t=ot.apply(Q,arguments),r=1<t.length?0:(t=y(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=P(n[u],n)}return n},u.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},u.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},u.countBy=function(n,t,r){var e={};return t=i(t,r),k(n,function(n,r,u){r=t(n,r,u)+"",at.call(e,r)?e[r]++:e[r]=1}),e},u.debounce=function(n,t,r){function e(){a=H,r||(o=n.apply(i,u))
}var u,o,i,a;return function(){var f=r&&!a;return u=arguments,i=this,clearTimeout(a),a=setTimeout(e,t),f&&(o=n.apply(i,u)),o}},u.defaults=h,u.defer=function(n){var r=l(arguments,1);return setTimeout(function(){n.apply(t,r)},1)},u.delay=function(n,r){var e=l(arguments,2);return setTimeout(function(){n.apply(t,e)},r)},u.difference=function(n){for(var t=-1,r=n.length,e=ot.apply(Q,arguments),u=[];++t<r;){var o=n[t];0>$(e,o,r)&&u.push(o)}return u},u.filter=O,u.flatten=M,u.forEach=k,u.functions=y,u.groupBy=function(n,t,r){var e={};