diff --git a/doc/README.md b/doc/README.md
index 401dbae54..cbc9e271c 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -1,4 +1,4 @@
-# lodash v3.6.0
+# lodash v3.7.0
@@ -93,10 +93,10 @@
* `_.includes`
* `_.indexBy`
* `_.inject` -> `reduce`
-* `_.invoke`
+* `_.invoke`
* `_.map`
* `_.partition`
-* `_.pluck`
+* `_.pluck`
* `_.reduce`
* `_.reduceRight`
* `_.reject`
@@ -106,8 +106,8 @@
* `_.size`
* `_.some`
* `_.sortBy`
-* `_.sortByAll`
-* `_.sortByOrder`
+* `_.sortByAll`
+* `_.sortByOrder`
* `_.where`
@@ -213,7 +213,8 @@
* `_.forOwn`
* `_.forOwnRight`
* `_.functions`
-* `_.has`
+* `_.get`
+* `_.has`
* `_.invert`
* `_.keys`
* `_.keysIn`
@@ -223,7 +224,8 @@
* `_.omit`
* `_.pairs`
* `_.pick`
-* `_.result`
+* `_.result`
+* `_.set`
* `_.transform`
* `_.values`
* `_.valuesIn`
@@ -267,11 +269,13 @@
* `_.identity`
* `_.iteratee` -> `callback`
* `_.matches`
-* `_.matchesProperty`
-* `_.mixin`
+* `_.matchesProperty`
+* `_.method`
+* `_.methodOf`
+* `_.mixin`
* `_.noConflict`
* `_.noop`
-* `_.property`
+* `_.property`
* `_.propertyOf`
* `_.range`
* `_.runInContext`
@@ -323,7 +327,7 @@
### `_.chunk(array, [size=1])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L4536 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L4714 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package")
Creates an array of elements split into groups the length of `size`.
If `collection` can't be split evenly, the final chunk will be the remaining
@@ -351,7 +355,7 @@ _.chunk(['a', 'b', 'c', 'd'], 3);
### `_.compact(array)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L4567 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L4745 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package")
Creates an array with all falsey values removed. The values `false`, `null`,
`0`, `""`, `undefined`, and `NaN` are falsey.
@@ -374,16 +378,15 @@ _.compact([0, 1, false, 2, '', 3]);
### `_.difference(array, [values])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L4602 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L4779 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package")
Creates an array excluding all values of the provided arrays using
`SameValueZero` for equality comparisons.
-**Note:** `SameValueZero` comparisons are like strict equality comparisons,
-e.g. `===`, except that `NaN` matches `NaN`. See the
-[ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
-for more details.
+**Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+comparisons are like strict equality comparisons, e.g. `===`, except that
+`NaN` matches `NaN`.
#### Arguments
1. `array` *(Array)*: The array to inspect.
@@ -404,7 +407,7 @@ _.difference([1, 2, 3], [4, 2]);
### `_.drop(array, [n=1])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L4632 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L4809 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package")
Creates a slice of `array` with `n` elements dropped from the beginning.
@@ -436,7 +439,7 @@ _.drop([1, 2, 3], 0);
### `_.dropRight(array, [n=1])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L4667 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L4844 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package")
Creates a slice of `array` with `n` elements dropped from the end.
@@ -468,7 +471,7 @@ _.dropRight([1, 2, 3], 0);
### `_.dropRightWhile(array, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L4728 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L4905 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package")
Creates a slice of `array` excluding elements dropped from the end.
Elements are dropped until `predicate` returns falsey. The predicate is
@@ -528,7 +531,7 @@ _.pluck(_.dropRightWhile(users, 'active'), 'user');
### `_.dropWhile(array, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L4783 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L4960 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package")
Creates a slice of `array` excluding elements dropped from the beginning.
Elements are dropped until `predicate` returns falsey. The predicate is
@@ -588,7 +591,7 @@ _.pluck(_.dropWhile(users, 'active'), 'user');
### `_.fill(array, value, [start=0], [end=array.length])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L4817 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L4994 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package")
Fills elements of `array` with `value` from `start` up to, but not
including, `end`.
@@ -626,7 +629,7 @@ _.fill([4, 6, 8], '*', 1, 2);
### `_.findIndex(array, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L4877 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5054 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package")
This method is like `_.find` except that it returns the index of the first
element `predicate` returns truthy for instead of the element itself.
@@ -685,7 +688,7 @@ _.findIndex(users, 'active');
### `_.findLastIndex(array, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L4927 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5104 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package")
This method is like `_.findIndex` except that it iterates over elements
of `collection` from right to left.
@@ -744,7 +747,7 @@ _.findLastIndex(users, 'active');
### `_.first(array)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L4946 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.first "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5123 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.first "See the npm package")
Gets the first element of `array`.
@@ -772,7 +775,7 @@ _.first([]);
### `_.flatten(array, [isDeep])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L4970 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5147 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package")
Flattens a nested array. If `isDeep` is `true` the array is recursively
flattened, otherwise it is only flattened a single level.
@@ -800,7 +803,7 @@ _.flatten([1, [2, 3, [4]]], true);
### `_.flattenDeep(array)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L4991 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5168 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package")
Recursively flattens a nested array.
@@ -822,7 +825,7 @@ _.flattenDeep([1, [2, 3, [4]]]);
### `_.indexOf(array, value, [fromIndex=0])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5028 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5204 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package")
Gets the index at which the first occurrence of `value` is found in `array`
using `SameValueZero` for equality comparisons. If `fromIndex` is negative,
@@ -830,10 +833,9 @@ it is used as the offset from the end of `array`. If `array` is sorted
providing `true` for `fromIndex` performs a faster binary search.
-**Note:** `SameValueZero` comparisons are like strict equality comparisons,
-e.g. `===`, except that `NaN` matches `NaN`. See the
-[ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
-for more details.
+**Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+comparisons are like strict equality comparisons, e.g. `===`, except that
+`NaN` matches `NaN`.
#### Arguments
1. `array` *(Array)*: The array to search.
@@ -863,7 +865,7 @@ _.indexOf([1, 1, 2, 2], 2, true);
### `_.initial(array)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5060 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5236 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package")
Gets all but the last element of `array`.
@@ -885,16 +887,15 @@ _.initial([1, 2, 3]);
### `_.intersection([arrays])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5082 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5257 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package")
Creates an array of unique values in all provided arrays using `SameValueZero`
for equality comparisons.
-**Note:** `SameValueZero` comparisons are like strict equality comparisons,
-e.g. `===`, except that `NaN` matches `NaN`. See the
-[ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
-for more details.
+**Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+comparisons are like strict equality comparisons, e.g. `===`, except that
+`NaN` matches `NaN`.
#### Arguments
1. `[arrays]` *(...Array)*: The arrays to inspect.
@@ -914,7 +915,7 @@ _.intersection([1, 2], [4, 2], [2, 1]);
### `_.last(array)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5137 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5315 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package")
Gets the last element of `array`.
@@ -936,7 +937,7 @@ _.last([1, 2, 3]);
### `_.lastIndexOf(array, value, [fromIndex=array.length-1])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5167 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5345 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package")
This method is like `_.indexOf` except that it iterates over elements of
`array` from right to left.
@@ -969,7 +970,7 @@ _.lastIndexOf([1, 1, 2, 2], 2, true);
### `_.pull(array, [values])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5218 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5396 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package")
Removes all provided values from `array` using `SameValueZero` for equality
comparisons.
@@ -977,11 +978,11 @@ comparisons.
**Notes:**
-* Unlike `_.without`, this method mutates `array`.
+* Unlike `_.without`, this method mutates `array`
-* `SameValueZero` comparisons are like strict equality comparisons, e.g. `===`,
-except that `NaN` matches `NaN`. See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
-for more details.
+* [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+comparisons are like strict equality comparisons, e.g. `===`, except
+that `NaN` matches `NaN`
#### Arguments
1. `array` *(Array)*: The array to modify.
@@ -1005,7 +1006,7 @@ console.log(array);
### `_.pullAt(array, [indexes])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5265 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5443 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package")
Removes elements from `array` corresponding to the given indexes and returns
an array of the removed elements. Indexes may be specified as an array of
@@ -1039,7 +1040,7 @@ console.log(evens);
### `_.remove(array, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5322 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5491 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package")
Removes all elements from `array` that `predicate` returns truthy for
and returns an array of the removed elements. The predicate is bound to
@@ -1090,7 +1091,7 @@ console.log(evens);
### `_.rest(array)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5353 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5526 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package")
Gets all but the first element of `array`.
@@ -1115,12 +1116,12 @@ _.rest([1, 2, 3]);
### `_.slice(array, [start=0], [end=array.length])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5371 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5544 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package")
Creates a slice of `array` from `start` up to, but not including, `end`.
-**Note:** This function is used instead of `Array#slice` to support node
+**Note:** This method is used instead of `Array#slice` to support node
lists in IE < 9 and to ensure dense arrays are returned.
#### Arguments
@@ -1138,7 +1139,7 @@ lists in IE < 9 and to ensure dense arrays are returned.
### `_.sortedIndex(array, value, [iteratee=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5431 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5604 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package")
Uses a binary search to determine the lowest index at which `value` should
be inserted into `array` in order to maintain its sort order. If an iteratee
@@ -1197,7 +1198,7 @@ _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x');
### `_.sortedLastIndex(array, value, [iteratee=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5453 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5626 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package")
This method is like `_.sortedIndex` except that it returns the highest
index at which `value` should be inserted into `array` in order to
@@ -1225,7 +1226,7 @@ _.sortedLastIndex([4, 4, 5, 5], 5);
### `_.take(array, [n=1])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5479 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5652 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package")
Creates a slice of `array` with `n` elements taken from the beginning.
@@ -1257,7 +1258,7 @@ _.take([1, 2, 3], 0);
### `_.takeRight(array, [n=1])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5514 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5687 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package")
Creates a slice of `array` with `n` elements taken from the end.
@@ -1289,7 +1290,7 @@ _.takeRight([1, 2, 3], 0);
### `_.takeRightWhile(array, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5575 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5748 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package")
Creates a slice of `array` with elements taken from the end. Elements are
taken until `predicate` returns falsey. The predicate is bound to `thisArg`
@@ -1349,7 +1350,7 @@ _.pluck(_.takeRightWhile(users, 'active'), 'user');
### `_.takeWhile(array, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5630 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5803 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package")
Creates a slice of `array` with elements taken from the beginning. Elements
are taken until `predicate` returns falsey. The predicate is bound to
@@ -1409,16 +1410,15 @@ _.pluck(_.takeWhile(users, 'active'), 'user');
### `_.union([arrays])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5655 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5827 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package")
Creates an array of unique values, in order, of the provided arrays using
`SameValueZero` for equality comparisons.
-**Note:** `SameValueZero` comparisons are like strict equality comparisons,
-e.g. `===`, except that `NaN` matches `NaN`. See the
-[ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
-for more details.
+**Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+comparisons are like strict equality comparisons, e.g. `===`, except that
+`NaN` matches `NaN`.
#### Arguments
1. `[arrays]` *(...Array)*: The arrays to inspect.
@@ -1438,14 +1438,15 @@ _.union([1, 2], [4, 2], [2, 1]);
### `_.uniq(array, [isSorted], [iteratee], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5711 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5883 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package")
-Creates a duplicate-value-free version of an array using `SameValueZero`
-for equality comparisons. Providing `true` for `isSorted` performs a faster
-search algorithm for sorted arrays. If an iteratee function is provided it
-is invoked for each value in the array to generate the criterion by which
-uniqueness is computed. The `iteratee` is bound to `thisArg` and invoked
-with three arguments: (value, index, array).
+Creates a duplicate-free version of an array, using `SameValueZero` for
+equality comparisons, in which only the first occurence of each element
+is kept. Providing `true` for `isSorted` performs a faster search algorithm
+for sorted arrays. If an iteratee function is provided it is invoked for
+each element in the array to generate the criterion by which uniqueness
+is computed. The `iteratee` is bound to `thisArg` and invoked with three
+arguments: (value, index, array).
If a property name is provided for `iteratee` the created `_.property`
@@ -1462,10 +1463,9 @@ callback returns `true` for elements that have the properties of the given
object, else `false`.
-**Note:** `SameValueZero` comparisons are like strict equality comparisons,
-e.g. `===`, except that `NaN` matches `NaN`. See the
-[ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
-for more details.
+**Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+comparisons are like strict equality comparisons, e.g. `===`, except that
+`NaN` matches `NaN`.
#### Aliases
*_.unique*
@@ -1481,8 +1481,8 @@ for more details.
#### Example
```js
-_.uniq([1, 2, 1]);
-// => [1, 2]
+_.uniq([2, 1, 2]);
+// => [2, 1]
// using `isSorted`
_.uniq([1, 1, 2], true);
@@ -1505,7 +1505,7 @@ _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
### `_.unzip(array)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5748 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5920 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package")
This method is like `_.zip` except that it accepts an array of grouped
elements and creates an array regrouping the elements to their pre-`_.zip`
@@ -1532,16 +1532,15 @@ _.unzip(zipped);
### `_.without(array, [values])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5779 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5950 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package")
Creates an array excluding all provided values using `SameValueZero` for
equality comparisons.
-**Note:** `SameValueZero` comparisons are like strict equality comparisons,
-e.g. `===`, except that `NaN` matches `NaN`. See the
-[ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
-for more details.
+**Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+comparisons are like strict equality comparisons, e.g. `===`, except that
+`NaN` matches `NaN`.
#### Arguments
1. `array` *(Array)*: The array to filter.
@@ -1562,11 +1561,10 @@ _.without([1, 2, 1, 3], 1, 2);
### `_.xor([arrays])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5800 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L5970 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package")
-Creates an array that is the symmetric difference of the provided arrays.
-See [Wikipedia](https://en.wikipedia.org/wiki/Symmetric_difference) for
-more details.
+Creates an array that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
+of the provided arrays.
#### Arguments
1. `[arrays]` *(...Array)*: The arrays to inspect.
@@ -1586,7 +1584,7 @@ _.xor([1, 2], [4, 2]);
### `_.zip([arrays])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5830 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6000 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package")
Creates an array of grouped elements, the first of which contains the first
elements of the given arrays, the second of which contains the second elements
@@ -1610,7 +1608,7 @@ _.zip(['fred', 'barney'], [30, 40], [true, false]);
### `_.zipObject(props, [values=[]])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5853 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6023 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package")
The inverse of `_.pairs`; this method returns an object composed from arrays
of property names and values. Provide either a single two dimensional array,
@@ -1648,7 +1646,7 @@ _.zipObject(['fred', 'barney'], [30, 40]);
### `_(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L962 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L974 "View in source") [Ⓣ][1]
Creates a `lodash` object which wraps `value` to enable implicit chaining.
Methods that operate on and return arrays, collections, and functions can
@@ -1695,8 +1693,8 @@ The chainable wrapper methods are:
`filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, `forEach`,
`forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `functions`,
`groupBy`, `indexBy`, `initial`, `intersection`, `invert`, `invoke`, `keys`,
-`keysIn`, `map`, `mapValues`, `matches`, `matchesProperty`, `memoize`, `merge`,
-`mixin`, `negate`, `noop`, `omit`, `once`, `pairs`, `partial`, `partialRight`,
+`keysIn`, `map`, `mapValues`, `matches`, `matchesProperty`, `memoize`,
+`merge`, `mixin`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`,
`partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`,
`pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `reverse`,
`shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`, `sortByOrder`, `splice`,
@@ -1711,15 +1709,15 @@ The wrapper methods that are **not** chainable by default are:
`endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`,
`findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, `has`,
`identity`, `includes`, `indexOf`, `inRange`, `isArguments`, `isArray`,
-`isBoolean`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isError`,
-`isFinite`,`isFunction`, `isMatch`, `isNative`, `isNaN`, `isNull`, `isNumber`,
-`isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`,
-`isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `max`, `min`,
-`noConflict`, `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`,
-`random`, `reduce`, `reduceRight`, `repeat`, `result`, `runInContext`,
-`shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`,
-`startCase`, `startsWith`, `sum`, `template`, `trim`, `trimLeft`,
-`trimRight`, `trunc`, `unescape`, `uniqueId`, `value`, and `words`
+`isBoolean`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isError`, `isFinite`
+`isFunction`, `isMatch`, `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`,
+`isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `isTypedArray`,
+`join`, `kebabCase`, `last`, `lastIndexOf`, `max`, `min`, `noConflict`,
+`noop`, `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`,
+`reduce`, `reduceRight`, `repeat`, `result`, `runInContext`, `shift`, `size`,
+`snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`, `startsWith`,
+`sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`, `unescape`,
+`uniqueId`, `value`, and `words`
The wrapper method `sample` will return a wrapped value when `n` is provided,
@@ -1736,8 +1734,8 @@ otherwise an unwrapped value is returned.
var wrapped = _([1, 2, 3]);
// returns an unwrapped value
-wrapped.reduce(function(sum, n) {
- return sum + n;
+wrapped.reduce(function(total, n) {
+ return total + n;
});
// => 6
@@ -1759,7 +1757,7 @@ _.isArray(squares.value());
### `_.chain(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5900 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6070 "View in source") [Ⓣ][1]
Creates a `lodash` object that wraps `value` with explicit method
chaining enabled.
@@ -1794,7 +1792,7 @@ var youngest = _.chain(users)
### `_.tap(value, interceptor, [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5929 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6099 "View in source") [Ⓣ][1]
This method invokes `interceptor` and returns `value`. The interceptor is
bound to `thisArg` and invoked with one argument; (value). The purpose of
@@ -1826,7 +1824,7 @@ _([1, 2, 3])
### `_.thru(value, interceptor, [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5955 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6125 "View in source") [Ⓣ][1]
This method is like `_.tap` except that it returns the result of `interceptor`.
@@ -1856,7 +1854,7 @@ _(' abc ')
### `_.prototype.chain()`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L5984 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6154 "View in source") [Ⓣ][1]
Enables explicit method chaining on the wrapper object.
@@ -1888,7 +1886,7 @@ _(users).chain()
### `_.prototype.commit()`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6013 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6183 "View in source") [Ⓣ][1]
Executes the chained sequence and returns the wrapped result.
@@ -1920,7 +1918,7 @@ console.log(array);
### `_.prototype.plant()`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6040 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6210 "View in source") [Ⓣ][1]
Creates a clone of the chained sequence planting `value` as the wrapped value.
@@ -1950,7 +1948,7 @@ wrapper.value();
### `_.prototype.reverse()`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6078 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6248 "View in source") [Ⓣ][1]
Reverses the wrapped array so the first element becomes the last, the
second element becomes the second to last, and so on.
@@ -1978,7 +1976,7 @@ console.log(array);
### `_.prototype.toString()`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6103 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6273 "View in source") [Ⓣ][1]
Produces the result of coercing the unwrapped value to a string.
@@ -1997,7 +1995,7 @@ _([1, 2, 3]).toString();
### `_.prototype.value()`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6120 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6290 "View in source") [Ⓣ][1]
Executes the chained sequence to extract the unwrapped value.
@@ -2025,7 +2023,7 @@ _([1, 2, 3]).value();
### `_.at(collection, [props])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6146 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6316 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package")
Creates an array of elements corresponding to the given keys, or indexes,
of `collection`. Keys may be specified as individual arguments or as arrays
@@ -2053,7 +2051,7 @@ _.at(['barney', 'fred', 'pebbles'], 0, 2);
### `_.countBy(collection, [iteratee=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6195 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6365 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package")
Creates an object composed of keys generated from the results of running
each element of `collection` through `iteratee`. The corresponding value
@@ -2105,7 +2103,7 @@ _.countBy(['one', 'two', 'three'], 'length');
### `_.every(collection, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6247 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6417 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package")
Checks if `predicate` returns truthy for **all** elements of `collection`.
The predicate is bound to `thisArg` and invoked with three arguments:
@@ -2166,7 +2164,7 @@ _.every(users, 'active');
### `_.filter(collection, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6307 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6477 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package")
Iterates over elements of `collection`, returning an array of all elements
`predicate` returns truthy for. The predicate is bound to `thisArg` and
@@ -2228,7 +2226,7 @@ _.pluck(_.filter(users, 'active'), 'user');
### `_.find(collection, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6363 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6533 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package")
Iterates over elements of `collection`, returning the first element
`predicate` returns truthy for. The predicate is bound to `thisArg` and
@@ -2291,7 +2289,7 @@ _.result(_.find(users, 'active'), 'user');
### `_.findLast(collection, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6384 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6554 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package")
This method is like `_.find` except that it iterates over elements of
`collection` from right to left.
@@ -2318,7 +2316,7 @@ _.findLast([1, 2, 3, 4], function(n) {
### `_.findWhere(collection, source)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6415 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findwhere "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6585 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findwhere "See the npm package")
Performs a deep comparison between each element in `collection` and the
source object, returning the first element that has equivalent property
@@ -2357,15 +2355,15 @@ _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user');
### `_.forEach(collection, [iteratee=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6449 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6619 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package")
Iterates over elements of `collection` invoking `iteratee` for each element.
The `iteratee` is bound to `thisArg` and invoked with three arguments:
-(value, index|key, collection). Iterator functions may exit iteration early
+(value, index|key, collection). Iteratee functions may exit iteration early
by explicitly returning `false`.
-**Note:** As with other "Collections" methods, objects with a `length` property
+**Note:** As with other "Collections" methods, objects with a "length" property
are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`
may be used for object iteration.
@@ -2399,7 +2397,7 @@ _.forEach({ 'a': 1, 'b': 2 }, function(n, key) {
### `_.forEachRight(collection, [iteratee=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6470 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6640 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package")
This method is like `_.forEach` except that it iterates over elements of
`collection` from right to left.
@@ -2429,7 +2427,7 @@ _([1, 2]).forEachRight(function(n) {
### `_.groupBy(collection, [iteratee=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6514 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6684 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package")
Creates an object composed of keys generated from the results of running
each element of `collection` through `iteratee`. The corresponding value
@@ -2482,17 +2480,16 @@ _.groupBy(['one', 'two', 'three'], 'length');
### `_.includes(collection, target, [fromIndex=0])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6555 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6724 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package")
Checks if `value` is in `collection` using `SameValueZero` for equality
comparisons. If `fromIndex` is negative, it is used as the offset from
the end of `collection`.
-**Note:** `SameValueZero` comparisons are like strict equality comparisons,
-e.g. `===`, except that `NaN` matches `NaN`. See the
-[ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
-for more details.
+**Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+comparisons are like strict equality comparisons, e.g. `===`, except that
+`NaN` matches `NaN`.
#### Aliases
*_.contains, _.include*
@@ -2526,7 +2523,7 @@ _.includes('pebbles', 'eb');
### `_.indexBy(collection, [iteratee=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6620 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.indexby "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6789 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.indexby "See the npm package")
Creates an object composed of keys generated from the results of running
each element of `collection` through `iteratee`. The corresponding value
@@ -2582,17 +2579,17 @@ _.indexBy(keyData, function(object) {
-### `_.invoke(collection, methodName, [args])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6646 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package")
+### `_.invoke(collection, path, [args])`
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6815 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package")
-Invokes the method named by `methodName` on each element in `collection`,
-returning an array of the results of each invoked method. Any additional
-arguments are provided to each invoked method. If `methodName` is a function
-it is invoked for, and `this` bound to, each element in `collection`.
+Invokes the method at `path` on each element in `collection`, returning
+an array of the results of each invoked method. Any additional arguments
+are provided to each invoked method. If `methodName` is a function it is
+invoked for, and `this` bound to, each element in `collection`.
#### Arguments
1. `collection` *(Array|Object|string)*: The collection to iterate over.
-2. `methodName` *(Function|string)*: The name of the method to invoke or the function invoked per iteration.
+2. `path` *(Array|Function|string)*: The path of the method to invoke or the function invoked per iteration.
3. `[args]` *(...*)*: The arguments to invoke the method with.
#### Returns
@@ -2613,7 +2610,7 @@ _.invoke([123, 456], String.prototype.split, '');
### `_.map(collection, [iteratee=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6715 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6884 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package")
Creates an array of values by running each element in `collection` through
`iteratee`. The `iteratee` is bound to `thisArg` and invoked with three
@@ -2649,7 +2646,7 @@ The guarded methods are:
#### Arguments
1. `collection` *(Array|Object|string)*: The collection to iterate over.
-2. `[iteratee=_.identity]` *(Function|Object|string)*: The function invoked per iteration. create a `_.property` or `_.matches` style callback respectively.
+2. `[iteratee=_.identity]` *(Function|Object|string)*: The function invoked per iteration.
3. `[thisArg]` *(*)*: The `this` binding of `iteratee`.
#### Returns
@@ -2683,7 +2680,7 @@ _.map(users, 'user');
### `_.partition(collection, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6780 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6949 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package")
Creates an array of elements split into two groups, the first of which
contains elements `predicate` returns truthy for, while the second of which
@@ -2752,14 +2749,14 @@ _.map(_.partition(users, 'active'), mapper);
-### `_.pluck(collection, key)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6807 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pluck "See the npm package")
+### `_.pluck(collection, path)`
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L6976 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pluck "See the npm package")
-Gets the value of `key` from all elements in `collection`.
+Gets the property value of `path` from all elements in `collection`.
#### Arguments
1. `collection` *(Array|Object|string)*: The collection to iterate over.
-2. `key` *(string)*: The key of the property to pluck.
+2. `path` *(Array|string)*: The path of the property to pluck.
#### Returns
*(Array)*: Returns the property values.
@@ -2785,7 +2782,7 @@ _.pluck(userIndex, 'age');
### `_.reduce(collection, [iteratee=_.identity], [accumulator], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6847 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7016 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package")
Reduces `collection` to a value which is the accumulated result of running
each element in `collection` through `iteratee`, where each successive
@@ -2816,8 +2813,8 @@ The guarded methods are:
#### Example
```js
-_.reduce([1, 2], function(sum, n) {
- return sum + n;
+_.reduce([1, 2], function(total, n) {
+ return total + n;
});
// => 3
@@ -2834,7 +2831,7 @@ _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) {
### `_.reduceRight(collection, [iteratee=_.identity], [accumulator], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6871 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7040 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package")
This method is like `_.reduce` except that it iterates over elements of
`collection` from right to left.
@@ -2867,7 +2864,7 @@ _.reduceRight(array, function(flattened, other) {
### `_.reject(collection, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6920 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7089 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package")
The opposite of `_.filter`; this method returns the elements of `collection`
that `predicate` does **not** return truthy for.
@@ -2925,7 +2922,7 @@ _.pluck(_.reject(users, 'active'), 'user');
### `_.sample(collection, [n])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6946 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7115 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package")
Gets a random element or `n` random elements from a collection.
@@ -2951,11 +2948,10 @@ _.sample([1, 2, 3, 4], 2);
### `_.shuffle(collection)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L6972 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7140 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package")
-Creates an array of shuffled values, using a version of the Fisher-Yates
-shuffle. See [Wikipedia](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle)
-for more details.
+Creates an array of shuffled values, using a version of the
+[Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
#### Arguments
1. `collection` *(Array|Object|string)*: The collection to shuffle.
@@ -2975,7 +2971,7 @@ _.shuffle([1, 2, 3, 4]);
### `_.size(collection)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7009 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7177 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package")
Gets the size of `collection` by returning its length for array-like
values or the number of own enumerable properties for objects.
@@ -3004,7 +3000,7 @@ _.size('pebbles');
### `_.some(collection, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7063 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7231 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package")
Checks if `predicate` returns truthy for **any** element of `collection`.
The function returns as soon as it finds a passing value and does not iterate
@@ -3066,7 +3062,7 @@ _.some(users, 'active');
### `_.sortBy(collection, [iteratee=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7123 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7290 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package")
Creates an array of elements, sorted in ascending order by the results of
running each element in a collection through `iteratee`. This method performs
@@ -3090,7 +3086,7 @@ object, else `false`.
#### Arguments
1. `collection` *(Array|Object|string)*: The collection to iterate over.
-2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration. If a property name or an object is provided it is used to create a `_.property` or `_.matches` style callback respectively.
+2. `[iteratee=_.identity]` *(Function|Object|string)*: The function invoked per iteration.
3. `[thisArg]` *(*)*: The `this` binding of `iteratee`.
#### Returns
@@ -3124,15 +3120,24 @@ _.pluck(_.sortBy(users, 'user'), 'user');
-### `_.sortByAll(collection, props)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7164 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortbyall "See the npm package")
+### `_.sortByAll(collection, iteratees)`
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7341 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortbyall "See the npm package")
-This method is like `_.sortBy` except that it sorts by property names
-instead of an iteratee function.
+This method is like `_.sortBy` except that it can sort by multiple iteratees
+or property names.
+
+
+If a property name is provided for an iteratee the created `_.property`
+style callback returns the property value of the given element.
+
+
+If an object is provided for an iteratee the created `_.matches` style
+callback returns `true` for elements that have the properties of the given
+object, else `false`.
#### Arguments
1. `collection` *(Array|Object|string)*: The collection to iterate over.
-2. `props` *(...(string|string[])*: The property names to sort by, specified as individual property names or arrays of property names.
+2. `iteratees` *(...(Function|Function[]|Object|Object[]|string|string[])*: The iteratees to sort by, specified as individual values or arrays of values.
#### Returns
*(Array)*: Returns the new sorted array.
@@ -3140,14 +3145,19 @@ instead of an iteratee function.
#### Example
```js
var users = [
+ { 'user': 'fred', 'age': 48 },
{ 'user': 'barney', 'age': 36 },
- { 'user': 'fred', 'age': 40 },
- { 'user': 'barney', 'age': 26 },
- { 'user': 'fred', 'age': 30 }
+ { 'user': 'fred', 'age': 42 },
+ { 'user': 'barney', 'age': 34 }
];
_.map(_.sortByAll(users, ['user', 'age']), _.values);
-// => [['barney', 26], ['barney', 36], ['fred', 30], ['fred', 40]]
+// => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]]
+
+_.map(_.sortByAll(users, 'user', function(chr) {
+ return Math.floor(chr.age / 10);
+}), _.values);
+// => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
```
* * *
@@ -3155,18 +3165,27 @@ _.map(_.sortByAll(users, ['user', 'age']), _.values);
-### `_.sortByOrder(collection, props, orders)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7211 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortbyorder "See the npm package")
+### `_.sortByOrder(collection, iteratees, orders)`
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7386 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortbyorder "See the npm package")
This method is like `_.sortByAll` except that it allows specifying the
-sort orders of the property names to sort by. A truthy value in `orders`
-will sort the corresponding property name in ascending order while a
-falsey value will sort it in descending order.
+sort orders of the iteratees to sort by. A truthy value in `orders` will
+sort the corresponding property name in ascending order while a falsey
+value will sort it in descending order.
+
+
+If a property name is provided for an iteratee the created `_.property`
+style callback returns the property value of the given element.
+
+
+If an object is provided for an iteratee the created `_.matches` style
+callback returns `true` for elements that have the properties of the given
+object, else `false`.
#### Arguments
1. `collection` *(Array|Object|string)*: The collection to iterate over.
-2. `props` *(string[])*: The property names to sort by.
-3. `orders` *(boolean[])*: The sort orders of `props`.
+2. `iteratees` *(Function[]|Object[]|string[])*: The iteratees to sort by.
+3. `orders` *(boolean[])*: The sort orders of `iteratees`.
#### Returns
*(Array)*: Returns the new sorted array.
@@ -3174,15 +3193,15 @@ falsey value will sort it in descending order.
#### Example
```js
var users = [
- { 'user': 'barney', 'age': 26 },
- { 'user': 'fred', 'age': 40 },
- { 'user': 'barney', 'age': 36 },
- { 'user': 'fred', 'age': 30 }
+ { 'user': 'fred', 'age': 48 },
+ { 'user': 'barney', 'age': 34 },
+ { 'user': 'fred', 'age': 42 },
+ { 'user': 'barney', 'age': 36 }
];
// sort by `user` in ascending order and by `age` in descending order
_.map(_.sortByOrder(users, ['user', 'age'], [true, false]), _.values);
-// => [['barney', 36], ['barney', 26], ['fred', 40], ['fred', 30]]
+// => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
```
* * *
@@ -3191,7 +3210,7 @@ _.map(_.sortByOrder(users, ['user', 'age'], [true, false]), _.values);
### `_.where(collection, source)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7256 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.where "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7431 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.where "See the npm package")
Performs a deep comparison between each element in `collection` and the
source object, returning an array of all elements that have equivalent
@@ -3236,7 +3255,7 @@ _.pluck(_.where(users, { 'pets': ['dino'] }), 'user');
### `_.now`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7276 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7451 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package")
Gets the number of milliseconds that have elapsed since the Unix epoch
(1 January 1970 00:00:00 UTC).
@@ -3261,7 +3280,7 @@ _.defer(function(stamp) {
### `_.after(n, func)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7305 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7480 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package")
The opposite of `_.before`; this method creates a function that invokes
`func` once it is called `n` or more times.
@@ -3293,7 +3312,7 @@ _.forEach(saves, function(type) {
### `_.ary(func, [n=func.length])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7339 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7514 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package")
Creates a function that accepts up to `n` arguments ignoring any
additional arguments.
@@ -3317,7 +3336,7 @@ _.map(['6', '8', '10'], _.ary(parseInt, 1));
### `_.before(n, func)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7363 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7538 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package")
Creates a function that invokes `func`, with the `this` binding and arguments
of the created function, while it is called less than `n` times. Subsequent
@@ -3342,7 +3361,7 @@ jQuery('#add').on('click', _.before(5, addContactToList));
### `_.bind(func, thisArg, [partials])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7419 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7595 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package")
Creates a function that invokes `func` with the `this` binding of `thisArg`
and prepends any additional `_.bind` arguments to those provided to the
@@ -3353,7 +3372,7 @@ The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
may be used as a placeholder for partially applied arguments.
-**Note:** Unlike native `Function#bind` this method does not set the `length`
+**Note:** Unlike native `Function#bind` this method does not set the "length"
property of bound functions.
#### Arguments
@@ -3388,7 +3407,7 @@ bound('hi');
### `_.bindAll(object, [methodNames])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7456 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7632 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package")
Binds methods of an object to the object itself, overwriting the existing
method. Method names may be specified as individual arguments or as arrays
@@ -3396,7 +3415,7 @@ of method names. If no method names are provided all enumerable function
properties, own and inherited, of `object` are bound.
-**Note:** This method does not set the `length` property of bound functions.
+**Note:** This method does not set the "length" property of bound functions.
#### Arguments
1. `object` *(Object)*: The object to bind and assign the bound methods to.
@@ -3425,7 +3444,7 @@ jQuery('#docs').on('click', view.onClick);
### `_.bindKey(object, key, [partials])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7513 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7689 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package")
Creates a function that invokes the method at `object[key]` and prepends
any additional `_.bindKey` arguments to those provided to the bound function.
@@ -3433,7 +3452,7 @@ any additional `_.bindKey` arguments to those provided to the bound function.
This method differs from `_.bind` by allowing bound functions to reference
methods that may be redefined or don't yet exist.
-See [Peter Michaux's article](http://michaux.ca/articles/lazy-function-definition-pattern)
+See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
for more details.
@@ -3480,7 +3499,7 @@ bound('hi');
### `_.curry(func, [arity=func.length])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7562 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7738 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package")
Creates a function that accepts one or more arguments of `func` that when
called either invokes `func` returning its result, if all `func` arguments
@@ -3493,7 +3512,7 @@ The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
may be used as a placeholder for provided arguments.
-**Note:** This method does not set the `length` property of curried functions.
+**Note:** This method does not set the "length" property of curried functions.
#### Arguments
1. `func` *(Function)*: The function to curry.
@@ -3530,7 +3549,7 @@ curried(1)(_, 3)(2);
### `_.curryRight(func, [arity=func.length])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7601 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7777 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package")
This method is like `_.curry` except that arguments are applied to `func`
in the manner of `_.partialRight` instead of `_.partial`.
@@ -3540,7 +3559,7 @@ The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
builds, may be used as a placeholder for provided arguments.
-**Note:** This method does not set the `length` property of curried functions.
+**Note:** This method does not set the "length" property of curried functions.
#### Arguments
1. `func` *(Function)*: The function to curry.
@@ -3577,7 +3596,7 @@ curried(3)(1, _)(2);
### `_.debounce(func, [wait=0], [options])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7665 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7841 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package")
Creates a function that delays invoking `func` until after `wait` milliseconds
have elapsed since the last time it was invoked. The created function comes
@@ -3647,7 +3666,7 @@ delete models.todo;
### `_.defer(func, [args])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7796 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7972 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package")
Defers invoking the `func` until the current call stack has cleared. Any
additional arguments are provided to `func` when it is invoked.
@@ -3673,7 +3692,7 @@ _.defer(function(text) {
### `_.delay(func, wait, [args])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7818 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L7994 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package")
Invokes `func` after `wait` milliseconds. Any additional arguments are
provided to `func` when it is invoked.
@@ -3700,7 +3719,7 @@ _.delay(function(text) {
### `_.flow([funcs])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7842 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8018 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package")
Creates a function that returns the result of invoking the provided
functions with the `this` binding of the created function, where each
@@ -3729,7 +3748,7 @@ addSquare(1, 2);
### `_.flowRight([funcs])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7864 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8040 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package")
This method is like `_.flow` except that it creates a function that
invokes the provided functions from right to left.
@@ -3760,7 +3779,7 @@ addSquare(1, 2);
### `_.memoize(func, [resolver])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7919 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8093 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package")
Creates a function that memoizes the result of `func`. If `resolver` is
provided it determines the cache key for storing the result based on the
@@ -3772,10 +3791,8 @@ function.
**Note:** The cache is exposed as the `cache` property on the memoized
function. Its creation may be customized by replacing the `_.memoize.Cache`
-constructor with one whose instances implement the ES `Map` method interface
-of `get`, `has`, and `set`. See the
-[ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-map-prototype-object)
-for more details.
+constructor with one whose instances implement the [`Map`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-map-prototype-object)
+method interface of `get`, `has`, and `set`.
#### Arguments
1. `func` *(Function)*: The function to have its output memoized.
@@ -3823,7 +3840,7 @@ identity(other);
### `_.negate(predicate)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7958 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8132 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package")
Creates a function that negates the result of the predicate `func`. The
`func` predicate is invoked with the `this` binding and arguments of the
@@ -3851,7 +3868,7 @@ _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
### `_.once(func)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L7984 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8158 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package")
Creates a function that is restricted to invoking `func` once. Repeat calls
to the function return the value of the first call. The `func` is invoked
@@ -3877,7 +3894,7 @@ initialize();
### `_.partial(func, [partials])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8020 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8194 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package")
Creates a function that invokes `func` with `partial` arguments prepended
to those provided to the new function. This method is like `_.bind` except
@@ -3888,7 +3905,7 @@ The `_.partial.placeholder` value, which defaults to `_` in monolithic
builds, may be used as a placeholder for partially applied arguments.
-**Note:** This method does not set the `length` property of partially
+**Note:** This method does not set the "length" property of partially
applied functions.
#### Arguments
@@ -3920,7 +3937,7 @@ greetFred('hi');
### `_.partialRight(func, [partials])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8053 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8227 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package")
This method is like `_.partial` except that partially applied arguments
are appended to those provided to the new function.
@@ -3930,7 +3947,7 @@ The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
builds, may be used as a placeholder for partially applied arguments.
-**Note:** This method does not set the `length` property of partially
+**Note:** This method does not set the "length" property of partially
applied functions.
#### Arguments
@@ -3962,7 +3979,7 @@ sayHelloTo('fred');
### `_.rearg(func, indexes)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8083 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8257 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package")
Creates a function that invokes `func` with arguments arranged according
to the specified indexes where the argument value at the first index is
@@ -3998,15 +4015,13 @@ map(function(n) {
### `_.restParam(func, [start=func.length-1])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8111 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.restparam "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8283 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.restparam "See the npm package")
Creates a function that invokes `func` with the `this` binding of the
created function and arguments from `start` and beyond provided as an array.
-**Note:** This method is based on the ES6 rest parameter. See the
-[MDN Wiki](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters)
-for more details.
+**Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters).
#### Arguments
1. `func` *(Function)*: The function to apply a rest parameter to.
@@ -4032,15 +4047,13 @@ say('hello', 'fred', 'barney', 'pebbles');
### `_.spread(func)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8173 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8343 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package")
Creates a function that invokes `func` with the `this` binding of the created
-function and an array of arguments much like [Function#apply](http://es5.github.io/#x15.3.4.3).
+function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3).
-**Note:** This method is based on the ES6 spread operator. See the
-[MDN Wiki](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator)
-for more details.
+**Note:** This method is based on the [spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator).
#### Arguments
1. `func` *(Function)*: The function to spread arguments over.
@@ -4075,7 +4088,7 @@ numbers.then(_.spread(function(x, y) {
### `_.throttle(func, [wait=0], [options])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8221 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8391 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package")
Creates a function that only invokes `func` at most once per every `wait`
milliseconds. The created function comes with a `cancel` method to cancel
@@ -4123,7 +4136,7 @@ jQuery(window).on('popstate', throttled.cancel);
### `_.wrap(value, wrapper)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8261 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8431 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package")
Creates a function that provides `value` to the wrapper function as its
first argument. Any additional arguments provided to the function are
@@ -4159,7 +4172,7 @@ p('fred, barney, & pebbles');
### `_.clone(value, [isDeep], [customizer], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8319 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8489 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package")
Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned,
otherwise they are assigned by reference. If `customizer` is provided it is
@@ -4168,12 +4181,12 @@ cloning is handled by the method instead. The `customizer` is bound to
`thisArg` and invoked with two argument; (value [, index|key, object]).
-**Note:** This method is loosely based on the structured clone algorithm.
+**Note:** This method is loosely based on the
+[structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
The enumerable properties of `arguments` objects and objects created by
constructors other than `Object` are cloned to plain `Object` objects. An
empty object is returned for uncloneable values such as functions, DOM nodes,
-Maps, Sets, and WeakMaps. See the [HTML5 specification](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm)
-for more details.
+Maps, Sets, and WeakMaps.
#### Arguments
1. `value` *(*)*: The value to clone.
@@ -4220,7 +4233,7 @@ el.childNodes.length;
### `_.cloneDeep(value, [customizer], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8377 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8547 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package")
Creates a deep clone of `value`. If `customizer` is provided it is invoked
to produce the cloned values. If `customizer` returns `undefined` cloning
@@ -4228,12 +4241,12 @@ is handled by the method instead. The `customizer` is bound to `thisArg`
and invoked with two argument; (value [, index|key, object]).
-**Note:** This method is loosely based on the structured clone algorithm.
+**Note:** This method is loosely based on the
+[structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
The enumerable properties of `arguments` objects and objects created by
constructors other than `Object` are cloned to plain `Object` objects. An
empty object is returned for uncloneable values such as functions, DOM nodes,
-Maps, Sets, and WeakMaps. See the [HTML5 specification](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm)
-for more details.
+Maps, Sets, and WeakMaps.
#### Arguments
1. `value` *(*)*: The value to deep clone.
@@ -4275,7 +4288,7 @@ el.childNodes.length;
### `_.isArguments(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8398 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8568 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package")
Checks if `value` is classified as an `arguments` object.
@@ -4300,7 +4313,7 @@ _.isArguments([1, 2, 3]);
### `_.isArray(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8427 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8597 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package")
Checks if `value` is classified as an `Array` object.
@@ -4325,7 +4338,7 @@ _.isArray(function() { return arguments; }());
### `_.isBoolean(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8447 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8617 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package")
Checks if `value` is classified as a boolean primitive or object.
@@ -4350,7 +4363,7 @@ _.isBoolean(null);
### `_.isDate(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8467 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8637 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package")
Checks if `value` is classified as a `Date` object.
@@ -4375,7 +4388,7 @@ _.isDate('Mon April 23 2012');
### `_.isElement(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8487 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8657 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package")
Checks if `value` is a DOM element.
@@ -4400,7 +4413,7 @@ _.isElement('
');
### `_.isEmpty(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8525 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8695 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package")
Checks if `value` is empty. A value is considered empty unless it is an
`arguments` object, array, string, or jQuery-like collection with a length
@@ -4436,7 +4449,7 @@ _.isEmpty({ 'a': 1 });
### `_.isEqual(value, other, [customizer], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8580 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8750 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package")
Performs a deep comparison between two values to determine if they are
equivalent. If `customizer` is provided it is invoked to compare values.
@@ -4454,7 +4467,7 @@ for comparing other values.
#### Arguments
1. `value` *(*)*: The value to compare.
2. `other` *(*)*: The other value to compare.
-3. `[customizer]` *(Function)*: The function to customize comparing values.
+3. `[customizer]` *(Function)*: The function to customize value comparisons.
4. `[thisArg]` *(*)*: The `this` binding of `customizer`.
#### Returns
@@ -4489,7 +4502,7 @@ _.isEqual(array, other, function(value, other) {
### `_.isError(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8606 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8776 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package")
Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
`SyntaxError`, `TypeError`, or `URIError` object.
@@ -4515,14 +4528,12 @@ _.isError(Error);
### `_.isFinite(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8639 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8807 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package")
Checks if `value` is a finite primitive number.
-**Note:** This method is based on ES `Number.isFinite`. See the
-[ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite)
-for more details.
+**Note:** This method is based on [`Number.isFinite`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite).
#### Arguments
1. `value` *(*)*: The value to check.
@@ -4554,7 +4565,7 @@ _.isFinite(Infinity);
### `_.isFunction(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8659 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8827 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package")
Checks if `value` is classified as a `Function` object.
@@ -4579,7 +4590,7 @@ _.isFunction(/abc/);
### `_.isMatch(object, source, [customizer], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8734 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8900 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package")
Performs a deep comparison between `object` and `source` to determine if
`object` contains equivalent property values. If `customizer` is provided
@@ -4596,7 +4607,7 @@ support for comparing other values.
#### Arguments
1. `object` *(Object)*: The object to inspect.
2. `source` *(Object)*: The object of property values to match.
-3. `[customizer]` *(Function)*: The function to customize comparing values.
+3. `[customizer]` *(Function)*: The function to customize value comparisons.
4. `[thisArg]` *(*)*: The `this` binding of `customizer`.
#### Returns
@@ -4628,14 +4639,13 @@ _.isMatch(object, source, function(value, other) {
### `_.isNaN(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8789 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8955 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package")
Checks if `value` is `NaN`.
-**Note:** This method is not the same as native `isNaN` which returns `true`
-for `undefined` and other non-numeric values. See the [ES5 spec](https://es5.github.io/#x15.1.2.4)
-for more details.
+**Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4)
+which returns `true` for `undefined` and other non-numeric values.
#### Arguments
1. `value` *(*)*: The value to check.
@@ -4664,7 +4674,7 @@ _.isNaN(undefined);
### `_.isNative(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8811 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8977 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package")
Checks if `value` is a native function.
@@ -4689,7 +4699,7 @@ _.isNative(_);
### `_.isNull(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8837 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9003 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package")
Checks if `value` is `null`.
@@ -4714,7 +4724,7 @@ _.isNull(void 0);
### `_.isNumber(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8863 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9029 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package")
Checks if `value` is classified as a `Number` primitive or object.
@@ -4746,13 +4756,10 @@ _.isNumber('8.4');
### `_.isObject(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8688 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L8854 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package")
-Checks if `value` is the language type of `Object`.
+Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
-
-
-**Note:** See the [ES5 spec](https://es5.github.io/#x8) for more details.
#### Arguments
1. `value` *(*)*: The value to check.
@@ -4778,7 +4785,7 @@ _.isObject(1);
### `_.isPlainObject(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8897 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9063 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package")
Checks if `value` is a plain object, that is, an object created by the
`Object` constructor or one with a `[[Prototype]]` of `null`.
@@ -4818,7 +4825,7 @@ _.isPlainObject(Object.create(null));
### `_.isRegExp(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8925 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9091 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package")
Checks if `value` is classified as a `RegExp` object.
@@ -4843,7 +4850,7 @@ _.isRegExp('/abc/');
### `_.isString(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8945 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9111 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package")
Checks if `value` is classified as a `String` primitive or object.
@@ -4868,7 +4875,7 @@ _.isString(1);
### `_.isTypedArray(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8965 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9131 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package")
Checks if `value` is classified as a typed array.
@@ -4893,7 +4900,7 @@ _.isTypedArray([]);
### `_.isUndefined(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L8985 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9151 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package")
Checks if `value` is `undefined`.
@@ -4918,7 +4925,7 @@ _.isUndefined(null);
### `_.toArray(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9004 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9170 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package")
Converts `value` to an array.
@@ -4942,7 +4949,7 @@ Converts `value` to an array.
### `_.toPlainObject(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9040 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9206 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package")
Converts `value` to a plain object flattening inherited enumerable
properties of `value` to own properties of the plain object.
@@ -4980,7 +4987,7 @@ _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
### `_.add(augend, addend)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11394 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11712 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package")
Adds two numbers.
@@ -5003,7 +5010,7 @@ _.add(6, 4);
### `_.max(collection, [iteratee], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11445 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11763 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package")
Gets the maximum value of `collection`. If `collection` is empty or falsey
`-Infinity` is returned. If an iteratee function is provided it is invoked
@@ -5062,7 +5069,7 @@ _.max(users, 'age');
### `_.min(collection, [iteratee], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11494 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11812 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package")
Gets the minimum value of `collection`. If `collection` is empty or falsey
`Infinity` is returned. If an iteratee function is provided it is invoked
@@ -5121,7 +5128,7 @@ _.min(users, 'age');
### `_.sum(collection, [iteratee], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11528 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11846 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package")
Gets the sum of the values in `collection`.
@@ -5168,7 +5175,7 @@ _.sum(objects, 'n');
### `_.inRange(n, [start=0], end)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9948 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10220 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package")
Checks if `n` is between `start` and up to but not including, `end`. If
`end` is not specified it is set to `start` with `start` then set to `0`.
@@ -5208,7 +5215,7 @@ _.inRange(5.2, 4);
### `_.random([min=0], [max=1], [floating])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9986 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10258 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package")
Produces a random number between `min` and `max` (inclusive). If only one
argument is provided a number between `0` and the given number is returned.
@@ -5250,13 +5257,17 @@ _.random(1.2, 5.2);
### `_.assign(object, [sources], [customizer], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9075 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9245 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package")
Assigns own enumerable properties of source object(s) to the destination
object. Subsequent sources overwrite property assignments of previous sources.
If `customizer` is provided it is invoked to produce the assigned values.
The `customizer` is bound to `thisArg` and invoked with five arguments:
(objectValue, sourceValue, key, object, source).
+
+
+**Note:** This method mutates `object` and is based on
+[`Object.assign`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign).
#### Aliases
*_.extend*
@@ -5264,7 +5275,7 @@ The `customizer` is bound to `thisArg` and invoked with five arguments:
#### Arguments
1. `object` *(Object)*: The destination object.
2. `[sources]` *(...Object)*: The source objects.
-3. `[customizer]` *(Function)*: The function to customize assigning values.
+3. `[customizer]` *(Function)*: The function to customize assigned values.
4. `[thisArg]` *(*)*: The `this` binding of `customizer`.
#### Returns
@@ -5277,7 +5288,7 @@ _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' });
// using a customizer callback
var defaults = _.partialRight(_.assign, function(value, other) {
- return typeof value == 'undefined' ? other : value;
+ return _.isUndefined(value) ? other : value;
});
defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
@@ -5290,7 +5301,7 @@ defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
### `_.create(prototype, [properties])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9111 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9285 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package")
Creates an object that inherits from the given `prototype` object. If a
`properties` object is provided its own enumerable properties are assigned
@@ -5332,11 +5343,14 @@ circle instanceof Shape;
### `_.defaults(object, [sources])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9135 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9311 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package")
Assigns own enumerable properties of source object(s) to the destination
object for all destination properties that resolve to `undefined`. Once a
property is set, additional values of the same property are ignored.
+
+
+**Note:** This method mutates `object`.
#### Arguments
1. `object` *(Object)*: The destination object.
@@ -5357,7 +5371,7 @@ _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
### `_.findKey(object, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9192 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9368 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package")
This method is like `_.find` except that it returns the key of the first
element `predicate` returns truthy for instead of the element itself.
@@ -5416,7 +5430,7 @@ _.findKey(users, 'active');
### `_.findLastKey(object, [predicate=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9242 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9418 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package")
This method is like `_.findKey` except that it iterates over elements of
a collection in the opposite order.
@@ -5475,11 +5489,11 @@ _.findLastKey(users, 'active');
### `_.forIn(object, [iteratee=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9271 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9447 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package")
Iterates over own and inherited enumerable properties of an object invoking
`iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked
-with three arguments: (value, key, object). Iterator functions may exit
+with three arguments: (value, key, object). Iteratee functions may exit
iteration early by explicitly returning `false`.
#### Arguments
@@ -5511,7 +5525,7 @@ _.forIn(new Foo, function(value, key) {
### `_.forInRight(object, [iteratee=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9298 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9474 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package")
This method is like `_.forIn` except that it iterates over properties of
`object` in the opposite order.
@@ -5545,11 +5559,11 @@ _.forInRight(new Foo, function(value, key) {
### `_.forOwn(object, [iteratee=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9327 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9503 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package")
Iterates over own enumerable properties of an object invoking `iteratee`
for each property. The `iteratee` is bound to `thisArg` and invoked with
-three arguments: (value, key, object). Iterator functions may exit iteration
+three arguments: (value, key, object). Iteratee functions may exit iteration
early by explicitly returning `false`.
#### Arguments
@@ -5581,7 +5595,7 @@ _.forOwn(new Foo, function(value, key) {
### `_.forOwnRight(object, [iteratee=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9354 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9530 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package")
This method is like `_.forOwn` except that it iterates over properties of
`object` in the opposite order.
@@ -5615,7 +5629,7 @@ _.forOwnRight(new Foo, function(value, key) {
### `_.functions(object)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9371 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9547 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package")
Creates an array of function property names from all enumerable properties,
own and inherited, of `object`.
@@ -5640,24 +5654,62 @@ _.functions(_);
-### `_.has(object, key)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9392 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package")
+### `_.get(object, path, [defaultValue])`
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9575 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package")
-Checks if `key` exists as a direct property of `object` instead of an
-inherited property.
+Gets the property value of `path` on `object`. If the resolved value is
+`undefined` the `defaultValue` is used in its place.
#### Arguments
-1. `object` *(Object)*: The object to inspect.
-2. `key` *(string)*: The key to check.
+1. `object` *(Object)*: The object to query.
+2. `path` *(Array|string)*: The path of the property to get.
+3. `[defaultValue]` *(*)*: The value returned if the resolved value is `undefined`.
#### Returns
-*(boolean)*: Returns `true` if `key` is a direct property, else `false`.
+*(*)*: Returns the resolved value.
#### Example
```js
-var object = { 'a': 1, 'b': 2, 'c': 3 };
+var object = { 'a': [{ 'b': { 'c': 3 } }] };
-_.has(object, 'b');
+_.get(object, 'a[0].b.c');
+// => 3
+
+_.get(object, ['a', '0', 'b', 'c']);
+// => 3
+
+_.get(object, 'a.b.c', 'default');
+// => 'default'
+```
+* * *
+
+
+
+
+
+### `_.has(object, path)`
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9602 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package")
+
+Checks if `path` is a direct property.
+
+#### Arguments
+1. `object` *(Object)*: The object to query.
+2. `path` *(Array|string)*: The path to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `path` is a direct property, else `false`.
+
+#### Example
+```js
+var object = { 'a': { 'b': { 'c': 3 } } };
+
+_.has(object, 'a');
+// => true
+
+_.has(object, 'a.b.c');
+// => true
+
+_.has(object, ['a', 'b', 'c']);
// => true
```
* * *
@@ -5667,7 +5719,7 @@ _.has(object, 'b');
### `_.invert(object, [multiValue])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9419 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9639 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package")
Creates an object composed of the inverted keys and values of `object`.
If `object` contains duplicate values, subsequent values overwrite property
@@ -5698,7 +5750,7 @@ _.invert(object, true);
### `_.keys(object)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9473 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9693 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package")
Creates an array of the own enumerable property names of `object`.
@@ -5708,7 +5760,7 @@ Creates an array of the own enumerable property names of `object`.
for more details.
#### Arguments
-1. `object` *(Object)*: The object to inspect.
+1. `object` *(Object)*: The object to query.
#### Returns
*(Array)*: Returns the array of property names.
@@ -5735,7 +5787,7 @@ _.keys('hi');
### `_.keysIn(object)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9507 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9727 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package")
Creates an array of the own and inherited enumerable property names of `object`.
@@ -5743,7 +5795,7 @@ Creates an array of the own and inherited enumerable property names of `object`.
**Note:** Non-object values are coerced to objects.
#### Arguments
-1. `object` *(Object)*: The object to inspect.
+1. `object` *(Object)*: The object to query.
#### Returns
*(Array)*: Returns the array of property names.
@@ -5767,7 +5819,7 @@ _.keysIn(new Foo);
### `_.mapValues(object, [iteratee=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9606 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9826 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package")
Creates an object with the same keys as `object` and values generated by
running each own enumerable property of `object` through `iteratee`. The
@@ -5819,7 +5871,7 @@ _.mapValues(users, 'age');
### `_.merge(object, [sources], [customizer], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9664 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9884 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package")
Recursively merges own enumerable properties of the source object(s), that
don't resolve to `undefined` into the destination object. Subsequent sources
@@ -5832,7 +5884,7 @@ with five arguments: (objectValue, sourceValue, key, object, source).
#### Arguments
1. `object` *(Object)*: The destination object.
2. `[sources]` *(...Object)*: The source objects.
-3. `[customizer]` *(Function)*: The function to customize merging properties.
+3. `[customizer]` *(Function)*: The function to customize assigned values.
4. `[thisArg]` *(*)*: The `this` binding of `customizer`.
#### Returns
@@ -5876,7 +5928,7 @@ _.merge(object, other, function(a, b) {
### `_.omit(object, [predicate], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9694 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9914 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package")
The opposite of `_.pick`; this method creates an object composed of the
own and inherited enumerable properties of `object` that are not omitted.
@@ -5911,13 +5963,13 @@ _.omit(object, _.isNumber);
### `_.pairs(object)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9722 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pairs "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9942 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pairs "See the npm package")
Creates a two dimensional array of the key-value pairs for `object`,
e.g. `[[key1, value1], [key2, value2]]`.
#### Arguments
-1. `object` *(Object)*: The object to inspect.
+1. `object` *(Object)*: The object to query.
#### Returns
*(Array)*: Returns the new array of key-value pairs.
@@ -5934,7 +5986,7 @@ _.pairs({ 'barney': 36, 'fred': 40 });
### `_.pick(object, [predicate], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9761 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L9981 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package")
Creates an object composed of the picked `object` properties. Property
names may be specified as individual arguments or as arrays of property
@@ -5966,37 +6018,68 @@ _.pick(object, _.isString);
-### `_.result(object, key, [defaultValue])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9800 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package")
+### `_.result(object, path, [defaultValue])`
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10018 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package")
-Resolves the value of property `key` on `object`. If the value of `key` is
-a function it is invoked with the `this` binding of `object` and its result
-is returned, else the property value is returned. If the property value is
-`undefined` the `defaultValue` is used in its place.
+This method is like `_.get` except that if the resolved value is a function
+it is invoked with the `this` binding of its parent object and its result
+is returned.
#### Arguments
1. `object` *(Object)*: The object to query.
-2. `key` *(string)*: The key of the property to resolve.
-3. `[defaultValue]` *(*)*: The value returned if the property value resolves to `undefined`.
+2. `path` *(Array|string)*: The path of the property to resolve.
+3. `[defaultValue]` *(*)*: The value returned if the resolved value is `undefined`.
#### Returns
*(*)*: Returns the resolved value.
#### Example
```js
-var object = { 'user': 'fred', 'age': _.constant(40) };
+var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
-_.result(object, 'user');
-// => 'fred'
+_.result(object, 'a[0].b.c1');
+// => 3
-_.result(object, 'age');
-// => 40
+_.result(object, 'a[0].b.c2');
+// => 4
-_.result(object, 'status', 'busy');
-// => 'busy'
+_.result(object, 'a.b.c', 'default');
+// => 'default'
-_.result(object, 'status', _.constant('busy'));
-// => 'busy'
+_.result(object, 'a.b.c', _.constant('default'));
+// => 'default'
+```
+* * *
+
+
+
+
+
+### `_.set(object, path, value)`
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10054 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package")
+
+Sets the property value of `path` on `object`. If a portion of `path`
+does not exist it is created.
+
+#### Arguments
+1. `object` *(Object)*: The object to augment.
+2. `path` *(Array|string)*: The path of the property to set.
+3. `value` *(*)*: The value to set.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+var object = { 'a': [{ 'b': { 'c': 3 } }] };
+
+_.set(object, 'a[0].b.c', 4);
+console.log(object.a[0].b.c);
+// => 4
+
+_.set(object, 'x[0].y.z', 5);
+console.log(object.x[0].y.z);
+// => 5
```
* * *
@@ -6005,13 +6088,13 @@ _.result(object, 'status', _.constant('busy'));
### `_.transform(object, [iteratee=_.identity], [accumulator], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9837 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10109 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package")
An alternative to `_.reduce`; this method transforms `object` to a new
`accumulator` object which is the result of running each of its own enumerable
properties through `iteratee`, with each invocation potentially mutating
the `accumulator` object. The `iteratee` is bound to `thisArg` and invoked
-with four arguments: (accumulator, value, key, object). Iterator functions
+with four arguments: (accumulator, value, key, object). Iteratee functions
may exit iteration early by explicitly returning `false`.
#### Arguments
@@ -6043,7 +6126,7 @@ _.transform({ 'a': 1, 'b': 2 }, function(result, n, key) {
### `_.values(object)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9884 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10156 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package")
Creates an array of the own enumerable property values of `object`.
@@ -6078,7 +6161,7 @@ _.values('hi');
### `_.valuesIn(object)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L9911 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10183 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package")
Creates an array of the own and inherited enumerable property values
of `object`.
@@ -6117,10 +6200,9 @@ _.valuesIn(new Foo);
### `_.camelCase([string=''])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10043 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10314 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package")
-Converts `string` to camel case.
-See [Wikipedia](https://en.wikipedia.org/wiki/CamelCase) for more details.
+Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
#### Arguments
1. `[string='']` *(string)*: The string to convert.
@@ -6146,7 +6228,7 @@ _.camelCase('__foo_bar__');
### `_.capitalize([string=''])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10061 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10332 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package")
Capitalizes the first character of `string`.
@@ -6168,11 +6250,10 @@ _.capitalize('fred');
### `_.deburr([string=''])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10081 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10351 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package")
-Deburrs `string` by converting latin-1 supplementary letters to basic latin letters.
-See [Wikipedia](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
-for more details.
+Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
+to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
#### Arguments
1. `[string='']` *(string)*: The string to deburr.
@@ -6192,7 +6273,7 @@ _.deburr('déjà vu');
### `_.endsWith([string=''], [target], [position=string.length])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10107 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10377 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package")
Checks if `string` ends with the given target string.
@@ -6222,7 +6303,7 @@ _.endsWith('abc', 'b', 2);
### `_.escape([string=''])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10152 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10422 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package")
Converts the characters "&", "<", ">", '"', "'", and "\`", in `string` to
their corresponding HTML entities.
@@ -6240,14 +6321,14 @@ See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersan
Backticks are escaped because in Internet Explorer < 9, they can break out
-of attribute values or HTML comments. See [#102](https://html5sec.org/#102),
-[#108](https://html5sec.org/#108), and [#133](https://html5sec.org/#133) of
-the [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
-
-
-When working with HTML you should always quote attribute values to reduce
-XSS vectors. See [Ryan Grove's article](http://wonko.com/post/html-escaping)
+of attribute values or HTML comments. See [#59](https://html5sec.org/#59),
+[#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
+[#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/)
for more details.
+
+
+When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping)
+to reduce XSS vectors.
#### Arguments
1. `[string='']` *(string)*: The string to escape.
@@ -6267,7 +6348,7 @@ _.escape('fred, barney, & pebbles');
### `_.escapeRegExp([string=''])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10174 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10444 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package")
Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?",
"*", "+", "(", ")", "[", "]", "{" and "}" in `string`.
@@ -6290,11 +6371,9 @@ _.escapeRegExp('[lodash](https://lodash.com/)');
### `_.kebabCase([string=''])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10202 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10470 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package")
-Converts `string` to kebab case.
-See [Wikipedia](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles) for
-more details.
+Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
#### Arguments
1. `[string='']` *(string)*: The string to convert.
@@ -6320,7 +6399,7 @@ _.kebabCase('__foo_bar__');
### `_.pad([string=''], [length=0], [chars=' '])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10228 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10496 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package")
Pads `string` on the left and right sides if it is shorter than `length`.
Padding characters are truncated if they can't be evenly divided by `length`.
@@ -6351,7 +6430,7 @@ _.pad('abc', 3);
### `_.padLeft([string=''], [length=0], [chars=' '])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10266 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padleft "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10534 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padleft "See the npm package")
Pads `string` on the left side if it is shorter than `length`. Padding
characters are truncated if they exceed `length`.
@@ -6382,7 +6461,7 @@ _.padLeft('abc', 3);
### `_.padRight([string=''], [length=0], [chars=' '])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10290 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padright "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10558 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padright "See the npm package")
Pads `string` on the right side if it is shorter than `length`. Padding
characters are truncated if they exceed `length`.
@@ -6413,15 +6492,15 @@ _.padRight('abc', 3);
### `_.parseInt(string, [radix])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10315 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10583 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package")
Converts `string` to an integer of the specified radix. If `radix` is
`undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal,
in which case a `radix` of `16` is used.
-**Note:** This method aligns with the ES5 implementation of `parseInt`.
-See the [ES5 spec](https://es5.github.io/#E) for more details.
+**Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#E)
+of `parseInt`.
#### Arguments
1. `string` *(string)*: The string to convert.
@@ -6445,7 +6524,7 @@ _.map(['6', '08', '10'], _.parseInt);
### `_.repeat([string=''], [n=0])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10357 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10625 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package")
Repeats the given string `n` times.
@@ -6474,10 +6553,9 @@ _.repeat('abc', 0);
### `_.snakeCase([string=''])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10397 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10664 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package")
-Converts `string` to snake case.
-See [Wikipedia](https://en.wikipedia.org/wiki/Snake_case) for more details.
+Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case).
#### Arguments
1. `[string='']` *(string)*: The string to convert.
@@ -6503,11 +6581,9 @@ _.snakeCase('--foo-bar');
### `_.startCase([string=''])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10422 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10687 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package")
-Converts `string` to start case.
-See [Wikipedia](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage)
-for more details.
+Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
#### Arguments
1. `[string='']` *(string)*: The string to convert.
@@ -6533,7 +6609,7 @@ _.startCase('__foo_bar__');
### `_.startsWith([string=''], [target], [position=0])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10447 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10712 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package")
Checks if `string` starts with the given target string.
@@ -6563,7 +6639,7 @@ _.startsWith('abc', 'b', 1);
### `_.template([string=''], [options])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10552 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10817 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package")
Creates a compiled template function that can interpolate data properties
in "interpolate" delimiters, HTML-escape interpolated data properties in
@@ -6572,9 +6648,9 @@ properties may be accessed as free variables in the template. If a setting
object is provided it takes precedence over `_.templateSettings` values.
-**Note:** In the development build `_.template` utilizes sourceURLs for easier debugging.
-See the [HTML5 Rocks article on sourcemaps](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
-for more details.
+**Note:** In the development build `_.template` utilizes
+[sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+for easier debugging.
For more information on precompiling templates see
@@ -6670,7 +6746,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\
### `_.trim([string=''], [chars=whitespace])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10679 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10944 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package")
Removes leading and trailing whitespace or specified characters from `string`.
@@ -6699,7 +6775,7 @@ _.map([' foo ', ' bar '], _.trim);
### `_.trimLeft([string=''], [chars=whitespace])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10710 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimleft "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L10975 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimleft "See the npm package")
Removes leading whitespace or specified characters from `string`.
@@ -6725,7 +6801,7 @@ _.trimLeft('-_-abc-_-', '_-');
### `_.trimRight([string=''], [chars=whitespace])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10740 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimright "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11005 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimright "See the npm package")
Removes trailing whitespace or specified characters from `string`.
@@ -6751,7 +6827,7 @@ _.trimRight('-_-abc-_-', '_-');
### `_.trunc([string=''], [options], [options.length=30], [options.omission='...'], [options.separator])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10792 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trunc "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11057 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trunc "See the npm package")
Truncates `string` if it is longer than the given maximum string length.
The last characters of the truncated string are replaced with the omission
@@ -6799,7 +6875,7 @@ _.trunc('hi-diddly-ho there, neighborino', {
### `_.unescape([string=''])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10862 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11127 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package")
The inverse of `_.escape`; this method converts the HTML entities
`&`, `<`, `>`, `"`, `'`, and ``` in `string` to their
@@ -6827,7 +6903,7 @@ _.unescape('fred, barney, & pebbles');
### `_.words([string=''], [pattern])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10887 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11152 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package")
Splits `string` into an array of its words.
@@ -6859,7 +6935,7 @@ _.words('fred, barney, & pebbles', /[^, ]+/g);
### `_.attempt(func)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10917 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11182 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package")
Attempts to invoke `func`, returning either the result or the caught error
object. Any additional arguments are provided to `func` when it is invoked.
@@ -6888,7 +6964,7 @@ if (_.isError(elements)) {
### `_.callback([func=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10963 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.callback "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11228 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.callback "See the npm package")
Creates a function that invokes `func` with the `this` binding of `thisArg`
and arguments of the created function. If `func` is a property name the
@@ -6936,7 +7012,7 @@ _.filter(users, 'age__gt36');
### `_.constant(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L10988 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11253 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package")
Creates a function that returns `value`.
@@ -6961,7 +7037,7 @@ getter() === object;
### `_.identity(value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11009 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11274 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package")
This method returns the first argument provided to it.
@@ -6985,7 +7061,7 @@ _.identity(object) === object;
### `_.matches(source)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11038 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11303 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package")
Creates a function which performs a deep comparison between a given object
and `source`, returning `true` if the given object has equivalent property
@@ -7019,10 +7095,10 @@ _.filter(users, _.matches({ 'age': 40, 'active': false }));
-### `_.matchesProperty(key, value)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11066 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package")
+### `_.matchesProperty(path, value)`
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11331 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package")
-Creates a function which compares the property value of `key` on a given
+Creates a function which compares the property value of `path` on a given
object to `value`.
@@ -7031,7 +7107,7 @@ numbers, `Object` objects, regexes, and strings. Objects are compared by
their own, not inherited, enumerable properties.
#### Arguments
-1. `key` *(string)*: The key of the property to get.
+1. `path` *(Array|string)*: The path of the property to get.
2. `value` *(*)*: The value to compare.
#### Returns
@@ -7053,19 +7129,78 @@ _.find(users, _.matchesProperty('user', 'fred'));
-### `_.mixin([object=this], source, [options])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11109 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package")
+### `_.method(path)`
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11356 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package")
+
+Creates a function which invokes the method at `path` on a given object.
+
+#### Arguments
+1. `path` *(Array|string)*: The path of the method to invoke.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var objects = [
+ { 'a': { 'b': { 'c': _.constant(2) } } },
+ { 'a': { 'b': { 'c': _.constant(1) } } }
+];
+
+_.map(objects, _.method('a.b.c'));
+// => [2, 1]
+
+_.invoke(_.sortBy(objects, _.method(['a', 'b', 'c'])), 'a.b.c');
+// => [1, 2]
+```
+* * *
+
+
+
+
+
+### `_.methodOf(object)`
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11382 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package")
+
+The opposite of `_.method`; this method creates a function which invokes
+the method at a given path on `object`.
+
+#### Arguments
+1. `object` *(Object)*: The object to query.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var array = _.times(3, _.constant),
+ object = { 'a': array, 'b': array, 'c': array };
+
+_.map(['a[2]', 'c[0]'], _.methodOf(object));
+// => [2, 0]
+
+_.map([['a', '2'], ['c', '0']], _.methodOf(object));
+// => [2, 0]
+```
+* * *
+
+
+
+
+
+### `_.mixin([object=lodash], source, [options])`
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11427 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package")
Adds all own enumerable function properties of a source object to the
destination object. If `object` is a function then methods are added to
its prototype as well.
-**Note:** Use `_.runInContext` to create a pristine `lodash` function
-for mixins to avoid conflicts caused by modifying the original.
+**Note:** Use `_.runInContext` to create a pristine `lodash` function to
+avoid conflicts caused by modifying the original.
#### Arguments
-1. `[object=this]` *(Function|Object)*: object The destination object.
+1. `[object=lodash]` *(Function|Object)*: The destination object.
2. `source` *(Object)*: The object of functions to add.
3. `[options]` *(Object)*: The options object.
4. `[options.chain=true]` *(boolean)*: Specify whether the functions added are chainable.
@@ -7102,7 +7237,7 @@ _('fred').vowels();
### `_.noConflict()`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11174 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11492 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package")
Reverts the `_` variable to its previous value and returns a reference to
the `lodash` function.
@@ -7121,7 +7256,7 @@ var lodash = _.noConflict();
### `_.noop()`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11193 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11511 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package")
A no-operation function which returns `undefined` regardless of the
arguments it receives.
@@ -7139,31 +7274,30 @@ _.noop(object) === undefined;
-### `_.property(key)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11220 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package")
+### `_.property(path)`
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11537 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package")
-Creates a function which returns the property value of `key` on a given object.
+Creates a function which returns the property value at `path` on a
+given object.
#### Arguments
-1. `key` *(string)*: The key of the property to get.
+1. `path` *(Array|string)*: The path of the property to get.
#### Returns
*(Function)*: Returns the new function.
#### Example
```js
-var users = [
- { 'user': 'fred' },
- { 'user': 'barney' }
+var objects = [
+ { 'a': { 'b': { 'c': 2 } } },
+ { 'a': { 'b': { 'c': 1 } } }
];
-var getName = _.property('user');
+_.map(objects, _.property('a.b.c'));
+// => [2, 1]
-_.map(users, getName);
-// => ['fred', 'barney']
-
-_.pluck(_.sortBy(users, getName), 'user');
-// => ['barney', 'fred']
+_.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
+// => [1, 2]
```
* * *
@@ -7172,26 +7306,27 @@ _.pluck(_.sortBy(users, getName), 'user');
### `_.propertyOf(object)`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11243 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11561 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package")
The opposite of `_.property`; this method creates a function which returns
-the property value of a given key on `object`.
+the property value at a given path on `object`.
#### Arguments
-1. `object` *(Object)*: The object to inspect.
+1. `object` *(Object)*: The object to query.
#### Returns
*(Function)*: Returns the new function.
#### Example
```js
-var object = { 'a': 3, 'b': 1, 'c': 2 };
+var array = [0, 1, 2],
+ object = { 'a': array, 'b': array, 'c': array };
-_.map(['a', 'c'], _.propertyOf(object));
-// => [3, 2]
+_.map(['a[2]', 'c[0]'], _.propertyOf(object));
+// => [2, 0]
-_.sortBy(['a', 'b', 'c'], _.propertyOf(object));
-// => ['b', 'c', 'a']
+_.map([['a', '2'], ['c', '0']], _.propertyOf(object));
+// => [2, 0]
```
* * *
@@ -7200,11 +7335,11 @@ _.sortBy(['a', 'b', 'c'], _.propertyOf(object));
### `_.range([start=0], end, [step=1])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11282 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11600 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package")
Creates an array of numbers (positive and/or negative) progressing from
`start` up to, but not including, `end`. If `end` is not specified it is
-set to `start` with `start` then set to `0`. If `start` is less than `end`
+set to `start` with `start` then set to `0`. If `end` is less than `start`
a zero-length range is created unless a negative `step` is specified.
#### Arguments
@@ -7242,7 +7377,7 @@ _.range(0);
### `_.runInContext([context=root])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L719 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L718 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package")
Create a new pristine `lodash` function using the given `context` object.
@@ -7286,7 +7421,7 @@ var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
### `_.times(n, [iteratee=_.identity], [thisArg])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11335 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11653 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package")
Invokes the iteratee function `n` times, returning an array of the results
of each invocation. The `iteratee` is bound to `thisArg` and invoked with
@@ -7308,7 +7443,7 @@ var diceRolls = _.times(3, _.partial(_.random, 1, 6, false));
_.times(3, function(n) {
mage.castSpell(n);
});
-// => invokes `mage.castSpell(n)` three times with `n` of `0`, `1`, and `2` respectively
+// => invokes `mage.castSpell(n)` three times with `n` of `0`, `1`, and `2`
_.times(3, function(n) {
this.cast(n);
@@ -7322,7 +7457,7 @@ _.times(3, function(n) {
### `_.uniqueId([prefix])`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11373 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L11691 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package")
Generates a unique ID. If `prefix` is provided the ID is appended to it.
@@ -7353,7 +7488,7 @@ _.uniqueId();
### `_.templateSettings.imports._`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1215 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1225 "View in source") [Ⓣ][1]
A reference to the `lodash` function.
@@ -7370,7 +7505,7 @@ A reference to the `lodash` function.
### `_.VERSION`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L11814 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L12136 "View in source") [Ⓣ][1]
(string): The semantic version number.
@@ -7381,7 +7516,7 @@ A reference to the `lodash` function.
### `_.support`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1004 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.support "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1016 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.support "See the npm package")
(Object): An object environment feature flags.
@@ -7392,7 +7527,7 @@ A reference to the `lodash` function.
### `_.support.argsTag`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1021 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1033 "View in source") [Ⓣ][1]
(boolean): Detect if the `toStringTag` of `arguments` objects is resolvable
(all but Firefox < 4, IE < 9).
@@ -7404,7 +7539,7 @@ A reference to the `lodash` function.
### `_.support.enumErrorProps`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1030 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1042 "View in source") [Ⓣ][1]
(boolean): Detect if `name` or `message` properties of `Error.prototype` are
enumerable by default (IE < 9, Safari < 5.1).
@@ -7416,7 +7551,7 @@ enumerable by default (IE < 9, Safari < 5.1).
### `_.support.enumPrototypes`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1044 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1056 "View in source") [Ⓣ][1]
(boolean): Detect if `prototype` properties are enumerable by default.
@@ -7433,7 +7568,7 @@ property to `true`.
### `_.support.funcDecomp`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1054 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1066 "View in source") [Ⓣ][1]
(boolean): Detect if functions can be decompiled by `Function#toString`
(all but Firefox OS certified apps, older Opera mobile browsers, and
@@ -7446,7 +7581,7 @@ the PlayStation 3; forced `false` for Windows 8 apps).
### `_.support.funcNames`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1062 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1074 "View in source") [Ⓣ][1]
(boolean): Detect if `Function#name` is supported (all but IE).
@@ -7457,7 +7592,7 @@ the PlayStation 3; forced `false` for Windows 8 apps).
### `_.support.nodeTag`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1070 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1082 "View in source") [Ⓣ][1]
(boolean): Detect if the `toStringTag` of DOM nodes is resolvable (all but IE < 9).
@@ -7468,10 +7603,9 @@ the PlayStation 3; forced `false` for Windows 8 apps).
### `_.support.nonEnumShadows`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1091 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1101 "View in source") [Ⓣ][1]
-(boolean): Detect if properties shadowing those on `Object.prototype` are
-non-enumerable.
+(boolean): Detect if properties shadowing those on `Object.prototype` are non-enumerable.
In IE < 9 an object's own properties, shadowing non-enumerable ones,
@@ -7484,10 +7618,9 @@ are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug).
### `_.support.nonEnumStrings`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1079 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1090 "View in source") [Ⓣ][1]
-(boolean): Detect if string indexes are non-enumerable
-(IE < 9, RingoJS, Rhino, Narwhal).
+(boolean): Detect if string indexes are non-enumerable (IE < 9, RingoJS, Rhino, Narwhal).
* * *
@@ -7496,7 +7629,7 @@ are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug).
### `_.support.ownLast`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1099 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1109 "View in source") [Ⓣ][1]
(boolean): Detect if own properties are iterated after inherited properties (IE < 9).
@@ -7507,17 +7640,17 @@ are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug).
### `_.support.spliceObjects`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1114 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1124 "View in source") [Ⓣ][1]
(boolean): Detect if `Array#shift` and `Array#splice` augment array-like objects
correctly.
-Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array `shift()`
-and `splice()` functions that fail to remove the last element, `value[0]`,
-of array-like objects even though the `length` property is set to `0`.
-The `shift()` method is buggy in compatibility modes of IE 8, while `splice()`
-is buggy regardless of mode in IE < 9.
+Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array
+`shift()` and `splice()` functions that fail to remove the last element,
+`value[0]`, of array-like objects even though the "length" property is
+set to `0`. The `shift()` method is buggy in compatibility modes of IE 8,
+while `splice()` is buggy regardless of mode in IE < 9.
* * *
@@ -7526,7 +7659,7 @@ is buggy regardless of mode in IE < 9.
### `_.support.unindexedChars`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1125 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1135 "View in source") [Ⓣ][1]
(boolean): Detect lack of support for accessing string characters by index.
@@ -7541,7 +7674,7 @@ by index on string literals, not string objects.
### `_.templateSettings`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1167 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package")
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1177 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package")
(Object): By default, the template delimiters used by lodash are like those in
embedded Ruby (ERB). Change the following template settings to use
@@ -7554,7 +7687,7 @@ alternative delimiters.
### `_.templateSettings.escape`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1175 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1185 "View in source") [Ⓣ][1]
(RegExp): Used to detect `data` property values to be HTML-escaped.
@@ -7565,7 +7698,7 @@ alternative delimiters.
### `_.templateSettings.evaluate`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1183 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1193 "View in source") [Ⓣ][1]
(RegExp): Used to detect code to be evaluated.
@@ -7576,7 +7709,7 @@ alternative delimiters.
### `_.templateSettings.imports`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1207 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1217 "View in source") [Ⓣ][1]
(Object): Used to import variables into the compiled template.
@@ -7587,7 +7720,7 @@ alternative delimiters.
### `_.templateSettings.interpolate`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1191 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1201 "View in source") [Ⓣ][1]
(RegExp): Used to detect `data` property values to inject.
@@ -7598,7 +7731,7 @@ alternative delimiters.
### `_.templateSettings.variable`
-# [Ⓢ](https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js#L1199 "View in source") [Ⓣ][1]
+# [Ⓢ](https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js#L1209 "View in source") [Ⓣ][1]
(string): Used to reference the data object in the template text.
diff --git a/lodash.js b/lodash.js
index da29d9925..02b4118a1 100644
--- a/lodash.js
+++ b/lodash.js
@@ -1,9 +1,9 @@
/**
* @license
- * lodash 3.6.0 (Custom Build)
+ * lodash 3.7.0 (Custom Build)
* Build: `lodash modern -o ./lodash.js`
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.8.2
+ * Based on Underscore.js 1.8.3
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
@@ -13,7 +13,7 @@
var undefined;
/** Used as the semantic version number. */
- var VERSION = '3.6.0';
+ var VERSION = '3.7.0';
/** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1,
@@ -87,30 +87,10 @@
reEvaluate = /<%([\s\S]+?)%>/g,
reInterpolate = /<%=([\s\S]+?)%>/g;
- /**
- * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
- */
- var reComboMarks = /[\u0300-\u036f\ufe20-\ufe23]/g;
-
- /**
- * Used to match [ES template delimiters](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components).
- */
- var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
-
- /** Used to match `RegExp` flags from their coerced string values. */
- var reFlags = /\w*$/;
-
- /** Used to detect hexadecimal string values. */
- var reHexPrefix = /^0[xX]/;
-
- /** Used to detect host constructors (Safari > 5). */
- var reHostCtor = /^\[object .+?Constructor\]$/;
-
- /** Used to match latin-1 supplementary letters (excluding mathematical operators). */
- var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
-
- /** Used to ensure capturing order of template delimiters. */
- var reNoMatch = /($^)/;
+ /** Used to match property names within property paths. */
+ var reIsDeepProp = /\.|\[(?:[^[\]]+|(["'])(?:(?!\1)[^\n\\]|\\.)*?)\1\]/,
+ reIsPlainProp = /^\w*$/,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
/**
* Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special).
@@ -120,6 +100,30 @@
var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g,
reHasRegExpChars = RegExp(reRegExpChars.source);
+ /** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */
+ var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g;
+
+ /** Used to match backslashes in property paths. */
+ var reEscapeChar = /\\(\\)?/g;
+
+ /** Used to match [ES template delimiters](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components). */
+ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+
+ /** Used to match `RegExp` flags from their coerced string values. */
+ var reFlags = /\w*$/;
+
+ /** Used to detect hexadecimal string values. */
+ var reHasHexPrefix = /^0[xX]/;
+
+ /** Used to detect host constructors (Safari > 5). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+ /** Used to match latin-1 supplementary letters (excluding mathematical operators). */
+ var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
+
+ /** Used to ensure capturing order of template delimiters. */
+ var reNoMatch = /($^)/;
+
/** Used to match unescaped characters in compiled string literals. */
var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
@@ -257,7 +261,7 @@
var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
/** Detect free variable `global` from Node.js. */
- var freeGlobal = freeExports && freeModule && typeof global == 'object' && global;
+ var freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;
/** Detect free variable `self`. */
var freeSelf = objectTypes[typeof self] && self && self.Object && self;
@@ -292,10 +296,10 @@
var valIsReflexive = value === value,
othIsReflexive = other === other;
- if (value > other || !valIsReflexive || (typeof value == 'undefined' && othIsReflexive)) {
+ if (value > other || !valIsReflexive || (value === undefined && othIsReflexive)) {
return 1;
}
- if (value < other || !othIsReflexive || (typeof other == 'undefined' && valIsReflexive)) {
+ if (value < other || !othIsReflexive || (other === undefined && valIsReflexive)) {
return -1;
}
}
@@ -438,7 +442,7 @@
* Used by `_.sortByOrder` to compare multiple properties of each element
* in a collection and stable sort them in the following order:
*
- * If orders is unspecified, sort in ascending order for all properties.
+ * If `orders` is unspecified, sort in ascending order for all properties.
* Otherwise, for each property, sort in ascending order if its corresponding value in
* orders is true, and descending order if false.
*
@@ -715,9 +719,6 @@
/** Used to resolve the decompiled source of functions. */
var fnToString = Function.prototype.toString;
- /** Used to the length of n-tuples for `_.unzip`. */
- var getLength = baseProperty('length');
-
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
@@ -734,7 +735,7 @@
var oldDash = context._;
/** Used to detect if a method is native. */
- var reNative = RegExp('^' +
+ var reIsNative = RegExp('^' +
escapeRegExp(objToString)
.replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
@@ -745,8 +746,10 @@
ceil = Math.ceil,
clearTimeout = context.clearTimeout,
floor = Math.floor,
+ getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnPropertySymbols) && getOwnPropertySymbols,
getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf,
push = arrayProto.push,
+ preventExtensions = isNative(Object.preventExtensions = Object.preventExtensions) && preventExtensions,
propertyIsEnumerable = objectProto.propertyIsEnumerable,
Set = isNative(Set = context.Set) && Set,
setTimeout = context.setTimeout,
@@ -766,6 +769,22 @@
return result;
}());
+ /** Used as `baseAssign`. */
+ var nativeAssign = (function() {
+ // Avoid `Object.assign` in Firefox 34-37 which have an early implementation
+ // with a now defunct try/catch behavior. See https://bugzilla.mozilla.org/show_bug.cgi?id=1103344
+ // for more details.
+ //
+ // Use `Object.preventExtensions` on a plain object instead of simply using
+ // `Object('x')` because Chrome and IE fail to throw an error when attempting
+ // to assign values to readonly indexes of strings in strict mode.
+ var object = { '1': 0 },
+ func = preventExtensions && isNative(func = Object.assign) && func;
+
+ try { func(preventExtensions(object), 'xo'); } catch(e) {}
+ return !object[1] && func;
+ }());
+
/* Native method references for those with the same name as other `lodash` methods. */
var nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray,
nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate,
@@ -843,8 +862,8 @@
* `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, `forEach`,
* `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `functions`,
* `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, `invoke`, `keys`,
- * `keysIn`, `map`, `mapValues`, `matches`, `matchesProperty`, `memoize`, `merge`,
- * `mixin`, `negate`, `noop`, `omit`, `once`, `pairs`, `partial`, `partialRight`,
+ * `keysIn`, `map`, `mapValues`, `matches`, `matchesProperty`, `memoize`,
+ * `merge`, `mixin`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`,
* `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`,
* `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `reverse`,
* `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`, `sortByOrder`, `splice`,
@@ -858,15 +877,15 @@
* `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`,
* `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, `has`,
* `identity`, `includes`, `indexOf`, `inRange`, `isArguments`, `isArray`,
- * `isBoolean`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isError`,
- * `isFinite`,`isFunction`, `isMatch`, `isNative`, `isNaN`, `isNull`, `isNumber`,
- * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`,
- * `isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `max`, `min`,
- * `noConflict`, `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`,
- * `random`, `reduce`, `reduceRight`, `repeat`, `result`, `runInContext`,
- * `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`,
- * `startCase`, `startsWith`, `sum`, `template`, `trim`, `trimLeft`,
- * `trimRight`, `trunc`, `unescape`, `uniqueId`, `value`, and `words`
+ * `isBoolean`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isError`, `isFinite`
+ * `isFunction`, `isMatch`, `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`,
+ * `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `isTypedArray`,
+ * `join`, `kebabCase`, `last`, `lastIndexOf`, `max`, `min`, `noConflict`,
+ * `noop`, `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`,
+ * `reduce`, `reduceRight`, `repeat`, `result`, `runInContext`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`, `startsWith`,
+ * `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`, `unescape`,
+ * `uniqueId`, `value`, and `words`
*
* The wrapper method `sample` will return a wrapped value when `n` is provided,
* otherwise an unwrapped value is returned.
@@ -881,8 +900,8 @@
* var wrapped = _([1, 2, 3]);
*
* // returns an unwrapped value
- * wrapped.reduce(function(sum, n) {
- * return sum + n;
+ * wrapped.reduce(function(total, n) {
+ * return total + n;
* });
* // => 6
*
@@ -942,6 +961,12 @@
var support = lodash.support = {};
(function(x) {
+ var Ctor = function() { this.x = x; },
+ object = { '0': x, 'length': x },
+ props = [];
+
+ Ctor.prototype = { 'valueOf': x, 'y': x };
+ for (var key in new Ctor) { props.push(key); }
/**
* Detect if functions can be decompiled by `Function#toString`
@@ -979,8 +1004,8 @@
* In Firefox < 4, IE < 9, PhantomJS, and Safari < 5.1 `arguments` object
* indexes are non-enumerable. Chrome < 25 and Node.js < 0.11.0 treat
* `arguments` object indexes as non-enumerable and fail `hasOwnProperty`
- * checks for indexes that exceed their function's formal parameters with
- * associated values of `0`.
+ * checks for indexes that exceed the number of function parameters and
+ * whose associated argument values are `0`.
*
* @memberOf _.support
* @type boolean
@@ -990,7 +1015,7 @@
} catch(e) {
support.nonEnumArgs = true;
}
- }(0, 0));
+ }(1, 0));
/**
* By default, the template delimiters used by lodash are like those in
@@ -1237,7 +1262,7 @@
}
/**
- * Adds `value` to `key` of the cache.
+ * Sets `value` to `key` of the cache.
*
* @private
* @name set
@@ -1570,13 +1595,13 @@
* @returns {*} Returns the value to assign to the destination object.
*/
function assignDefaults(objectValue, sourceValue) {
- return typeof objectValue == 'undefined' ? sourceValue : objectValue;
+ return objectValue === undefined ? sourceValue : objectValue;
}
/**
* Used by `_.template` to customize its `_.assign` use.
*
- * **Note:** This method is like `assignDefaults` except that it ignores
+ * **Note:** This function is like `assignDefaults` except that it ignores
* inherited property values when checking if a property is `undefined`.
*
* @private
@@ -1587,26 +1612,26 @@
* @returns {*} Returns the value to assign to the destination object.
*/
function assignOwnDefaults(objectValue, sourceValue, key, object) {
- return (typeof objectValue == 'undefined' || !hasOwnProperty.call(object, key))
+ return (objectValue === undefined || !hasOwnProperty.call(object, key))
? sourceValue
: objectValue;
}
/**
- * The base implementation of `_.assign` without support for argument juggling,
- * multiple sources, and `this` binding `customizer` functions.
+ * A specialized version of `_.assign` for customizing assigned values without
+ * support for argument juggling, multiple sources, and `this` binding `customizer`
+ * functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
- * @param {Function} [customizer] The function to customize assigning values.
- * @returns {Object} Returns the destination object.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
*/
- function baseAssign(object, source, customizer) {
+ function assignWith(object, source, customizer) {
var props = keys(source);
- if (!customizer) {
- return baseCopy(source, object, props);
- }
+ push.apply(props, getSymbols(source));
+
var index = -1,
length = props.length;
@@ -1616,7 +1641,7 @@
result = customizer(value, source[key], key, object, source);
if ((result === result ? (result !== value) : (value === value)) ||
- (typeof value == 'undefined' && !(key in object))) {
+ (value === undefined && !(key in object))) {
object[key] = result;
}
}
@@ -1624,12 +1649,27 @@
}
/**
- * The base implementation of `_.at` without support for strings and individual
- * key arguments.
+ * The base implementation of `_.assign` without support for argument juggling,
+ * multiple sources, and `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ var baseAssign = nativeAssign || function(object, source) {
+ return source == null
+ ? object
+ : baseCopy(source, getSymbols(source), baseCopy(source, keys(source), object));
+ };
+
+ /**
+ * The base implementation of `_.at` without support for string collections
+ * and individual key arguments.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
- * @param {number[]|string[]} [props] The property names or indexes of elements to pick.
+ * @param {number[]|string[]} props The property names or indexes of elements to pick.
* @returns {Array} Returns the new array of picked elements.
*/
function baseAt(collection, props) {
@@ -1642,7 +1682,6 @@
while(++index < propsLength) {
var key = props[index];
if (isArr) {
- key = parseFloat(key);
result[index] = isIndex(key, length) ? collection[key] : undefined;
} else {
result[index] = collection[key];
@@ -1652,19 +1691,17 @@
}
/**
- * Copies the properties of `source` to `object`.
+ * Copies properties of `source` to `object`.
*
* @private
* @param {Object} source The object to copy properties from.
- * @param {Object} [object={}] The object to copy properties to.
* @param {Array} props The property names to copy.
+ * @param {Object} [object={}] The object to copy properties to.
* @returns {Object} Returns `object`.
*/
- function baseCopy(source, object, props) {
- if (!props) {
- props = object;
- object = {};
- }
+ function baseCopy(source, props, object) {
+ object || (object = {});
+
var index = -1,
length = props.length;
@@ -1688,7 +1725,7 @@
function baseCallback(func, thisArg, argCount) {
var type = typeof func;
if (type == 'function') {
- return typeof thisArg == 'undefined'
+ return thisArg === undefined
? func
: bindCallback(func, thisArg, argCount);
}
@@ -1698,9 +1735,9 @@
if (type == 'object') {
return baseMatches(func);
}
- return typeof thisArg == 'undefined'
- ? baseProperty(func + '')
- : baseMatchesProperty(func + '', thisArg);
+ return thisArg === undefined
+ ? property(func)
+ : baseMatchesProperty(func, thisArg);
}
/**
@@ -1722,7 +1759,7 @@
if (customizer) {
result = object ? customizer(value, key, object) : customizer(value);
}
- if (typeof result != 'undefined') {
+ if (result !== undefined) {
return result;
}
if (!isObject(value)) {
@@ -1741,7 +1778,7 @@
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
result = initCloneObject(isFunc ? {} : value);
if (!isDeep) {
- return baseCopy(value, result, keys(value));
+ return baseAssign(result, value);
}
} else {
return cloneableTags[tag]
@@ -1912,7 +1949,7 @@
if (start < 0) {
start = -start > length ? 0 : (length + start);
}
- end = (typeof end == 'undefined' || end > length) ? length : (+end || 0);
+ end = (end === undefined || end > length) ? length : (+end || 0);
if (end < 0) {
end += length;
}
@@ -2009,7 +2046,7 @@
/**
* The base implementation of `baseForIn` and `baseForOwn` which iterates
* over `object` properties returned by `keysFunc` invoking `iteratee` for
- * each property. Iterator functions may exit iteration early by explicitly
+ * each property. Iteratee functions may exit iteration early by explicitly
* returning `false`.
*
* @private
@@ -2095,6 +2132,32 @@
return result;
}
+ /**
+ * The base implementation of `get` without support for string paths
+ * and default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path of the property to get.
+ * @param {string} [pathKey] The key representation of path.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseGet(object, path, pathKey) {
+ if (object == null) {
+ return;
+ }
+ if (pathKey !== undefined && pathKey in toObject(object)) {
+ path = [pathKey];
+ }
+ var index = -1,
+ length = path.length;
+
+ while (object != null && ++index < length) {
+ var result = object = object[path[index]];
+ }
+ return result;
+ }
+
/**
* The base implementation of `_.isEqual` without support for `this` binding
* `customizer` functions.
@@ -2163,27 +2226,23 @@
othIsArr = isTypedArray(other);
}
}
- var objIsObj = (objTag == objectTag || (isLoose && objTag == funcTag)),
- othIsObj = (othTag == objectTag || (isLoose && othTag == funcTag)),
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
if (isSameTag && !(objIsArr || objIsObj)) {
return equalByTag(object, other, objTag);
}
- if (isLoose) {
- if (!isSameTag && !(objIsObj && othIsObj)) {
- return false;
- }
- } else {
+ if (!isLoose) {
var valWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
othWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
if (valWrapped || othWrapped) {
return equalFunc(valWrapped ? object.value() : object, othWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
}
- if (!isSameTag) {
- return false;
- }
+ }
+ if (!isSameTag) {
+ return false;
}
// Assume cyclic values are equal.
// For more information on detecting circular references see https://es5.github.io/#JO.
@@ -2240,10 +2299,10 @@
srcValue = values[index];
if (noCustomizer && strictCompareFlags[index]) {
- var result = typeof objValue != 'undefined' || (key in object);
+ var result = objValue !== undefined || (key in object);
} else {
result = customizer ? customizer(objValue, srcValue, key) : undefined;
- if (typeof result == 'undefined') {
+ if (result === undefined) {
result = baseIsEqual(srcValue, objValue, customizer, true);
}
}
@@ -2264,9 +2323,12 @@
* @returns {Array} Returns the new mapped array.
*/
function baseMap(collection, iteratee) {
- var result = [];
+ var index = -1,
+ length = getLength(collection),
+ result = isLength(length) ? Array(length) : [];
+
baseEach(collection, function(value, key, collection) {
- result.push(iteratee(value, key, collection));
+ result[++index] = iteratee(value, key, collection);
});
return result;
}
@@ -2291,8 +2353,10 @@
if (isStrictComparable(value)) {
return function(object) {
- return object != null && object[key] === value &&
- (typeof value != 'undefined' || (key in toObject(object)));
+ if (object == null) {
+ return false;
+ }
+ return object[key] === value && (value !== undefined || (key in toObject(object)));
};
}
}
@@ -2310,23 +2374,37 @@
}
/**
- * The base implementation of `_.matchesProperty` which does not coerce `key`
- * to a string.
+ * The base implementation of `_.matchesProperty` which does not which does
+ * not clone `value`.
*
* @private
- * @param {string} key The key of the property to get.
+ * @param {string} path The path of the property to get.
* @param {*} value The value to compare.
* @returns {Function} Returns the new function.
*/
- function baseMatchesProperty(key, value) {
- if (isStrictComparable(value)) {
- return function(object) {
- return object != null && object[key] === value &&
- (typeof value != 'undefined' || (key in toObject(object)));
- };
- }
+ function baseMatchesProperty(path, value) {
+ var isArr = isArray(path),
+ isCommon = isKey(path) && isStrictComparable(value),
+ pathKey = (path + '');
+
+ path = toPath(path);
return function(object) {
- return object != null && baseIsEqual(value, object[key], null, true);
+ if (object == null) {
+ return false;
+ }
+ var key = pathKey;
+ object = toObject(object);
+ if ((isArr || !isCommon) && !(key in object)) {
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ if (object == null) {
+ return false;
+ }
+ key = last(path);
+ object = toObject(object);
+ }
+ return object[key] === value
+ ? (value !== undefined || (key in object))
+ : baseIsEqual(value, object[key], null, true);
};
}
@@ -2340,29 +2418,39 @@
* @param {Function} [customizer] The function to customize merging properties.
* @param {Array} [stackA=[]] Tracks traversed source objects.
* @param {Array} [stackB=[]] Associates values with source counterparts.
- * @returns {Object} Returns the destination object.
+ * @returns {Object} Returns `object`.
*/
function baseMerge(object, source, customizer, stackA, stackB) {
if (!isObject(object)) {
return object;
}
var isSrcArr = isLength(source.length) && (isArray(source) || isTypedArray(source));
- (isSrcArr ? arrayEach : baseForOwn)(source, function(srcValue, key, source) {
+ if (!isSrcArr) {
+ var props = keys(source);
+ push.apply(props, getSymbols(source));
+ }
+ arrayEach(props || source, function(srcValue, key) {
+ if (props) {
+ key = srcValue;
+ srcValue = source[key];
+ }
if (isObjectLike(srcValue)) {
stackA || (stackA = []);
stackB || (stackB = []);
- return baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);
+ baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);
}
- var value = object[key],
- result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
- isCommon = typeof result == 'undefined';
+ else {
+ var value = object[key],
+ result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
+ isCommon = result === undefined;
- if (isCommon) {
- result = srcValue;
- }
- if ((isSrcArr || typeof result != 'undefined') &&
- (isCommon || (result === result ? (result !== value) : (value === value)))) {
- object[key] = result;
+ if (isCommon) {
+ result = srcValue;
+ }
+ if ((isSrcArr || result !== undefined) &&
+ (isCommon || (result === result ? (result !== value) : (value === value)))) {
+ object[key] = result;
+ }
}
});
return object;
@@ -2395,14 +2483,14 @@
}
var value = object[key],
result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
- isCommon = typeof result == 'undefined';
+ isCommon = result === undefined;
if (isCommon) {
result = srcValue;
if (isLength(srcValue.length) && (isArray(srcValue) || isTypedArray(srcValue))) {
result = isArray(value)
? value
- : ((value && value.length) ? arrayCopy(value) : []);
+ : (getLength(value) ? arrayCopy(value) : []);
}
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
result = isArguments(value)
@@ -2427,7 +2515,7 @@
}
/**
- * The base implementation of `_.property` which does not coerce `key` to a string.
+ * The base implementation of `_.property` without support for deep paths.
*
* @private
* @param {string} key The key of the property to get.
@@ -2439,6 +2527,42 @@
};
}
+ /**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+ function basePropertyDeep(path) {
+ var pathKey = (path + '');
+ path = toPath(path);
+ return function(object) {
+ return baseGet(object, path, pathKey);
+ };
+ }
+
+ /**
+ * The base implementation of `_.pullAt` without support for individual
+ * index arguments and capturing the removed elements.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {number[]} indexes The indexes of elements to remove.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAt(array, indexes) {
+ var length = indexes.length;
+ while (length--) {
+ var index = parseFloat(indexes[length]);
+ if (index != previous && isIndex(index)) {
+ var previous = index;
+ splice.call(array, index, 1);
+ }
+ }
+ return array;
+ }
+
/**
* The base implementation of `_.random` without support for argument juggling
* and returning floating-point numbers.
@@ -2505,7 +2629,7 @@
if (start < 0) {
start = -start > length ? 0 : (length + start);
}
- end = (typeof end == 'undefined' || end > length) ? length : (+end || 0);
+ end = (end === undefined || end > length) ? length : (+end || 0);
if (end < 0) {
end += length;
}
@@ -2564,23 +2688,19 @@
*
* @private
* @param {Array|Object|string} collection The collection to iterate over.
- * @param {string[]} props The property names to sort by.
- * @param {boolean[]} orders The sort orders of `props`.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {boolean[]} orders The sort orders of `iteratees`.
* @returns {Array} Returns the new sorted array.
*/
- function baseSortByOrder(collection, props, orders) {
- var index = -1,
- length = collection.length,
- result = isLength(length) ? Array(length) : [];
+ function baseSortByOrder(collection, iteratees, orders) {
+ var callback = getCallback(),
+ index = -1;
- baseEach(collection, function(value) {
- var length = props.length,
- criteria = Array(length);
+ iteratees = arrayMap(iteratees, function(iteratee) { return callback(iteratee); });
- while (length--) {
- criteria[length] = value == null ? undefined : value[props[length]];
- }
- result[++index] = { 'criteria': criteria, 'index': index, 'value': value };
+ var result = baseMap(collection, function(value) {
+ var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
});
return baseSortBy(result, function(object, other) {
@@ -2660,7 +2780,7 @@
/**
* The base implementation of `_.values` and `_.valuesIn` which creates an
* array of `object` property values corresponding to the property names
- * returned by `keysFunc`.
+ * of `props`.
*
* @private
* @param {Object} object The object to query.
@@ -2777,7 +2897,7 @@
var low = 0,
high = array ? array.length : 0,
valIsNaN = value !== value,
- valIsUndef = typeof value == 'undefined';
+ valIsUndef = value === undefined;
while (low < high) {
var mid = floor((low + high) / 2),
@@ -2787,7 +2907,7 @@
if (valIsNaN) {
var setLow = isReflexive || retHighest;
} else if (valIsUndef) {
- setLow = isReflexive && (retHighest || typeof computed != 'undefined');
+ setLow = isReflexive && (retHighest || computed !== undefined);
} else {
setLow = retHighest ? (computed <= value) : (computed < value);
}
@@ -2814,7 +2934,7 @@
if (typeof func != 'function') {
return identity;
}
- if (typeof thisArg == 'undefined') {
+ if (thisArg === undefined) {
return func;
}
switch (argCount) {
@@ -2974,38 +3094,32 @@
* @returns {Function} Returns the new assigner function.
*/
function createAssigner(assigner) {
- return function() {
- var args = arguments,
- length = args.length,
- object = args[0];
+ return restParam(function(object, sources) {
+ var index = -1,
+ length = object == null ? 0 : sources.length,
+ customizer = length > 2 && sources[length - 2],
+ guard = length > 2 && sources[2],
+ thisArg = length > 1 && sources[length - 1];
- if (length < 2 || object == null) {
- return object;
- }
- var customizer = args[length - 2],
- thisArg = args[length - 1],
- guard = args[3];
-
- if (length > 3 && typeof customizer == 'function') {
+ if (typeof customizer == 'function') {
customizer = bindCallback(customizer, thisArg, 5);
length -= 2;
} else {
- customizer = (length > 2 && typeof thisArg == 'function') ? thisArg : null;
+ customizer = typeof thisArg == 'function' ? thisArg : null;
length -= (customizer ? 1 : 0);
}
- if (guard && isIterateeCall(args[1], args[2], guard)) {
- customizer = length == 3 ? null : customizer;
- length = 2;
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? null : customizer;
+ length = 1;
}
- var index = 0;
while (++index < length) {
- var source = args[index];
+ var source = sources[index];
if (source) {
assigner(object, source, customizer);
}
}
return object;
- };
+ });
}
/**
@@ -3018,7 +3132,7 @@
*/
function createBaseEach(eachFunc, fromRight) {
return function(collection, iteratee) {
- var length = collection ? collection.length : 0;
+ var length = collection ? getLength(collection) : 0;
if (!isLength(length)) {
return eachFunc(collection, iteratee);
}
@@ -3295,7 +3409,7 @@
*/
function createForEach(arrayFunc, eachFunc) {
return function(collection, iteratee, thisArg) {
- return (typeof iteratee == 'function' && typeof thisArg == 'undefined' && isArray(collection))
+ return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
? arrayFunc(collection, iteratee)
: eachFunc(collection, bindCallback(iteratee, thisArg, 3));
};
@@ -3310,7 +3424,7 @@
*/
function createForIn(objectFunc) {
return function(object, iteratee, thisArg) {
- if (typeof iteratee != 'function' || typeof thisArg != 'undefined') {
+ if (typeof iteratee != 'function' || thisArg !== undefined) {
iteratee = bindCallback(iteratee, thisArg, 3);
}
return objectFunc(object, iteratee, keysIn);
@@ -3326,7 +3440,7 @@
*/
function createForOwn(objectFunc) {
return function(object, iteratee, thisArg) {
- if (typeof iteratee != 'function' || typeof thisArg != 'undefined') {
+ if (typeof iteratee != 'function' || thisArg !== undefined) {
iteratee = bindCallback(iteratee, thisArg, 3);
}
return objectFunc(object, iteratee);
@@ -3373,7 +3487,7 @@
function createReduce(arrayFunc, eachFunc) {
return function(collection, iteratee, accumulator, thisArg) {
var initFromArray = arguments.length < 3;
- return (typeof iteratee == 'function' && typeof thisArg == 'undefined' && isArray(collection))
+ return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
? arrayFunc(collection, iteratee, accumulator, initFromArray)
: baseReduce(collection, getCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc);
};
@@ -3642,7 +3756,7 @@
? customizer(othValue, arrValue, index)
: customizer(arrValue, othValue, index);
}
- if (typeof result == 'undefined') {
+ if (result === undefined) {
// Recursively compare arrays (susceptible to call stack limits).
if (isLoose) {
var othIndex = othLength;
@@ -3741,7 +3855,7 @@
? customizer(othValue, objValue, key)
: customizer(objValue, othValue, key);
}
- if (typeof result == 'undefined') {
+ if (result === undefined) {
// Recursively compare objects (susceptible to call stack limits).
result = (objValue && objValue === othValue) || equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB);
}
@@ -3866,6 +3980,29 @@
return collection ? result(collection, target, fromIndex) : result;
}
+ /**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * in Safari on iOS 8.1 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+ var getLength = baseProperty('length');
+
+ /**
+ * Creates an array of the own symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ var getSymbols = !getOwnPropertySymbols ? constant([]) : function(object) {
+ return getOwnPropertySymbols(toObject(object));
+ };
+
/**
* Gets the view, applying any `transforms` to the `start` and `end` positions.
*
@@ -3934,7 +4071,6 @@
* **Note:** This function only supports cloning values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
- *
* @private
* @param {Object} object The object to clone.
* @param {string} tag The `toStringTag` of the object to clone.
@@ -3968,6 +4104,25 @@
return result;
}
+ /**
+ * Invokes the method at `path` on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {Array} args The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ */
+ function invokePath(object, path, args) {
+ if (object != null && !isKey(path, object)) {
+ path = toPath(path);
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ path = last(path);
+ }
+ var func = object == null ? object : object[path];
+ return func == null ? undefined : func.apply(object, args);
+ }
+
/**
* Checks if `value` is a valid array-like index.
*
@@ -3997,7 +4152,7 @@
}
var type = typeof index;
if (type == 'number') {
- var length = object.length,
+ var length = getLength(object),
prereq = isLength(length) && isIndex(index, length);
} else {
prereq = type == 'string' && index in object;
@@ -4009,6 +4164,26 @@
return false;
}
+ /**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+ function isKey(value, object) {
+ var type = typeof value;
+ if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
+ return true;
+ }
+ if (isArray(value)) {
+ return false;
+ }
+ var result = !reIsDeepProp.test(value);
+ return result || (object != null && value in toObject(object));
+ }
+
/**
* Checks if `func` has a lazy counterpart.
*
@@ -4118,7 +4293,7 @@
/**
* A specialized version of `_.pick` that picks `object` properties specified
- * by the `props` array.
+ * by `props`.
*
* @private
* @param {Object} object The source object.
@@ -4244,7 +4419,7 @@
baseForIn(value, function(subValue, key) {
result = key;
});
- return typeof result == 'undefined' || hasOwnProperty.call(value, result);
+ return result === undefined || hasOwnProperty.call(value, result);
}
/**
@@ -4252,7 +4427,7 @@
* own enumerable property names of `object`.
*
* @private
- * @param {Object} object The object to inspect.
+ * @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function shimKeys(object) {
@@ -4287,7 +4462,7 @@
if (value == null) {
return [];
}
- if (!isLength(value.length)) {
+ if (!isLength(getLength(value))) {
return values(value);
}
return isObject(value) ? value : Object(value);
@@ -4304,6 +4479,24 @@
return isObject(value) ? value : Object(value);
}
+ /**
+ * Converts `value` to property path array if it is not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Array} Returns the property path array.
+ */
+ function toPath(value) {
+ if (isArray(value)) {
+ return value;
+ }
+ var result = [];
+ baseToString(value).replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+ }
+
/**
* Creates a clone of `wrapper`.
*
@@ -4888,7 +5081,8 @@
argsLength = arguments.length,
caches = [],
indexOf = getIndexOf(),
- isCommon = indexOf == baseIndexOf;
+ isCommon = indexOf == baseIndexOf,
+ result = [];
while (++argsIndex < argsLength) {
var value = arguments[argsIndex];
@@ -4898,10 +5092,12 @@
}
}
argsLength = args.length;
+ if (argsLength < 2) {
+ return result;
+ }
var array = args[0],
index = -1,
length = array ? array.length : 0,
- result = [],
seen = caches[0];
outer:
@@ -5069,17 +5265,8 @@
array || (array = []);
indexes = baseFlatten(indexes);
- var length = indexes.length,
- result = baseAt(array, indexes);
-
- indexes.sort(baseCompareAscending);
- while (length--) {
- var index = parseFloat(indexes[length]);
- if (index != previous && isIndex(index)) {
- var previous = index;
- splice.call(array, index, 1);
- }
- }
+ var result = baseAt(array, indexes);
+ basePullAt(array, indexes.sort(baseCompareAscending));
return result;
});
@@ -5123,19 +5310,23 @@
* // => [2, 4]
*/
function remove(array, predicate, thisArg) {
+ var result = [];
+ if (!(array && array.length)) {
+ return result;
+ }
var index = -1,
- length = array ? array.length : 0,
- result = [];
+ indexes = [],
+ length = array.length;
predicate = getCallback(predicate, thisArg, 3);
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result.push(value);
- splice.call(array, index--, 1);
- length--;
+ indexes.push(index);
}
}
+ basePullAt(array, indexes);
return result;
}
@@ -5160,7 +5351,7 @@
/**
* Creates a slice of `array` from `start` up to, but not including, `end`.
*
- * **Note:** This function is used instead of `Array#slice` to support node
+ * **Note:** This method is used instead of `Array#slice` to support node
* lists in IE < 9 and to ensure dense arrays are returned.
*
* @static
@@ -5459,12 +5650,13 @@
});
/**
- * Creates a duplicate-value-free version of an array using `SameValueZero`
- * for equality comparisons. Providing `true` for `isSorted` performs a faster
- * search algorithm for sorted arrays. If an iteratee function is provided it
- * is invoked for each value in the array to generate the criterion by which
- * uniqueness is computed. The `iteratee` is bound to `thisArg` and invoked
- * with three arguments: (value, index, array).
+ * Creates a duplicate-free version of an array, using `SameValueZero` for
+ * equality comparisons, in which only the first occurence of each element
+ * is kept. Providing `true` for `isSorted` performs a faster search algorithm
+ * for sorted arrays. If an iteratee function is provided it is invoked for
+ * each element in the array to generate the criterion by which uniqueness
+ * is computed. The `iteratee` is bound to `thisArg` and invoked with three
+ * arguments: (value, index, array).
*
* If a property name is provided for `iteratee` the created `_.property`
* style callback returns the property value of the given element.
@@ -5492,8 +5684,8 @@
* @returns {Array} Returns the new duplicate-value-free array.
* @example
*
- * _.uniq([1, 2, 1]);
- * // => [1, 2]
+ * _.uniq([2, 1, 2]);
+ * // => [2, 1]
*
* // using `isSorted`
* _.uniq([1, 1, 2], true);
@@ -5943,7 +6135,7 @@
* // => ['barney', 'pebbles']
*/
var at = restParam(function(collection, props) {
- var length = collection ? collection.length : 0;
+ var length = collection ? getLength(collection) : 0;
if (isLength(length)) {
collection = toIterable(collection);
}
@@ -6048,7 +6240,7 @@
if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
predicate = null;
}
- if (typeof predicate != 'function' || typeof thisArg != 'undefined') {
+ if (typeof predicate != 'function' || thisArg !== undefined) {
predicate = getCallback(predicate, thisArg, 3);
}
return func(collection, predicate);
@@ -6218,10 +6410,10 @@
/**
* Iterates over elements of `collection` invoking `iteratee` for each element.
* The `iteratee` is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection). Iterator functions may exit iteration early
+ * (value, index|key, collection). Iteratee functions may exit iteration early
* by explicitly returning `false`.
*
- * **Note:** As with other "Collections" methods, objects with a `length` property
+ * **Note:** As with other "Collections" methods, objects with a "length" property
* are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`
* may be used for object iteration.
*
@@ -6351,7 +6543,7 @@
* // => true
*/
function includes(collection, target, fromIndex, guard) {
- var length = collection ? collection.length : 0;
+ var length = collection ? getLength(collection) : 0;
if (!isLength(length)) {
collection = values(collection);
length = collection.length;
@@ -6420,16 +6612,16 @@
});
/**
- * Invokes the method named by `methodName` on each element in `collection`,
- * returning an array of the results of each invoked method. Any additional
- * arguments are provided to each invoked method. If `methodName` is a function
- * it is invoked for, and `this` bound to, each element in `collection`.
+ * Invokes the method at `path` on each element in `collection`, returning
+ * an array of the results of each invoked method. Any additional arguments
+ * are provided to each invoked method. If `methodName` is a function it is
+ * invoked for, and `this` bound to, each element in `collection`.
*
* @static
* @memberOf _
* @category Collection
* @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|string} methodName The name of the method to invoke or
+ * @param {Array|Function|string} path The path of the method to invoke or
* the function invoked per iteration.
* @param {...*} [args] The arguments to invoke the method with.
* @returns {Array} Returns the array of results.
@@ -6441,15 +6633,16 @@
* _.invoke([123, 456], String.prototype.split, '');
* // => [['1', '2', '3'], ['4', '5', '6']]
*/
- var invoke = restParam(function(collection, methodName, args) {
+ var invoke = restParam(function(collection, path, args) {
var index = -1,
- isFunc = typeof methodName == 'function',
- length = collection ? collection.length : 0,
+ isFunc = typeof path == 'function',
+ isProp = isKey(path),
+ length = getLength(collection),
result = isLength(length) ? Array(length) : [];
baseEach(collection, function(value) {
- var func = isFunc ? methodName : (value != null && value[methodName]);
- result[++index] = func ? func.apply(value, args) : undefined;
+ var func = isFunc ? path : (isProp && value != null && value[path]);
+ result[++index] = func ? func.apply(value, args) : invokePath(value, path, args);
});
return result;
});
@@ -6486,7 +6679,6 @@
* @param {Array|Object|string} collection The collection to iterate over.
* @param {Function|Object|string} [iteratee=_.identity] The function invoked
* per iteration.
- * create a `_.property` or `_.matches` style callback respectively.
* @param {*} [thisArg] The `this` binding of `iteratee`.
* @returns {Array} Returns the new mapped array.
* @example
@@ -6580,13 +6772,13 @@
}, function() { return [[], []]; });
/**
- * Gets the value of `key` from all elements in `collection`.
+ * Gets the property value of `path` from all elements in `collection`.
*
* @static
* @memberOf _
* @category Collection
* @param {Array|Object|string} collection The collection to iterate over.
- * @param {string} key The key of the property to pluck.
+ * @param {Array|string} path The path of the property to pluck.
* @returns {Array} Returns the property values.
* @example
*
@@ -6602,8 +6794,8 @@
* _.pluck(userIndex, 'age');
* // => [36, 40] (iteration order is not guaranteed)
*/
- function pluck(collection, key) {
- return map(collection, baseProperty(key));
+ function pluck(collection, path) {
+ return map(collection, property(path));
}
/**
@@ -6631,8 +6823,8 @@
* @returns {*} Returns the accumulated value.
* @example
*
- * _.reduce([1, 2], function(sum, n) {
- * return sum + n;
+ * _.reduce([1, 2], function(total, n) {
+ * return total + n;
* });
* // => 3
*
@@ -6804,7 +6996,7 @@
* // => 7
*/
function size(collection) {
- var length = collection ? collection.length : 0;
+ var length = collection ? getLength(collection) : 0;
return isLength(length) ? length : keys(collection).length;
}
@@ -6862,7 +7054,7 @@
if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
predicate = null;
}
- if (typeof predicate != 'function' || typeof thisArg != 'undefined') {
+ if (typeof predicate != 'function' || thisArg !== undefined) {
predicate = getCallback(predicate, thisArg, 3);
}
return func(collection, predicate);
@@ -6890,9 +7082,8 @@
* @memberOf _
* @category Collection
* @param {Array|Object|string} collection The collection to iterate over.
- * @param {Array|Function|Object|string} [iteratee=_.identity] The function
- * invoked per iteration. If a property name or an object is provided it is
- * used to create a `_.property` or `_.matches` style callback respectively.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
* @param {*} [thisArg] The `this` binding of `iteratee`.
* @returns {Array} Returns the new sorted array.
* @example
@@ -6921,104 +7112,112 @@
if (collection == null) {
return [];
}
- var index = -1,
- length = collection.length,
- result = isLength(length) ? Array(length) : [];
-
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
iteratee = null;
}
+ var index = -1;
iteratee = getCallback(iteratee, thisArg, 3);
- baseEach(collection, function(value, key, collection) {
- result[++index] = { 'criteria': iteratee(value, key, collection), 'index': index, 'value': value };
+
+ var result = baseMap(collection, function(value, key, collection) {
+ return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value };
});
return baseSortBy(result, compareAscending);
}
/**
- * This method is like `_.sortBy` except that it sorts by property names
- * instead of an iteratee function.
+ * This method is like `_.sortBy` except that it can sort by multiple iteratees
+ * or property names.
+ *
+ * If a property name is provided for an iteratee the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If an object is provided for an iteratee the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
*
* @static
* @memberOf _
* @category Collection
* @param {Array|Object|string} collection The collection to iterate over.
- * @param {...(string|string[])} props The property names to sort by,
- * specified as individual property names or arrays of property names.
+ * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees
+ * The iteratees to sort by, specified as individual values or arrays of values.
* @returns {Array} Returns the new sorted array.
* @example
*
* var users = [
+ * { 'user': 'fred', 'age': 48 },
* { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'barney', 'age': 26 },
- * { 'user': 'fred', 'age': 30 }
+ * { 'user': 'fred', 'age': 42 },
+ * { 'user': 'barney', 'age': 34 }
* ];
*
* _.map(_.sortByAll(users, ['user', 'age']), _.values);
- * // => [['barney', 26], ['barney', 36], ['fred', 30], ['fred', 40]]
+ * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]]
+ *
+ * _.map(_.sortByAll(users, 'user', function(chr) {
+ * return Math.floor(chr.age / 10);
+ * }), _.values);
+ * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
*/
- function sortByAll() {
- var args = arguments,
- collection = args[0],
- guard = args[3],
- index = 0,
- length = args.length - 1;
-
+ var sortByAll = restParam(function(collection, iteratees) {
if (collection == null) {
return [];
}
- var props = Array(length);
- while (index < length) {
- props[index] = args[++index];
+ var guard = iteratees[2];
+ if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) {
+ iteratees.length = 1;
}
- if (guard && isIterateeCall(args[1], args[2], guard)) {
- props = args[1];
- }
- return baseSortByOrder(collection, baseFlatten(props), []);
- }
+ return baseSortByOrder(collection, baseFlatten(iteratees), []);
+ });
/**
* This method is like `_.sortByAll` except that it allows specifying the
- * sort orders of the property names to sort by. A truthy value in `orders`
- * will sort the corresponding property name in ascending order while a
- * falsey value will sort it in descending order.
+ * sort orders of the iteratees to sort by. A truthy value in `orders` will
+ * sort the corresponding property name in ascending order while a falsey
+ * value will sort it in descending order.
+ *
+ * If a property name is provided for an iteratee the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If an object is provided for an iteratee the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
*
* @static
* @memberOf _
* @category Collection
* @param {Array|Object|string} collection The collection to iterate over.
- * @param {string[]} props The property names to sort by.
- * @param {boolean[]} orders The sort orders of `props`.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {boolean[]} orders The sort orders of `iteratees`.
* @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
* @returns {Array} Returns the new sorted array.
* @example
*
* var users = [
- * { 'user': 'barney', 'age': 26 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 30 }
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 34 },
+ * { 'user': 'fred', 'age': 42 },
+ * { 'user': 'barney', 'age': 36 }
* ];
*
* // sort by `user` in ascending order and by `age` in descending order
* _.map(_.sortByOrder(users, ['user', 'age'], [true, false]), _.values);
- * // => [['barney', 36], ['barney', 26], ['fred', 40], ['fred', 30]]
+ * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
*/
- function sortByOrder(collection, props, orders, guard) {
+ function sortByOrder(collection, iteratees, orders, guard) {
if (collection == null) {
return [];
}
- if (guard && isIterateeCall(props, orders, guard)) {
+ if (guard && isIterateeCall(iteratees, orders, guard)) {
orders = null;
}
- if (!isArray(props)) {
- props = props == null ? [] : [props];
+ if (!isArray(iteratees)) {
+ iteratees = iteratees == null ? [] : [iteratees];
}
if (!isArray(orders)) {
orders = orders == null ? [] : [orders];
}
- return baseSortByOrder(collection, props, orders);
+ return baseSortByOrder(collection, iteratees, orders);
}
/**
@@ -7171,7 +7370,8 @@
return function() {
if (--n > 0) {
result = func.apply(this, arguments);
- } else {
+ }
+ if (n <= 1) {
func = null;
}
return result;
@@ -7186,7 +7386,7 @@
* The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
* may be used as a placeholder for partially applied arguments.
*
- * **Note:** Unlike native `Function#bind` this method does not set the `length`
+ * **Note:** Unlike native `Function#bind` this method does not set the "length"
* property of bound functions.
*
* @static
@@ -7228,7 +7428,7 @@
* of method names. If no method names are provided all enumerable function
* properties, own and inherited, of `object` are bound.
*
- * **Note:** This method does not set the `length` property of bound functions.
+ * **Note:** This method does not set the "length" property of bound functions.
*
* @static
* @memberOf _
@@ -7269,7 +7469,7 @@
*
* This method differs from `_.bind` by allowing bound functions to reference
* methods that may be redefined or don't yet exist.
- * See [Peter Michaux's article](http://michaux.ca/articles/lazy-function-definition-pattern)
+ * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
* for more details.
*
* The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
@@ -7326,7 +7526,7 @@
* The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
* may be used as a placeholder for provided arguments.
*
- * **Note:** This method does not set the `length` property of curried functions.
+ * **Note:** This method does not set the "length" property of curried functions.
*
* @static
* @memberOf _
@@ -7365,7 +7565,7 @@
* The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for provided arguments.
*
- * **Note:** This method does not set the `length` property of curried functions.
+ * **Note:** This method does not set the "length" property of curried functions.
*
* @static
* @memberOf _
@@ -7777,7 +7977,7 @@
* // `initialize` invokes `createApplication` once
*/
function once(func) {
- return before(func, 2);
+ return before(2, func);
}
/**
@@ -7788,7 +7988,7 @@
* The `_.partial.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for partially applied arguments.
*
- * **Note:** This method does not set the `length` property of partially
+ * **Note:** This method does not set the "length" property of partially
* applied functions.
*
* @static
@@ -7821,7 +8021,7 @@
* The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for partially applied arguments.
*
- * **Note:** This method does not set the `length` property of partially
+ * **Note:** This method does not set the "length" property of partially
* applied functions.
*
* @static
@@ -7905,7 +8105,7 @@
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
- start = nativeMax(typeof start == 'undefined' ? (func.length - 1) : (+start || 0), 0);
+ start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
return function() {
var args = arguments,
index = -1,
@@ -8309,7 +8509,7 @@
if (value == null) {
return true;
}
- var length = value.length;
+ var length = getLength(value);
if (isLength(length) && (isArray(value) || isString(value) || isArguments(value) ||
(isObjectLike(value) && isFunction(value.splice)))) {
return !length;
@@ -8335,7 +8535,7 @@
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize comparing values.
+ * @param {Function} [customizer] The function to customize value comparisons.
* @param {*} [thisArg] The `this` binding of `customizer`.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
@@ -8366,7 +8566,7 @@
return value === other;
}
var result = customizer ? customizer(value, other) : undefined;
- return typeof result == 'undefined' ? baseIsEqual(value, other, customizer) : !!result;
+ return result === undefined ? baseIsEqual(value, other, customizer) : !!result;
}
/**
@@ -8488,7 +8688,7 @@
* @category Lang
* @param {Object} object The object to inspect.
* @param {Object} source The object of property values to match.
- * @param {Function} [customizer] The function to customize comparing values.
+ * @param {Function} [customizer] The function to customize value comparisons.
* @param {*} [thisArg] The `this` binding of `customizer`.
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
* @example
@@ -8521,12 +8721,13 @@
return false;
}
customizer = typeof customizer == 'function' && bindCallback(customizer, thisArg, 3);
+ object = toObject(object);
if (!customizer && length == 1) {
var key = props[0],
value = source[key];
if (isStrictComparable(value)) {
- return value === object[key] && (typeof value != 'undefined' || (key in toObject(object)));
+ return value === object[key] && (value !== undefined || (key in object));
}
}
var values = Array(length),
@@ -8536,7 +8737,7 @@
value = values[length] = source[props[length]];
strictCompareFlags[length] = isStrictComparable(value);
}
- return baseIsMatch(toObject(object), props, values, strictCompareFlags, customizer);
+ return baseIsMatch(object, props, values, strictCompareFlags, customizer);
}
/**
@@ -8591,9 +8792,9 @@
return false;
}
if (objToString.call(value) == funcTag) {
- return reNative.test(fnToString.call(value));
+ return reIsNative.test(fnToString.call(value));
}
- return isObjectLike(value) && reHostCtor.test(value);
+ return isObjectLike(value) && reIsHostCtor.test(value);
}
/**
@@ -8761,7 +8962,7 @@
* // => false
*/
function isUndefined(value) {
- return typeof value == 'undefined';
+ return value === undefined;
}
/**
@@ -8780,7 +8981,7 @@
* // => [2, 3]
*/
function toArray(value) {
- var length = value ? value.length : 0;
+ var length = value ? getLength(value) : 0;
if (!isLength(length)) {
return values(value);
}
@@ -8826,13 +9027,17 @@
* The `customizer` is bound to `thisArg` and invoked with five arguments:
* (objectValue, sourceValue, key, object, source).
*
+ * **Note:** This method mutates `object` and is based on
+ * [`Object.assign`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign).
+ *
+ *
* @static
* @memberOf _
* @alias extend
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
- * @param {Function} [customizer] The function to customize assigning values.
+ * @param {Function} [customizer] The function to customize assigned values.
* @param {*} [thisArg] The `this` binding of `customizer`.
* @returns {Object} Returns `object`.
* @example
@@ -8842,13 +9047,17 @@
*
* // using a customizer callback
* var defaults = _.partialRight(_.assign, function(value, other) {
- * return typeof value == 'undefined' ? other : value;
+ * return _.isUndefined(value) ? other : value;
* });
*
* defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
* // => { 'user': 'barney', 'age': 36 }
*/
- var assign = createAssigner(baseAssign);
+ var assign = createAssigner(function(object, source, customizer) {
+ return customizer
+ ? assignWith(object, source, customizer)
+ : baseAssign(object, source);
+ });
/**
* Creates an object that inherits from the given `prototype` object. If a
@@ -8889,7 +9098,7 @@
if (guard && isIterateeCall(prototype, properties, guard)) {
properties = null;
}
- return properties ? baseCopy(properties, result, keys(properties)) : result;
+ return properties ? baseAssign(result, properties) : result;
}
/**
@@ -8897,6 +9106,8 @@
* object for all destination properties that resolve to `undefined`. Once a
* property is set, additional values of the same property are ignored.
*
+ * **Note:** This method mutates `object`.
+ *
* @static
* @memberOf _
* @category Object
@@ -9020,7 +9231,7 @@
/**
* Iterates over own and inherited enumerable properties of an object invoking
* `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked
- * with three arguments: (value, key, object). Iterator functions may exit
+ * with three arguments: (value, key, object). Iteratee functions may exit
* iteration early by explicitly returning `false`.
*
* @static
@@ -9076,7 +9287,7 @@
/**
* Iterates over own enumerable properties of an object invoking `iteratee`
* for each property. The `iteratee` is bound to `thisArg` and invoked with
- * three arguments: (value, key, object). Iterator functions may exit iteration
+ * three arguments: (value, key, object). Iteratee functions may exit iteration
* early by explicitly returning `false`.
*
* @static
@@ -9149,24 +9360,68 @@
}
/**
- * Checks if `key` exists as a direct property of `object` instead of an
- * inherited property.
+ * Gets the property value of `path` on `object`. If the resolved value is
+ * `undefined` the `defaultValue` is used in its place.
*
* @static
* @memberOf _
* @category Object
- * @param {Object} object The object to inspect.
- * @param {string} key The key to check.
- * @returns {boolean} Returns `true` if `key` is a direct property, else `false`.
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.
+ * @returns {*} Returns the resolved value.
* @example
*
- * var object = { 'a': 1, 'b': 2, 'c': 3 };
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
- * _.has(object, 'b');
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+ function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, toPath(path), path + '');
+ return result === undefined ? defaultValue : result;
+ }
+
+ /**
+ * Checks if `path` is a direct property.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` is a direct property, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': { 'c': 3 } } };
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b.c');
+ * // => true
+ *
+ * _.has(object, ['a', 'b', 'c']);
* // => true
*/
- function has(object, key) {
- return object ? hasOwnProperty.call(object, key) : false;
+ function has(object, path) {
+ if (object == null) {
+ return false;
+ }
+ var result = hasOwnProperty.call(object, path);
+ if (!result && !isKey(path)) {
+ path = toPath(path);
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ path = last(path);
+ result = object != null && hasOwnProperty.call(object, path);
+ }
+ return result;
}
/**
@@ -9229,7 +9484,7 @@
* @static
* @memberOf _
* @category Object
- * @param {Object} object The object to inspect.
+ * @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
@@ -9252,7 +9507,7 @@
length = object.length;
}
if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
- (typeof object != 'function' && (length && isLength(length)))) {
+ (typeof object != 'function' && isLength(length))) {
return shimKeys(object);
}
return isObject(object) ? nativeKeys(object) : [];
@@ -9266,7 +9521,7 @@
* @static
* @memberOf _
* @category Object
- * @param {Object} object The object to inspect.
+ * @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
@@ -9374,7 +9629,7 @@
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
- * @param {Function} [customizer] The function to customize merging properties.
+ * @param {Function} [customizer] The function to customize assigned values.
* @param {*} [thisArg] The `this` binding of `customizer`.
* @returns {Object} Returns `object`.
* @example
@@ -9459,7 +9714,7 @@
* @static
* @memberOf _
* @category Object
- * @param {Object} object The object to inspect.
+ * @param {Object} object The object to query.
* @returns {Array} Returns the new array of key-value pairs.
* @example
*
@@ -9515,41 +9770,93 @@
});
/**
- * Resolves the value of property `key` on `object`. If the value of `key` is
- * a function it is invoked with the `this` binding of `object` and its result
- * is returned, else the property value is returned. If the property value is
- * `undefined` the `defaultValue` is used in its place.
+ * This method is like `_.get` except that if the resolved value is a function
+ * it is invoked with the `this` binding of its parent object and its result
+ * is returned.
*
* @static
* @memberOf _
* @category Object
* @param {Object} object The object to query.
- * @param {string} key The key of the property to resolve.
- * @param {*} [defaultValue] The value returned if the property value
- * resolves to `undefined`.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.
* @returns {*} Returns the resolved value.
* @example
*
- * var object = { 'user': 'fred', 'age': _.constant(40) };
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
*
- * _.result(object, 'user');
- * // => 'fred'
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
*
- * _.result(object, 'age');
- * // => 40
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
*
- * _.result(object, 'status', 'busy');
- * // => 'busy'
+ * _.result(object, 'a.b.c', 'default');
+ * // => 'default'
*
- * _.result(object, 'status', _.constant('busy'));
- * // => 'busy'
+ * _.result(object, 'a.b.c', _.constant('default'));
+ * // => 'default'
*/
- function result(object, key, defaultValue) {
- var value = object == null ? undefined : object[key];
- if (typeof value == 'undefined') {
- value = defaultValue;
+ function result(object, path, defaultValue) {
+ var result = object == null ? undefined : object[path];
+ if (result === undefined) {
+ if (object != null && !isKey(path, object)) {
+ path = toPath(path);
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ result = object == null ? undefined : object[last(path)];
+ }
+ result = result === undefined ? defaultValue : result;
}
- return isFunction(value) ? value.call(object) : value;
+ return isFunction(result) ? result.call(object) : result;
+ }
+
+ /**
+ * Sets the property value of `path` on `object`. If a portion of `path`
+ * does not exist it is created.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to augment.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.set(object, 'a[0].b.c', 4);
+ * console.log(object.a[0].b.c);
+ * // => 4
+ *
+ * _.set(object, 'x[0].y.z', 5);
+ * console.log(object.x[0].y.z);
+ * // => 5
+ */
+ function set(object, path, value) {
+ if (object == null) {
+ return object;
+ }
+ var pathKey = (path + '');
+ path = (object[pathKey] != null || isKey(path, object)) ? [pathKey] : toPath(path);
+
+ var index = -1,
+ length = path.length,
+ endIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = path[index];
+ if (isObject(nested)) {
+ if (index == endIndex) {
+ nested[key] = value;
+ } else if (nested[key] == null) {
+ nested[key] = isIndex(path[index + 1]) ? [] : {};
+ }
+ }
+ nested = nested[key];
+ }
+ return object;
}
/**
@@ -9557,7 +9864,7 @@
* `accumulator` object which is the result of running each of its own enumerable
* properties through `iteratee`, with each invocation potentially mutating
* the `accumulator` object. The `iteratee` is bound to `thisArg` and invoked
- * with four arguments: (accumulator, value, key, object). Iterator functions
+ * with four arguments: (accumulator, value, key, object). Iteratee functions
* may exit iteration early by explicitly returning `false`.
*
* @static
@@ -9700,7 +10007,7 @@
} else {
end = +end || 0;
}
- return value >= start && value < end;
+ return value >= nativeMin(start, end) && value < nativeMax(start, end);
}
/**
@@ -9825,7 +10132,7 @@
*/
function deburr(string) {
string = baseToString(string);
- return string && string.replace(reLatin1, deburrLetter).replace(reComboMarks, '');
+ return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
}
/**
@@ -9854,7 +10161,7 @@
target = (target + '');
var length = string.length;
- position = typeof position == 'undefined'
+ position = position === undefined
? length
: nativeMin(position < 0 ? 0 : (+position || 0), length);
@@ -9876,9 +10183,10 @@
* (under "semi-related fun fact") for more details.
*
* Backticks are escaped because in Internet Explorer < 9, they can break out
- * of attribute values or HTML comments. See [#102](https://html5sec.org/#102),
- * [#108](https://html5sec.org/#108), and [#133](https://html5sec.org/#133) of
- * the [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
+ * of attribute values or HTML comments. See [#59](https://html5sec.org/#59),
+ * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
+ * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/)
+ * for more details.
*
* When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping)
* to reduce XSS vectors.
@@ -10072,7 +10380,7 @@
radix = +radix;
}
string = trim(string);
- return nativeParseInt(string, radix || (reHexPrefix.test(string) ? 16 : 10));
+ return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
};
}
@@ -10297,9 +10605,9 @@
options = otherOptions = null;
}
string = baseToString(string);
- options = baseAssign(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
+ options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
- var imports = baseAssign(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
+ var imports = assignWith(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
importsKeys = keys(imports),
importsValues = baseValues(imports, importsKeys);
@@ -10703,9 +11011,7 @@
if (guard && isIterateeCall(func, thisArg, guard)) {
thisArg = null;
}
- return isObjectLike(func)
- ? matches(func)
- : baseCallback(func, thisArg);
+ return baseCallback(func, thisArg);
}
/**
@@ -10779,7 +11085,7 @@
}
/**
- * Creates a function which compares the property value of `key` on a given
+ * Creates a function which compares the property value of `path` on a given
* object to `value`.
*
* **Note:** This method supports comparing arrays, booleans, `Date` objects,
@@ -10789,7 +11095,7 @@
* @static
* @memberOf _
* @category Utility
- * @param {string} key The key of the property to get.
+ * @param {Array|string} path The path of the property to get.
* @param {*} value The value to compare.
* @returns {Function} Returns the new function.
* @example
@@ -10802,22 +11108,75 @@
* _.find(users, _.matchesProperty('user', 'fred'));
* // => { 'user': 'fred' }
*/
- function matchesProperty(key, value) {
- return baseMatchesProperty(key + '', baseClone(value, true));
+ function matchesProperty(path, value) {
+ return baseMatchesProperty(path, baseClone(value, true));
}
+ /**
+ * Creates a function which invokes the method at `path` on a given object.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {Array|string} path The path of the method to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': { 'c': _.constant(2) } } },
+ * { 'a': { 'b': { 'c': _.constant(1) } } }
+ * ];
+ *
+ * _.map(objects, _.method('a.b.c'));
+ * // => [2, 1]
+ *
+ * _.invoke(_.sortBy(objects, _.method(['a', 'b', 'c'])), 'a.b.c');
+ * // => [1, 2]
+ */
+ var method = restParam(function(path, args) {
+ return function(object) {
+ return invokePath(object, path, args);
+ }
+ });
+
+ /**
+ * The opposite of `_.method`; this method creates a function which invokes
+ * the method at a given path on `object`.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var array = _.times(3, _.constant),
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.methodOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
+ * // => [2, 0]
+ */
+ var methodOf = restParam(function(object, args) {
+ return function(path) {
+ return invokePath(object, path, args);
+ };
+ });
+
/**
* Adds all own enumerable function properties of a source object to the
* destination object. If `object` is a function then methods are added to
* its prototype as well.
*
- * **Note:** Use `_.runInContext` to create a pristine `lodash` function
- * for mixins to avoid conflicts caused by modifying the original.
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+ * avoid conflicts caused by modifying the original.
*
* @static
* @memberOf _
* @category Utility
- * @param {Function|Object} [object=this] object The destination object.
+ * @param {Function|Object} [object=lodash] The destination object.
* @param {Object} source The object of functions to add.
* @param {Object} [options] The options object.
* @param {boolean} [options.chain=true] Specify whether the functions added
@@ -10934,61 +11293,61 @@
}
/**
- * Creates a function which returns the property value of `key` on a given object.
+ * Creates a function which returns the property value at `path` on a
+ * given object.
*
* @static
* @memberOf _
* @category Utility
- * @param {string} key The key of the property to get.
+ * @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new function.
* @example
*
- * var users = [
- * { 'user': 'fred' },
- * { 'user': 'barney' }
+ * var objects = [
+ * { 'a': { 'b': { 'c': 2 } } },
+ * { 'a': { 'b': { 'c': 1 } } }
* ];
*
- * var getName = _.property('user');
+ * _.map(objects, _.property('a.b.c'));
+ * // => [2, 1]
*
- * _.map(users, getName);
- * // => ['fred', 'barney']
- *
- * _.pluck(_.sortBy(users, getName), 'user');
- * // => ['barney', 'fred']
+ * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
+ * // => [1, 2]
*/
- function property(key) {
- return baseProperty(key + '');
+ function property(path) {
+ return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
}
/**
* The opposite of `_.property`; this method creates a function which returns
- * the property value of a given key on `object`.
+ * the property value at a given path on `object`.
*
* @static
* @memberOf _
* @category Utility
- * @param {Object} object The object to inspect.
+ * @param {Object} object The object to query.
* @returns {Function} Returns the new function.
* @example
*
- * var object = { 'a': 3, 'b': 1, 'c': 2 };
+ * var array = [0, 1, 2],
+ * object = { 'a': array, 'b': array, 'c': array };
*
- * _.map(['a', 'c'], _.propertyOf(object));
- * // => [3, 2]
+ * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
+ * // => [2, 0]
*
- * _.sortBy(['a', 'b', 'c'], _.propertyOf(object));
- * // => ['b', 'c', 'a']
+ * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
+ * // => [2, 0]
*/
function propertyOf(object) {
- return function(key) {
- return object == null ? undefined : object[key];
+ return function(path) {
+ return baseGet(object, toPath(path), path + '');
};
}
/**
* Creates an array of numbers (positive and/or negative) progressing from
* `start` up to, but not including, `end`. If `end` is not specified it is
- * set to `start` with `start` then set to `0`. If `start` is less than `end`
+ * set to `start` with `start` then set to `0`. If `end` is less than `start`
* a zero-length range is created unless a negative `step` is specified.
*
* @static
@@ -11064,7 +11423,7 @@
* _.times(3, function(n) {
* mage.castSpell(n);
* });
- * // => invokes `mage.castSpell(n)` three times with `n` of `0`, `1`, and `2` respectively
+ * // => invokes `mage.castSpell(n)` three times with `n` of `0`, `1`, and `2`
*
* _.times(3, function(n) {
* this.cast(n);
@@ -11072,7 +11431,7 @@
* // => also invokes `mage.castSpell(n)` three times
*/
function times(n, iteratee, thisArg) {
- n = +n;
+ n = floor(n);
// Exit early to avoid a JSC JIT bug in Safari 8
// where `Array(0)` is treated as `Array(1)`.
@@ -11131,7 +11490,7 @@
* // => 10
*/
function add(augend, addend) {
- return augend + addend;
+ return (+augend || 0) + (+addend || 0);
}
/**
@@ -11357,6 +11716,8 @@
lodash.matchesProperty = matchesProperty;
lodash.memoize = memoize;
lodash.merge = merge;
+ lodash.method = method;
+ lodash.methodOf = methodOf;
lodash.mixin = mixin;
lodash.negate = negate;
lodash.omit = omit;
@@ -11377,6 +11738,7 @@
lodash.remove = remove;
lodash.rest = rest;
lodash.restParam = restParam;
+ lodash.set = set;
lodash.shuffle = shuffle;
lodash.slice = slice;
lodash.sortBy = sortBy;
@@ -11445,6 +11807,7 @@
lodash.findLastKey = findLastKey;
lodash.findWhere = findWhere;
lodash.first = first;
+ lodash.get = get;
lodash.has = has;
lodash.identity = identity;
lodash.includes = includes;
@@ -11633,7 +11996,7 @@
// Add `LazyWrapper` methods for `_.pluck` and `_.where`.
arrayEach(['pluck', 'where'], function(methodName, index) {
var operationName = index ? 'filter' : 'map',
- createCallback = index ? baseMatches : baseProperty;
+ createCallback = index ? baseMatches : property;
LazyWrapper.prototype[methodName] = function(value) {
return this[operationName](createCallback(value));
@@ -11655,7 +12018,7 @@
start = start == null ? 0 : (+start || 0);
var result = start < 0 ? this.takeRight(-start) : this.drop(start);
- if (typeof end != 'undefined') {
+ if (end !== undefined) {
end = (+end || 0);
result = end < 0 ? result.dropRight(-end) : result.take(end - start);
}
@@ -11686,7 +12049,7 @@
useLazy = isLazy || isArray(value);
if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
- // avoid lazy use if the iteratee has a `length` other than `1`
+ // avoid lazy use if the iteratee has a "length" value other than `1`
isLazy = useLazy = false;
}
var onlyLazy = isLazy && !isHybrid;
diff --git a/lodash.min.js b/lodash.min.js
index 0f3a88ca1..46b088303 100644
--- a/lodash.min.js
+++ b/lodash.min.js
@@ -1,89 +1,140 @@
/**
* @license
- * lodash 3.6.0 (Custom Build) lodash.com/license | Underscore.js 1.8.2 underscorejs.org/LICENSE
+ * lodash 3.7.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* Build: `lodash modern -o ./lodash.js`
*/
-;(function(){function n(n,t){if(n!==t){var r=n===n,e=t===t;if(n>t||!r||typeof n=="undefined"&&e)return 1;if(n=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n)}function v(n,t){for(var r=-1,e=n.length,u=-1,o=[];++re&&(e=u)}return e}function Yt(n,t){for(var r=-1,e=n.length;++ri(t,a,0)&&u.push(a);return u}function er(n,t){var r=true;return Ao(n,function(n,e,u){return r=!!t(n,e,u)}),r}function ur(n,t){var r=[];return Ao(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function or(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function ir(n,t,r){for(var e=-1,u=n.length,o=-1,i=[];++et&&(t=-t>u?0:u+t),r=typeof r=="undefined"||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=wu(u);++eu(a,p,0)&&((t||f)&&a.push(p),c.push(l))}return c}function Ir(n,t){for(var r=-1,e=t.length,u=wu(e);++r>>1,i=n[o];(r?i<=t:ir||null==e)return e;
-var u=t[r-2],o=t[r-1],i=t[3];for(3arguments.length;return typeof e=="function"&&typeof o=="undefined"&&si(r)?n(r,e,u,i):wr(r,le(e,o,4),u,i,t)}}function te(n,t,r,e,u,o,i,f,a,c){function l(){for(var b=arguments.length,j=b,k=wu(b);j--;)k[j]=arguments[j];
-if(e&&(k=Ur(k,e,u)),o&&(k=Fr(k,o,i)),_||y){var j=l.placeholder,E=v(k,j),b=b-E.length;if(bu)||i===e&&i===o)&&(u=i,o=n)
-}),o}function le(n,t,r){var e=Wt.callback||_u,e=e===_u?Qt:e;return r?e(n,t,r):e}function pe(n,t,e){var u=Wt.indexOf||Ce,u=u===Ce?r:u;return n?u(n,t,e):u}function se(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&Nu.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function he(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=Eu),new n}function _e(n,t,r){var e=n.constructor;switch(t){case J:return Tr(n);case D:case P:return new e(+n);case X:case H:case Q:case nt:case tt:case rt:case et:case ut:case ot:return t=n.buffer,new e(r?Tr(t):t,n.byteOffset,n.length);
-case V:case G:return new e(n);case Z:var u=new e(n.source,dt.exec(n));u.lastIndex=n.lastIndex}return u}function ve(n,t){return n=+n,t=null==t?yo:t,-1t?0:t)):[]}function Oe(n,t,r){var e=n?n.length:0;return e?((r?ge(n,t,r):null==t)&&(t=1),t=e-(+t||0),br(n,0,0>t?0:t)):[]}function Re(n){return n?n[0]:w}function Ce(n,t,e){var u=n?n.length:0;
-if(!u)return-1;if(typeof e=="number")e=0>e?oo(u+e,0):e;else if(e)return e=Cr(n,t),n=n[e],(t===t?t===n:n!==n)?e:-1;return r(n,t,e||0)}function Se(n){var t=n?n.length:0;return t?n[t-1]:w}function We(n){return Ie(n,1)}function Te(n,t,e,u){if(!n||!n.length)return[];null!=t&&typeof t!="boolean"&&(u=e,e=ge(n,t,u)?null:t,t=false);var o=le();if((o!==Qt||null!=e)&&(e=o(e,u,3)),t&&pe()==r){t=e;var i;e=-1,u=n.length;for(var o=-1,f=[];++e>>0,e=wu(r);++tr?oo(u+r,0):r||0,typeof n=="string"||!si(n)&&ru(n)?rt?0:+t||0,n.length),n)}function Pe(n){n=je(n);for(var t=-1,r=n.length,e=wu(r);++t=r||r>t?(f&&qu(f),r=s,f=p=s=w,r&&(h=Qo(),a=n.apply(l,i),p||f||(i=l=null))):p=Ju(e,r)}function u(){p&&qu(p),f=p=s=w,(v||_!==t)&&(h=Qo(),a=n.apply(l,i),p||f||(i=l=null))
-}function o(){if(i=arguments,c=Qo(),l=this,s=v&&(p||!g),false===_)var r=g&&!p;else{f||g||(h=c);var o=_-(c-h),y=0>=o||o>_;y?(f&&(f=qu(f)),h=c,a=n.apply(l,i)):f||(f=Ju(u,o))}return y&&p?p=qu(p):p||t===_||(p=Ju(e,t)),r&&(y=true,a=n.apply(l,i)),!y||p||f||(i=l=null),a}var i,f,a,c,l,p,s,h=0,_=false,v=true;if(typeof n!="function")throw new Ru(L);if(t=0>t?0:+t||0,true===r)var g=true,v=false;else He(r)&&(g=r.leading,_="maxWait"in r&&oo(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);return o.cancel=function(){p&&qu(p),f&&qu(f),f=p=s=w
-},o}function Ye(n,t){function r(){var e=arguments,u=r.cache,o=t?t.apply(this,e):e[0];return u.has(o)?u.get(o):(e=n.apply(this,e),u.set(o,e),e)}if(typeof n!="function"||t&&typeof t!="function")throw new Ru(L);return r.cache=new Ye.Cache,r}function Ze(n,t){if(typeof n!="function")throw new Ru(L);return t=oo(typeof t=="undefined"?n.length-1:+t||0,0),function(){for(var r=arguments,e=-1,u=oo(r.length-t,0),o=wu(u);++et||!n||!eo(t))return r;do t%2&&(r+=n),t=Ku(t/2),n+=n;while(t);return r}function su(n,t,r){var e=n;return(n=u(n))?(r?ge(e,t,r):null==t)?n.slice(g(n),y(n)+1):(t+="",n.slice(i(n,t),f(n,t)+1)):n}function hu(n,t,r){return r&&ge(n,t,r)&&(t=null),n=u(n),n.match(t||Et)||[]
-}function _u(n,t,r){return r&&ge(n,t,r)&&(t=null),h(n)?yu(n):Qt(n,t)}function vu(n){return function(){return n}}function gu(n){return n}function yu(n){return vr(nr(n,true))}function du(n,t,r){if(null==r){var e=He(t),u=e&&ji(t);((u=u&&u.length&&lr(t,u))?u.length:e)||(u=false,r=t,t=n,n=this)}u||(u=lr(t,ji(t)));var o=true,e=-1,i=_i(n),f=u.length;false===r?o=false:He(r)&&"chain"in r&&(o=r.chain);for(;++e>>1,go=no?no.BYTES_PER_ELEMENT:0,yo=ju.pow(2,53)-1,mo=Qu&&new Qu,wo={},bo=Wt.support={};!function(n){bo.funcDecomp=/\bthis\b/.test(function(){return this}),bo.funcNames=typeof Au.name=="string";try{bo.dom=11===Tu.createDocumentFragment().nodeType
-}catch(t){bo.dom=false}try{bo.nonEnumArgs=!Zu.call(arguments,1)}catch(r){bo.nonEnumArgs=true}}(0,0),Wt.templateSettings={escape:ht,evaluate:_t,interpolate:vt,variable:"",imports:{_:Wt}};var xo=function(){function n(){}return function(t){if(He(t)){n.prototype=t;var r=new n;n.prototype=null}return r||_.Object()}}(),Ao=Lr(ar),jo=Lr(cr,true),ko=Br(),Eo=Br(true),Io=mo?function(n,t){return mo.set(n,t),n}:gu;Du||(Tr=Mu&&Hu?function(n){var t=n.byteLength,r=no?Ku(t/go):0,e=r*go,u=new Mu(t);if(r){var o=new no(u,0,r);
-o.set(new no(n,0,r))}return t!=e&&(o=new Hu(u,e),o.set(new Hu(n,e))),u}:vu(null));var Oo=ro&&Gu?function(n){return new $t(n)}:vu(null),Ro=mo?function(n){return mo.get(n)}:mu,Co=function(){return bo.funcNames?"constant"==vu.name?dr("name"):function(n){for(var t=n.name,r=wo[t],e=r?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==n)return u.name}return t}:vu("")}(),So=function(){var n=0,t=0;return function(r,e){var u=Qo(),o=U-(u-t);if(t=u,0=T)return r}else n=0;return Io(r,e)}}(),Wo=Ze(function(n,t){return si(n)||Ge(n)?rr(n,ir(t,false,true)):[]
-}),To=Vr(),Uo=Vr(true),Fo=Ze(function(t,r){t||(t=[]),r=ir(r);var e=r.length,u=Xt(t,r);for(r.sort(n);e--;){var o=parseFloat(r[e]);if(o!=i&&ve(o)){var i=o;Xu.call(t,o,1)}}return u}),No=ue(),$o=ue(true),Lo=Ze(function(n){return Er(ir(n,false,true))}),Bo=Ze(function(n,t){return si(n)||Ge(n)?rr(n,t):[]}),zo=Ze(Ue),Mo=Ze(function(n,t){return de(n?n.length:0)&&(n=je(n)),Xt(n,ir(t))}),Do=Nr(function(n,t,r){Nu.call(n,r)?++n[r]:n[r]=1}),Po=Kr(Ao),qo=Kr(jo,true),Ko=Gr(zt,Ao),Vo=Gr(function(n,t){for(var r=n.length;r--&&false!==t(n[r],r,n););return n
-},jo),Yo=Nr(function(n,t,r){Nu.call(n,r)?n[r].push(t):n[r]=[t]}),Zo=Nr(function(n,t,r){n[r]=t}),Go=Ze(function(n,t,r){var e=-1,u=typeof t=="function",o=n?n.length:0,i=de(o)?wu(o):[];return Ao(n,function(n){var o=u?t:null!=n&&n[t];i[++e]=o?o.apply(n,r):w}),i}),Jo=Nr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Xo=ne(function(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u--n?t.apply(this,arguments):void 0
-}},Wt.ary=function(n,t,r){return r&&ge(n,t,r)&&(t=null),t=n&&null==t?n.length:oo(+t||0,0),oe(n,R,null,null,null,null,t)},Wt.assign=gi,Wt.at=Mo,Wt.before=Ke,Wt.bind=ni,Wt.bindAll=ti,Wt.bindKey=ri,Wt.callback=_u,Wt.chain=Ne,Wt.chunk=function(n,t,r){t=(r?ge(n,t,r):null==t)?1:oo(+t||1,1),r=0;for(var e=n?n.length:0,u=-1,o=wu(Pu(e/t));rr&&(r=-r>u?0:u+r),e=typeof e=="undefined"||e>u?u:+e||0,0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;r(p?Lt(p,f):o(l,f,0))){for(t=e;--t;){var s=u[t];if(0>(s?Lt(s,f):o(n[t],f,0)))continue n}p&&p.push(f),l.push(f)}return l},Wt.invert=function(n,t,r){r&&ge(n,t,r)&&(t=null),r=-1;for(var e=ji(n),u=e.length,o={};++rt?0:t)):[]},Wt.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?ge(n,t,r):null==t)&&(t=1),t=e-(+t||0),br(n,0>t?0:t)):[]
-},Wt.takeRightWhile=function(n,t,r){return n&&n.length?Or(n,le(t,r,3),false,true):[]},Wt.takeWhile=function(n,t,r){return n&&n.length?Or(n,le(t,r,3)):[]},Wt.tap=function(n,t,r){return t.call(r,n),n},Wt.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Ru(L);return false===r?e=false:He(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),St.leading=e,St.maxWait=+t,St.trailing=u,Ve(n,t,St)},Wt.thru=$e,Wt.times=function(n,t,r){if(n=+n,1>n||!eo(n))return[];var e=-1,u=wu(io(n,ho));
-for(t=Wr(t,r,1);++er?0:+r||0,e),r-=t.length,0<=r&&n.indexOf(t,r)==r},Wt.escape=function(n){return(n=u(n))&&st.test(n)?n.replace(lt,l):n},Wt.escapeRegExp=cu,Wt.every=Le,Wt.find=Po,Wt.findIndex=To,Wt.findKey=di,Wt.findLast=qo,Wt.findLastIndex=Uo,Wt.findLastKey=mi,Wt.findWhere=function(n,t){return Po(n,vr(t))},Wt.first=Re,Wt.has=function(n,t){return n?Nu.call(n,t):false
-},Wt.identity=gu,Wt.includes=ze,Wt.indexOf=Ce,Wt.inRange=function(n,t,r){return t=+t||0,"undefined"===typeof r?(r=t,t=0):r=+r||0,n>=t&&nr?oo(e+r,0):io(r||0,e-1))+1;else if(r)return u=Cr(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;if(t!==t)return s(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Wt.max=Fi,Wt.min=Ni,Wt.noConflict=function(){return _._=Bu,this},Wt.noop=mu,Wt.now=Qo,Wt.pad=function(n,t,r){n=u(n),t=+t;var e=n.length;return er?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Wt.sum=function(n,t,r){r&&ge(n,t,r)&&(t=null);var e=le(),u=null==t;if(e===Qt&&u||(u=false,t=e(t,r,3)),u){for(n=si(n)?n:je(n),t=n.length,r=0;t--;)r+=+n[t]||0;n=r}else n=kr(n,t);return n},Wt.template=function(n,t,r){var e=Wt.templateSettings;r&&ge(n,t,r)&&(t=r=null),n=u(n),t=Jt(Jt({},r||t),e,Gt),r=Jt(Jt({},t.imports),e.imports,Gt);
-var o,i,f=ji(r),a=Ir(r,f),c=0;r=t.interpolate||xt;var l="__p+='";r=Iu((t.escape||xt).source+"|"+r.source+"|"+(r===vt?yt:xt).source+"|"+(t.evaluate||xt).source+"|$","g");var s="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,f,a){return e||(e=u),l+=n.slice(c,a).replace(kt,p),r&&(o=true,l+="'+__e("+r+")+'"),f&&(i=true,l+="';"+f+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),c=a+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(i?l.replace(it,""):l).replace(ft,"$1").replace(at,"$1;"),l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",t=Ui(function(){return Au(f,s+"return "+l).apply(w,a)
-}),t.source=l,Xe(t))throw t;return t},Wt.trim=su,Wt.trimLeft=function(n,t,r){var e=n;return(n=u(n))?n.slice((r?ge(e,t,r):null==t)?g(n):i(n,t+"")):n},Wt.trimRight=function(n,t,r){var e=n;return(n=u(n))?(r?ge(e,t,r):null==t)?n.slice(0,y(n)+1):n.slice(0,f(n,t+"")+1):n},Wt.trunc=function(n,t,r){r&&ge(n,t,r)&&(t=null);var e=S;if(r=W,null!=t)if(He(t)){var o="separator"in t?t.separator:o,e="length"in t?+t.length||0:e;r="omission"in t?u(t.omission):r}else e=+t||0;if(n=u(n),e>=n.length)return n;if(e-=r.length,1>e)return r;
-if(t=n.slice(0,e),null==o)return t+r;if(tu(o)){if(n.slice(e).search(o)){var i,f=n.slice(0,e);for(o.global||(o=Iu(o.source,(dt.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(f);)i=n.index;t=t.slice(0,null==i?e:i)}}else n.indexOf(o,e)!=e&&(o=t.lastIndexOf(o),-1u.__dir__?"Right":"")}),u},Ft.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()},Ft.prototype[n+"RightWhile"]=function(n,t){return this.reverse()[r](n,t).reverse()}}),zt(["first","last"],function(n,t){var r="take"+(t?"Right":"");
-Ft.prototype[n]=function(){return this[r](1).value()[0]}}),zt(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");Ft.prototype[n]=function(){return this[r](1)}}),zt(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?vr:dr;Ft.prototype[n]=function(n){return this[r](e(n))}}),Ft.prototype.compact=function(){return this.filter(gu)},Ft.prototype.reject=function(n,t){return n=le(n,t,1),this.filter(function(t){return!n(t)})},Ft.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=0>n?this.takeRight(-n):this.drop(n);
-return typeof t!="undefined"&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r},Ft.prototype.toArray=function(){return this.drop(0)},ar(Ft.prototype,function(n,t){var r=Wt[t];if(r){var e=/^(?:filter|map|reject)|While$/.test(t),u=/^(?:first|last)$/.test(t);Wt.prototype[t]=function(){function t(n){return n=[n],Yu.apply(n,o),r.apply(Wt,n)}var o=arguments,i=this.__chain__,f=this.__wrapped__,a=!!this.__actions__.length,c=f instanceof Ft,l=o[0],p=c||si(f);return p&&e&&typeof l=="function"&&1!=l.length&&(c=p=false),c=c&&!a,u&&!i?c?n.call(f):r.call(Wt,this.value()):p?(f=n.apply(c?f:new Ft(this),o),u||!a&&!f.__actions__||(f.__actions__||(f.__actions__=[])).push({func:$e,args:[t],thisArg:Wt}),new Ut(f,i)):this.thru(t)
-}}}),zt("concat join pop push replace shift sort splice split unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?Wu:Cu)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|replace|shift)$/.test(n);Wt.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),ar(Ft.prototype,function(n,t){var r=Wt[t];if(r){var e=r.name;(wo[e]||(wo[e]=[])).push({name:t,func:r})}}),wo[te(null,A).name]=[{name:"wrapper",func:null}],Ft.prototype.clone=function(){var n=this.__actions__,t=this.__iteratees__,r=this.__views__,e=new Ft(this.__wrapped__);
-return e.__actions__=n?Bt(n):null,e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=t?Bt(t):null,e.__takeCount__=this.__takeCount__,e.__views__=r?Bt(r):null,e},Ft.prototype.reverse=function(){if(this.__filtered__){var n=new Ft(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Ft.prototype.value=function(){var n=this.__wrapped__.value();if(!si(n))return Rr(n,this.__actions__);var t,r=this.__dir__,e=0>r;t=n.length;for(var u=this.__views__,o=0,i=-1,f=u?u.length:0;++is.index:u=_:!h(p))))continue n}else if(s=h(p),_==$)p=s;else if(!s){if(_==N)continue n;
-break n}}c[a++]=p}return c},Wt.prototype.chain=function(){return Ne(this)},Wt.prototype.commit=function(){return new Ut(this.value(),this.__chain__)},Wt.prototype.plant=function(n){for(var t,r=this;r instanceof Tt;){var e=Ee(r);t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},Wt.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Ft?(this.__actions__.length&&(n=new Ft(this)),new Ut(n.reverse(),this.__chain__)):this.thru(function(n){return n.reverse()})},Wt.prototype.toString=function(){return this.value()+""
-},Wt.prototype.run=Wt.prototype.toJSON=Wt.prototype.valueOf=Wt.prototype.value=function(){return Rr(this.__wrapped__,this.__actions__)},Wt.prototype.collect=Wt.prototype.map,Wt.prototype.head=Wt.prototype.first,Wt.prototype.select=Wt.prototype.filter,Wt.prototype.tail=Wt.prototype.rest,Wt}var w,b="3.6.0",x=1,A=2,j=4,k=8,E=16,I=32,O=64,R=128,C=256,S=30,W="...",T=150,U=16,F=0,N=1,$=2,L="Expected a function",B="__lodash_placeholder__",z="[object Arguments]",M="[object Array]",D="[object Boolean]",P="[object Date]",q="[object Error]",K="[object Function]",V="[object Number]",Y="[object Object]",Z="[object RegExp]",G="[object String]",J="[object ArrayBuffer]",X="[object Float32Array]",H="[object Float64Array]",Q="[object Int8Array]",nt="[object Int16Array]",tt="[object Int32Array]",rt="[object Uint8Array]",et="[object Uint8ClampedArray]",ut="[object Uint16Array]",ot="[object Uint32Array]",it=/\b__p\+='';/g,ft=/\b(__p\+=)''\+/g,at=/(__e\(.*?\)|\b__t\))\+'';/g,ct=/&(?:amp|lt|gt|quot|#39|#96);/g,lt=/[&<>"'`]/g,pt=RegExp(ct.source),st=RegExp(lt.source),ht=/<%-([\s\S]+?)%>/g,_t=/<%([\s\S]+?)%>/g,vt=/<%=([\s\S]+?)%>/g,gt=/[\u0300-\u036f\ufe20-\ufe23]/g,yt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,mt=/^0[xX]/,wt=/^\[object .+?Constructor\]$/,bt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,xt=/($^)/,At=/[.*+?^${}()|[\]\/\\]/g,jt=RegExp(At.source),kt=/['\n\r\u2028\u2029\\]/g,Et=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),It=" \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",Ot="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap window".split(" "),Rt={};
-Rt[X]=Rt[H]=Rt[Q]=Rt[nt]=Rt[tt]=Rt[rt]=Rt[et]=Rt[ut]=Rt[ot]=true,Rt[z]=Rt[M]=Rt[J]=Rt[D]=Rt[P]=Rt[q]=Rt[K]=Rt["[object Map]"]=Rt[V]=Rt[Y]=Rt[Z]=Rt["[object Set]"]=Rt[G]=Rt["[object WeakMap]"]=false;var Ct={};Ct[z]=Ct[M]=Ct[J]=Ct[D]=Ct[P]=Ct[X]=Ct[H]=Ct[Q]=Ct[nt]=Ct[tt]=Ct[V]=Ct[Y]=Ct[Z]=Ct[G]=Ct[rt]=Ct[et]=Ct[ut]=Ct[ot]=true,Ct[q]=Ct[K]=Ct["[object Map]"]=Ct["[object Set]"]=Ct["[object WeakMap]"]=false;var St={leading:false,maxWait:0,trailing:false},Wt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Tt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ut={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ft={"function":true,object:true},Nt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$t=Ft[typeof exports]&&exports&&!exports.nodeType&&exports,Lt=Ft[typeof module]&&module&&!module.nodeType&&module,Bt=Ft[typeof self]&&self&&self.Object&&self,Ft=Ft[typeof window]&&window&&window.Object&&window,zt=Lt&&Lt.exports===$t&&$t,Mt=$t&&Lt&&typeof global=="object"&&global||Ft!==(this&&this.window)&&Ft||Bt||this,Dt=m();
-typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Mt._=Dt, define(function(){return Dt})):$t&&Lt?zt?(Lt.exports=Dt)._=Dt:$t._=Dt:Mt._=Dt}).call(this);
\ No newline at end of file
+;(function(){function n(n,t){if(n!==t){var r=n===n,e=t===t;if(n>t||!r||n===w&&e)return 1;if(n=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n);
+
+}function v(n,t){for(var r=-1,e=n.length,u=-1,o=[];++re&&(e=u)}return e}function Hn(n,t){for(var r=-1,e=n.length;++ri(t,a,0)&&u.push(a);return u}function at(n,t){var r=true;return Nu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function ct(n,t){var r=[];return Nu(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function lt(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function st(n,t,r){
+for(var e=-1,u=n.length,o=-1,i=[];++et&&(t=-t>u?0:u+t),r=r===w||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Ce(u);++eu(a,s,0)&&((t||f)&&a.push(s),c.push(l))}return c}function Ut(n,t){for(var r=-1,e=t.length,u=Ce(e);++r>>1,i=n[o];(r?i<=t:iu?null:o,u=1);++earguments.length;return typeof e=="function"&&o===w&&Io(r)?n(r,e,u,i):Et(r,yr(e,o,4),u,i,t)}}function ar(n,t,r,e,u,o,i,f,a,c){function l(){for(var b=arguments.length,j=b,k=Ce(b);j--;)k[j]=arguments[j];
+
+if(e&&(k=Mt(k,e,u)),o&&(k=Dt(k,o,i)),_||y){var j=l.placeholder,O=v(k,j),b=b-O.length;if(bu)||i===e&&i===o)&&(u=i,o=n)}),o}function yr(n,t,r){var e=$n.callback||je,e=e===je?ut:e;return r?e(n,t,r):e}function dr(n,t,e){var u=$n.indexOf||zr,u=u===zr?r:u;return n?u(n,t,e):u}function mr(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&Ke.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function wr(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=Fe),new n;
+
+}function br(n,t,r){var e=n.constructor;switch(t){case J:return zt(n);case D:case P:return new e(+n);case X:case H:case Q:case nn:case tn:case rn:case en:case un:case on:return t=n.buffer,new e(r?zt(t):t,n.byteOffset,n.length);case V:case G:return new e(n);case Z:var u=new e(n.source,kn.exec(n));u.lastIndex=n.lastIndex}return u}function xr(n,t,r){return null==n||kr(t,n)||(t=Nr(t),n=1==t.length?n:gt(n,It(t,0,-1)),t=Mr(t)),t=null==n?n:n[t],null==t?w:t.apply(n,r)}function Ar(n,t){return n=+n,t=null==t?Ru:t,
+-1t?0:t)):[]}function Lr(n,t,r){var e=n?n.length:0;return e?((r?jr(n,t,r):null==t)&&(t=1),t=e-(+t||0),It(n,0,0>t?0:t)):[];
+
+}function Br(n){return n?n[0]:w}function zr(n,t,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?yu(u+e,0):e;else if(e)return e=$t(n,t),n=n[e],(t===t?t===n:n!==n)?e:-1;return r(n,t,e||0)}function Mr(n){var t=n?n.length:0;return t?n[t-1]:w}function Dr(n){return $r(n,1)}function Pr(n,t,e,u){if(!n||!n.length)return[];null!=t&&typeof t!="boolean"&&(u=e,e=jr(n,t,u)?null:t,t=false);var o=yr();if((o!==ut||null!=e)&&(e=o(e,u,3)),t&&dr()==r){t=e;var i;e=-1,u=n.length;for(var o=-1,f=[];++e>>0,e=Ce(r);++tr?yu(u+r,0):r||0,typeof n=="string"||!Io(n)&&pe(n)?rt?0:+t||0,n.length),n)}function Qr(n){n=Tr(n);for(var t=-1,r=n.length,e=Ce(r);++t=n&&(t=null),r}}function re(n,t,r){function e(){var r=t-(_o()-c);0>=r||r>t?(f&&Qe(f),r=p,f=s=p=w,r&&(h=_o(),a=n.apply(l,i),s||f||(i=l=null))):s=fu(e,r)}function u(){
+s&&Qe(s),f=s=p=w,(v||_!==t)&&(h=_o(),a=n.apply(l,i),s||f||(i=l=null))}function o(){if(i=arguments,c=_o(),l=this,p=v&&(s||!g),false===_)var r=g&&!s;else{f||g||(h=c);var o=_-(c-h),y=0>=o||o>_;y?(f&&(f=Qe(f)),h=c,a=n.apply(l,i)):f||(f=fu(u,o))}return y&&s?s=Qe(s):s||t===_||(s=fu(e,t)),r&&(y=true,a=n.apply(l,i)),!y||s||f||(i=l=null),a}var i,f,a,c,l,s,p,h=0,_=false,v=true;if(typeof n!="function")throw new Be(L);if(t=0>t?0:+t||0,true===r)var g=true,v=false;else ae(r)&&(g=r.leading,_="maxWait"in r&&yu(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);
+
+return o.cancel=function(){s&&Qe(s),f&&Qe(f),f=s=p=w},o}function ee(n,t){function r(){var e=arguments,u=r.cache,o=t?t.apply(this,e):e[0];return u.has(o)?u.get(o):(e=n.apply(this,e),u.set(o,e),e)}if(typeof n!="function"||t&&typeof t!="function")throw new Be(L);return r.cache=new ee.Cache,r}function ue(n,t){if(typeof n!="function")throw new Be(L);return t=yu(t===w?n.length-1:+t||0,0),function(){for(var r=arguments,e=-1,u=yu(r.length-t,0),o=Ce(u);++et||!n||!vu(t))return r;do t%2&&(r+=n),t=nu(t/2),n+=n;while(t);return r}function xe(n,t,r){var e=n;return(n=u(n))?(r?jr(e,t,r):null==t)?n.slice(g(n),y(n)+1):(t+="",n.slice(i(n,t),f(n,t)+1)):n}function Ae(n,t,r){return r&&jr(n,t,r)&&(t=null),
+n=u(n),n.match(t||Sn)||[]}function je(n,t,r){return r&&jr(n,t,r)&&(t=null),ut(n,t)}function ke(n){return function(){return n}}function Oe(n){return n}function Ee(n,t,r){if(null==r){var e=ae(t),u=e&&zo(t);((u=u&&u.length&&vt(t,u))?u.length:e)||(u=false,r=t,t=n,n=this)}u||(u=vt(t,zo(t)));var o=true,e=-1,i=Co(n),f=u.length;false===r?o=false:ae(r)&&"chain"in r&&(o=r.chain);for(;++e>>1,Iu=su?su.BYTES_PER_ELEMENT:0,Ru=Ue.pow(2,53)-1,Cu=lu&&new lu,Su={},Wu=$n.support={};
+
+!function(n){function t(){this.x=n}var r=[];t.prototype={valueOf:n,y:n};for(var e in new t)r.push(e);Wu.funcDecomp=/\bthis\b/.test(function(){return this}),Wu.funcNames=typeof Te.name=="string";try{Wu.dom=11===Pe.createDocumentFragment().nodeType}catch(u){Wu.dom=false}try{Wu.nonEnumArgs=!ou.call(arguments,1)}catch(o){Wu.nonEnumArgs=true}}(1,0),$n.templateSettings={escape:_n,evaluate:vn,interpolate:gn,variable:"",imports:{_:$n}};var Tu=pu||function(n,t){return null==t?n:et(t,qu(t),et(t,zo(t),n))},Uu=function(){
+function n(){}return function(t){if(ae(t)){n.prototype=t;var r=new n;n.prototype=null}return r||_.Object()}}(),Nu=Kt(ht),Fu=Kt(_t,true),$u=Vt(),Lu=Vt(true),Bu=Cu?function(n,t){return Cu.set(n,t),n}:Oe;Xe||(zt=Je&&cu?function(n){var t=n.byteLength,r=su?nu(t/Iu):0,e=r*Iu,u=new Je(t);if(r){var o=new su(u,0,r);o.set(new su(n,0,r))}return t!=e&&(o=new cu(u,e),o.set(new cu(n,e))),u}:ke(null));var zu=_u&&iu?function(n){return new Dn(n)}:ke(null),Mu=Cu?function(n){return Cu.get(n)}:Ie,Du=function(){return Wu.funcNames?"constant"==ke.name?At("name"):function(n){
+for(var t=n.name,r=Su[t],e=r?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==n)return u.name}return t}:ke("")}(),Pu=At("length"),qu=tu?function(n){return tu(Ur(n))}:ke([]),Ku=function(){var n=0,t=0;return function(r,e){var u=_o(),o=U-(u-t);if(t=u,0=T)return r}else n=0;return Bu(r,e)}}(),Vu=ue(function(n,t){return Io(n)||oe(n)?ft(n,st(t,false,true)):[]}),Yu=Qt(),Zu=Qt(true),Gu=ue(function(t,r){t||(t=[]),r=st(r);var e=rt(t,r);return kt(t,r.sort(n)),e}),Ju=sr(),Xu=sr(true),Hu=ue(function(n){return Tt(st(n,false,true));
+
+}),Qu=ue(function(n,t){return Io(n)||oe(n)?ft(n,t):[]}),no=ue(qr),to=ue(function(n,t){var r=n?Pu(n):0;return Er(r)&&(n=Tr(n)),rt(n,st(t))}),ro=Pt(function(n,t,r){Ke.call(n,r)?++n[r]:n[r]=1}),eo=Ht(Nu),uo=Ht(Fu,true),oo=rr(Kn,Nu),io=rr(function(n,t){for(var r=n.length;r--&&false!==t(n[r],r,n););return n},Fu),fo=Pt(function(n,t,r){Ke.call(n,r)?n[r].push(t):n[r]=[t]}),ao=Pt(function(n,t,r){n[r]=t}),co=ue(function(n,t,r){var e=-1,u=typeof t=="function",o=kr(t),i=Pu(n),f=Er(i)?Ce(i):[];return Nu(n,function(n){
+var i=u?t:o&&null!=n&&n[t];f[++e]=i?i.apply(n,r):xr(n,t,r)}),f}),lo=Pt(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),so=fr(function(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u--n?t.apply(this,arguments):void 0}},$n.ary=function(n,t,r){return r&&jr(n,t,r)&&(t=null),t=n&&null==t?n.length:yu(+t||0,0),pr(n,R,null,null,null,null,t)},$n.assign=Wo,
+$n.at=to,$n.before=te,$n.bind=vo,$n.bindAll=go,$n.bindKey=yo,$n.callback=je,$n.chain=Vr,$n.chunk=function(n,t,r){t=(r?jr(n,t,r):null==t)?1:yu(+t||1,1),r=0;for(var e=n?n.length:0,u=-1,o=Ce(He(e/t));rr&&(r=-r>u?0:u+r),e=e===w||e>u?u:+e||0,0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;re)return f;
+
+var i=n[0],c=-1,l=i?i.length:0,s=u[0];n:for(;++c(s?Pn(s,a):o(f,a,0))){for(t=e;--t;){var p=u[t];if(0>(p?Pn(p,a):o(n[t],a,0)))continue n}s&&s.push(a),f.push(a)}return f},$n.invert=function(n,t,r){r&&jr(n,t,r)&&(t=null),r=-1;for(var e=zo(n),u=e.length,o={};++rt?0:t)):[]},$n.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?jr(n,t,r):null==t)&&(t=1),t=e-(+t||0),It(n,0>t?0:t)):[]},$n.takeRightWhile=function(n,t,r){return n&&n.length?Nt(n,yr(t,r,3),false,true):[]},$n.takeWhile=function(n,t,r){return n&&n.length?Nt(n,yr(t,r,3)):[]},$n.tap=function(n,t,r){return t.call(r,n),n},$n.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Be(L);return false===r?e=false:ae(r)&&(e="leading"in r?!!r.leading:e,
+u="trailing"in r?!!r.trailing:u),Fn.leading=e,Fn.maxWait=+t,Fn.trailing=u,re(n,t,Fn)},$n.thru=Yr,$n.times=function(n,t,r){if(n=nu(n),1>n||!vu(n))return[];var e=-1,u=Ce(du(n,ku));for(t=Bt(t,r,1);++er?0:+r||0,e),r-=t.length,0<=r&&n.indexOf(t,r)==r},$n.escape=function(n){return(n=u(n))&&hn.test(n)?n.replace(sn,l):n},$n.escapeRegExp=me,$n.every=Zr,$n.find=eo,$n.findIndex=Yu,$n.findKey=Uo,$n.findLast=uo,$n.findLastIndex=Zu,$n.findLastKey=No,$n.findWhere=function(n,t){return eo(n,wt(t))},$n.first=Br,$n.get=function(n,t,r){return n=null==n?w:gt(n,Nr(t),t+""),n===w?r:n},$n.has=function(n,t){if(null==n)return false;var r=Ke.call(n,t);return r||kr(t)||(t=Nr(t),
+n=1==t.length?n:gt(n,It(t,0,-1)),t=Mr(t),r=null!=n&&Ke.call(n,t)),r},$n.identity=Oe,$n.includes=Jr,$n.indexOf=zr,$n.inRange=function(n,t,r){return t=+t||0,"undefined"===typeof r?(r=t,t=0):r=+r||0,n>=du(t,r)&&nr?yu(e+r,0):du(r||0,e-1))+1;else if(r)return u=$t(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;if(t!==t)return p(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},$n.max=Qo,$n.min=ni,$n.noConflict=function(){
+return _._=Ze,this},$n.noop=Ie,$n.now=_o,$n.pad=function(n,t,r){n=u(n),t=+t;var e=n.length;return er?0:+r||0,n.length),n.lastIndexOf(t,r)==r},$n.sum=function(n,t,r){r&&jr(n,t,r)&&(t=null);
+
+var e=yr(),u=null==t;if(e===ut&&u||(u=false,t=e(t,r,3)),u){for(n=Io(n)?n:Tr(n),t=n.length,r=0;t--;)r+=+n[t]||0;n=r}else n=Wt(n,t);return n},$n.template=function(n,t,r){var e=$n.templateSettings;r&&jr(n,t,r)&&(t=r=null),n=u(n),t=tt(Tu({},r||t),e,nt),r=tt(Tu({},t.imports),e.imports,nt);var o,i,f=zo(r),a=Ut(r,f),c=0;r=t.interpolate||Rn;var l="__p+='";r=$e((t.escape||Rn).source+"|"+r.source+"|"+(r===gn?jn:Rn).source+"|"+(t.evaluate||Rn).source+"|$","g");var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";
+
+if(n.replace(r,function(t,r,e,u,f,a){return e||(e=u),l+=n.slice(c,a).replace(Cn,s),r&&(o=true,l+="'+__e("+r+")+'"),f&&(i=true,l+="';"+f+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),c=a+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(i?l.replace(fn,""):l).replace(an,"$1").replace(cn,"$1;"),l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",
+t=Jo(function(){return Te(f,p+"return "+l).apply(w,a)}),t.source=l,fe(t))throw t;return t},$n.trim=xe,$n.trimLeft=function(n,t,r){var e=n;return(n=u(n))?n.slice((r?jr(e,t,r):null==t)?g(n):i(n,t+"")):n},$n.trimRight=function(n,t,r){var e=n;return(n=u(n))?(r?jr(e,t,r):null==t)?n.slice(0,y(n)+1):n.slice(0,f(n,t+"")+1):n},$n.trunc=function(n,t,r){r&&jr(n,t,r)&&(t=null);var e=S;if(r=W,null!=t)if(ae(t)){var o="separator"in t?t.separator:o,e="length"in t?+t.length||0:e;r="omission"in t?u(t.omission):r}else e=+t||0;
+
+if(n=u(n),e>=n.length)return n;if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==o)return t+r;if(se(o)){if(n.slice(e).search(o)){var i,f=n.slice(0,e);for(o.global||(o=$e(o.source,(kn.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(f);)i=n.index;t=t.slice(0,null==i?e:i)}}else n.indexOf(o,e)!=e&&(o=t.lastIndexOf(o),-1u.__dir__?"Right":"")
+}),u},zn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()},zn.prototype[n+"RightWhile"]=function(n,t){return this.reverse()[r](n,t).reverse()}}),Kn(["first","last"],function(n,t){var r="take"+(t?"Right":"");zn.prototype[n]=function(){return this[r](1).value()[0]}}),Kn(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");zn.prototype[n]=function(){return this[r](1)}}),Kn(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?wt:Re;zn.prototype[n]=function(n){return this[r](e(n));
+
+}}),zn.prototype.compact=function(){return this.filter(Oe)},zn.prototype.reject=function(n,t){return n=yr(n,t,1),this.filter(function(t){return!n(t)})},zn.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=0>n?this.takeRight(-n):this.drop(n);return t!==w&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r},zn.prototype.toArray=function(){return this.drop(0)},ht(zn.prototype,function(n,t){var r=$n[t];if(r){var e=/^(?:filter|map|reject)|While$/.test(t),u=/^(?:first|last)$/.test(t);$n.prototype[t]=function(){
+function t(n){return n=[n],eu.apply(n,o),r.apply($n,n)}var o=arguments,i=this.__chain__,f=this.__wrapped__,a=!!this.__actions__.length,c=f instanceof zn,l=o[0],s=c||Io(f);return s&&e&&typeof l=="function"&&1!=l.length&&(c=s=false),c=c&&!a,u&&!i?c?n.call(f):r.call($n,this.value()):s?(f=n.apply(c?f:new zn(this),o),u||!a&&!f.__actions__||(f.__actions__||(f.__actions__=[])).push({func:Yr,args:[t],thisArg:$n}),new Bn(f,i)):this.thru(t)}}}),Kn("concat join pop push replace shift sort splice split unshift".split(" "),function(n){
+var t=(/^(?:replace|split)$/.test(n)?De:ze)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|replace|shift)$/.test(n);$n.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),ht(zn.prototype,function(n,t){var r=$n[t];if(r){var e=r.name;(Su[e]||(Su[e]=[])).push({name:t,func:r})}}),Su[ar(null,A).name]=[{name:"wrapper",func:null}],zn.prototype.clone=function(){var n=this.__actions__,t=this.__iteratees__,r=this.__views__,e=new zn(this.__wrapped__);
+
+return e.__actions__=n?qn(n):null,e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=t?qn(t):null,e.__takeCount__=this.__takeCount__,e.__views__=r?qn(r):null,e},zn.prototype.reverse=function(){if(this.__filtered__){var n=new zn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},zn.prototype.value=function(){var n=this.__wrapped__.value();if(!Io(n))return Ft(n,this.__actions__);var t,r=this.__dir__,e=0>r;t=n.length;for(var u=this.__views__,o=0,i=-1,f=u?u.length:0;++ip.index:u=_:!h(s))))continue n}else if(p=h(s),
+_==$)s=p;else if(!p){if(_==F)continue n;break n}}c[a++]=s}return c},$n.prototype.chain=function(){return Vr(this)},$n.prototype.commit=function(){return new Bn(this.value(),this.__chain__)},$n.prototype.plant=function(n){for(var t,r=this;r instanceof Ln;){var e=Fr(r);t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},$n.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof zn?(this.__actions__.length&&(n=new zn(this)),new Bn(n.reverse(),this.__chain__)):this.thru(function(n){
+return n.reverse()})},$n.prototype.toString=function(){return this.value()+""},$n.prototype.run=$n.prototype.toJSON=$n.prototype.valueOf=$n.prototype.value=function(){return Ft(this.__wrapped__,this.__actions__)},$n.prototype.collect=$n.prototype.map,$n.prototype.head=$n.prototype.first,$n.prototype.select=$n.prototype.filter,$n.prototype.tail=$n.prototype.rest,$n}var w,b="3.7.0",x=1,A=2,j=4,k=8,O=16,E=32,I=64,R=128,C=256,S=30,W="...",T=150,U=16,N=0,F=1,$=2,L="Expected a function",B="__lodash_placeholder__",z="[object Arguments]",M="[object Array]",D="[object Boolean]",P="[object Date]",q="[object Error]",K="[object Function]",V="[object Number]",Y="[object Object]",Z="[object RegExp]",G="[object String]",J="[object ArrayBuffer]",X="[object Float32Array]",H="[object Float64Array]",Q="[object Int8Array]",nn="[object Int16Array]",tn="[object Int32Array]",rn="[object Uint8Array]",en="[object Uint8ClampedArray]",un="[object Uint16Array]",on="[object Uint32Array]",fn=/\b__p\+='';/g,an=/\b(__p\+=)''\+/g,cn=/(__e\(.*?\)|\b__t\))\+'';/g,ln=/&(?:amp|lt|gt|quot|#39|#96);/g,sn=/[&<>"'`]/g,pn=RegExp(ln.source),hn=RegExp(sn.source),_n=/<%-([\s\S]+?)%>/g,vn=/<%([\s\S]+?)%>/g,gn=/<%=([\s\S]+?)%>/g,yn=/\.|\[(?:[^[\]]+|(["'])(?:(?!\1)[^\n\\]|\\.)*?)\1\]/,dn=/^\w*$/,mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,wn=/[.*+?^${}()|[\]\/\\]/g,bn=RegExp(wn.source),xn=/[\u0300-\u036f\ufe20-\ufe23]/g,An=/\\(\\)?/g,jn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,kn=/\w*$/,On=/^0[xX]/,En=/^\[object .+?Constructor\]$/,In=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Rn=/($^)/,Cn=/['\n\r\u2028\u2029\\]/g,Sn=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),Wn=" \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",Tn="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap window".split(" "),Un={};
+
+Un[X]=Un[H]=Un[Q]=Un[nn]=Un[tn]=Un[rn]=Un[en]=Un[un]=Un[on]=true,Un[z]=Un[M]=Un[J]=Un[D]=Un[P]=Un[q]=Un[K]=Un["[object Map]"]=Un[V]=Un[Y]=Un[Z]=Un["[object Set]"]=Un[G]=Un["[object WeakMap]"]=false;var Nn={};Nn[z]=Nn[M]=Nn[J]=Nn[D]=Nn[P]=Nn[X]=Nn[H]=Nn[Q]=Nn[nn]=Nn[tn]=Nn[V]=Nn[Y]=Nn[Z]=Nn[G]=Nn[rn]=Nn[en]=Nn[un]=Nn[on]=true,Nn[q]=Nn[K]=Nn["[object Map]"]=Nn["[object Set]"]=Nn["[object WeakMap]"]=false;var Fn={leading:false,maxWait:0,trailing:false},$n={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A",
+"\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u",
+"\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Ln={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Bn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},zn={"function":true,object:true},Mn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Dn=zn[typeof exports]&&exports&&!exports.nodeType&&exports,Pn=zn[typeof module]&&module&&!module.nodeType&&module,qn=zn[typeof self]&&self&&self.Object&&self,Kn=zn[typeof window]&&window&&window.Object&&window,Vn=Pn&&Pn.exports===Dn&&Dn,Yn=Dn&&Pn&&typeof global=="object"&&global&&global.Object&&global||Kn!==(this&&this.window)&&Kn||qn||this,Zn=m();
+
+typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Yn._=Zn, define(function(){return Zn})):Dn&&Pn?Vn?(Pn.exports=Zn)._=Zn:Dn._=Zn:Yn._=Zn}).call(this);
\ No newline at end of file
diff --git a/lodash.src.js b/lodash.src.js
index 49e099755..26b9c85c0 100644
--- a/lodash.src.js
+++ b/lodash.src.js
@@ -1,8 +1,8 @@
/**
* @license
- * lodash 3.6.0
+ * lodash 3.7.0
* Copyright 2012-2015 The Dojo Foundation
- * Based on Underscore.js 1.8.2
+ * Based on Underscore.js 1.8.3
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license
*/
@@ -12,7 +12,7 @@
var undefined;
/** Used as the semantic version number. */
- var VERSION = '3.6.0';
+ var VERSION = '3.7.0';
/** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1,