From 135bc2de529c60aeb347b94ae7cc54f9ac396577 Mon Sep 17 00:00:00 2001 From: octref Date: Fri, 6 Mar 2015 14:29:17 -0500 Subject: [PATCH 01/11] Adjust `_.sortByOrder` doc example to better show effect. [ci skip] --- lodash.src.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lodash.src.js b/lodash.src.js index 549b11e1a3..c26e300a29 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -6974,9 +6974,9 @@ * @example * * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, * { 'user': 'barney', 'age': 26 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 }, * { 'user': 'fred', 'age': 30 } * ]; * From eb1b7b914a2228d19bcb908717660c25f3bd9474 Mon Sep 17 00:00:00 2001 From: octref Date: Fri, 6 Mar 2015 21:52:10 -0500 Subject: [PATCH 02/11] Add `split` and `replace` to `LodashWrapper`. [closes #1016] --- lodash.src.js | 32 ++++++++++++++++++++----------- test/test.js | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 11 deletions(-) diff --git a/lodash.src.js b/lodash.src.js index c26e300a29..d94baa339e 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -858,6 +858,9 @@ * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, * and `unshift` * + * These `String` methods are also available: + * `split` and `replace` + * * The wrapper methods that support shortcut fusion are: * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`, @@ -11707,22 +11710,29 @@ }; }); - // Add `Array.prototype` functions to `lodash.prototype`. - arrayEach(['concat', 'join', 'pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { + // Add `Array.prototype` and `String.prototype` functions to `lodash.prototype`. + arrayEach(['concat', 'join', 'pop', 'push', 'shift', 'sort', 'splice', 'unshift', + 'split', 'replace'], function(methodName) { var arrayFunc = arrayProto[methodName], + stringFunc = stringProto[methodName], + isStringFunc = /^(?:split|replace)$/.test(methodName), chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', fixObjects = !support.spliceObjects && /^(?:pop|shift|splice)$/.test(methodName), retUnwrapped = /^(?:join|pop|shift)$/.test(methodName); - // Avoid array-like object bugs with `Array#shift` and `Array#splice` in - // IE < 9, Firefox < 10, Narwhal, and RingoJS. - var func = !fixObjects ? arrayFunc : function() { - var result = arrayFunc.apply(this, arguments); - if (this.length === 0) { - delete this[0]; - } - return result; - }; + if (isStringFunc) { + var func = stringFunc; + } else { + // Avoid array-like object bugs with `Array#shift` and `Array#splice` in + // IE < 9, Firefox < 10, Narwhal, and RingoJS. + var func = !fixObjects ? arrayFunc : function() { + var result = arrayFunc.apply(this, arguments); + if (this.length === 0) { + delete this[0]; + } + return result; + }; + } lodash.prototype[methodName] = function() { var args = arguments; diff --git a/test/test.js b/test/test.js index a6b875fa80..f3f578ac6e 100644 --- a/test/test.js +++ b/test/test.js @@ -15653,6 +15653,25 @@ /*--------------------------------------------------------------------------*/ + QUnit.module('lodash(...).replace'); + + (function() { + test('should support string replace', 2, function() { + if (!isNpm) { + var string = 'hi hidash', + wrapped = _(string); + + deepEqual(wrapped.replace('hi', 'lo').value(), 'lo hidash'); + deepEqual(wrapped.replace(/hi/g, 'lo').value(), 'lo lodash'); + } + else { + skipTest(2); + } + }); + }()); + + /*--------------------------------------------------------------------------*/ + QUnit.module('lodash(...).reverse'); (function() { @@ -15822,6 +15841,40 @@ /*--------------------------------------------------------------------------*/ + QUnit.module('lodash(...).split'); + + (function() { + test('should support string split', 1, function() { + if (!isNpm) { + var string = 'hi ya', + wrapped = _(string), + actual = ['hi', 'ya']; + + deepEqual(wrapped.split(' ').value(), actual); + } + else { + skipTest(1); + } + }); + }()); + + (function() { + test('should allow mixed string and array prototype methods', 1, function() { + if (!isNpm) { + var string = 'hi ya', + wrapped = _(string), + actual = 'hi,ya'; + + deepEqual(wrapped.split(' ').join(','), actual); + } + else { + skipTest(1); + } + }); + }()); + + /*--------------------------------------------------------------------------*/ + QUnit.module('lodash(...).unshift'); (function() { From bf96c3018721aa462561c515ae21f14c7b153d97 Mon Sep 17 00:00:00 2001 From: jdalton Date: Sat, 7 Mar 2015 00:23:17 -0800 Subject: [PATCH 03/11] Cleanup string methods added to `LodashWrapper`. --- lodash.src.js | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/lodash.src.js b/lodash.src.js index d94baa339e..84c89f50f0 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -854,12 +854,14 @@ * Chaining is supported in custom builds as long as the `_#value` method is * directly or indirectly included in the build. * - * In addition to lodash methods, wrappers also have the following `Array` methods: - * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, - * and `unshift` + * In addition to lodash methods, wrappers have `Array` and `String` methods. * - * These `String` methods are also available: - * `split` and `replace` + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, + * `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` * * The wrapper methods that support shortcut fusion are: * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, @@ -11710,29 +11712,22 @@ }; }); - // Add `Array.prototype` and `String.prototype` functions to `lodash.prototype`. - arrayEach(['concat', 'join', 'pop', 'push', 'shift', 'sort', 'splice', 'unshift', - 'split', 'replace'], function(methodName) { - var arrayFunc = arrayProto[methodName], - stringFunc = stringProto[methodName], - isStringFunc = /^(?:split|replace)$/.test(methodName), + // Add `Array` and `String` methods to `lodash.prototype`. + arrayEach(['concat', 'join', 'pop', 'push', 'replace', 'shift', 'sort', 'splice', 'split', 'unshift'], function(methodName) { + var protoFunc = (/^(?:replace|split)$/.test(methodName) ? stringProto : arrayProto)[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', fixObjects = !support.spliceObjects && /^(?:pop|shift|splice)$/.test(methodName), - retUnwrapped = /^(?:join|pop|shift)$/.test(methodName); + retUnwrapped = /^(?:join|pop|replace|shift)$/.test(methodName); - if (isStringFunc) { - var func = stringFunc; - } else { - // Avoid array-like object bugs with `Array#shift` and `Array#splice` in - // IE < 9, Firefox < 10, Narwhal, and RingoJS. - var func = !fixObjects ? arrayFunc : function() { - var result = arrayFunc.apply(this, arguments); - if (this.length === 0) { - delete this[0]; - } - return result; - }; - } + // Avoid array-like object bugs with `Array#shift` and `Array#splice` in + // IE < 9, Firefox < 10, Narwhal, and RingoJS. + var func = !fixObjects ? protoFunc : function() { + var result = protoFunc.apply(this, arguments); + if (this.length === 0) { + delete this[0]; + } + return result; + }; lodash.prototype[methodName] = function() { var args = arguments; From 0f201e3fd8c95808e11b418952db204a72cf89d7 Mon Sep 17 00:00:00 2001 From: jdalton Date: Sat, 7 Mar 2015 00:23:56 -0800 Subject: [PATCH 04/11] Add more chaining tests `join`, `replace`, & `split`. --- test/test.js | 60 +++++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/test/test.js b/test/test.js index f3f578ac6e..32df338b73 100644 --- a/test/test.js +++ b/test/test.js @@ -15571,19 +15571,27 @@ QUnit.module('lodash(...).join'); (function() { + var array = [1, 2, 3]; + test('should return join all array elements into a string', 2, function() { if (!isNpm) { - var array = [1, 2, 3], - wrapped = _(array), - actual = wrapped.join('.'); - - strictEqual(actual, '1.2.3'); + var wrapped = _(array); + strictEqual(wrapped.join('.'), '1.2.3'); strictEqual(wrapped.value(), array); } else { skipTest(2); } }); + + test('should return a wrapped value when explicitly chaining', 1, function() { + if (!isNpm) { + ok(_(array).chain().join('.') instanceof _); + } + else { + skipTest(); + } + }); }()); /*--------------------------------------------------------------------------*/ @@ -15656,18 +15664,25 @@ QUnit.module('lodash(...).replace'); (function() { - test('should support string replace', 2, function() { + test('should replace the matched pattern', 2, function() { if (!isNpm) { - var string = 'hi hidash', - wrapped = _(string); - - deepEqual(wrapped.replace('hi', 'lo').value(), 'lo hidash'); - deepEqual(wrapped.replace(/hi/g, 'lo').value(), 'lo lodash'); + var wrapped = _('abcdef'); + strictEqual(wrapped.replace('def', '123'), 'abc123'); + strictEqual(wrapped.replace(/[bdf]/g, '-'), 'a-c-e-'); } else { skipTest(2); } }); + + test('should return a wrapped value when explicitly chaining', 1, function() { + if (!isNpm) { + ok(_('abc').chain().replace('b', '_') instanceof _); + } + else { + skipTest(); + } + }); }()); /*--------------------------------------------------------------------------*/ @@ -15844,31 +15859,24 @@ QUnit.module('lodash(...).split'); (function() { - test('should support string split', 1, function() { + test('should support string split', 2, function() { if (!isNpm) { - var string = 'hi ya', - wrapped = _(string), - actual = ['hi', 'ya']; - - deepEqual(wrapped.split(' ').value(), actual); + var wrapped = _('abcde'); + deepEqual(wrapped.split('c').value(), ['ab', 'de']); + deepEqual(wrapped.split(/[bd]/).value(), ['a', 'c', 'e']); } else { - skipTest(1); + skipTest(2); } }); - }()); - (function() { test('should allow mixed string and array prototype methods', 1, function() { if (!isNpm) { - var string = 'hi ya', - wrapped = _(string), - actual = 'hi,ya'; - - deepEqual(wrapped.split(' ').join(','), actual); + var wrapped = _('abc'); + strictEqual(wrapped.split('b').join(','), 'a,c'); } else { - skipTest(1); + skipTest(); } }); }()); From 7c443431d9d8b578c605b455e8e41624679adca6 Mon Sep 17 00:00:00 2001 From: jdalton Date: Sat, 7 Mar 2015 11:11:24 -0800 Subject: [PATCH 05/11] Add private `guard` param doc to `_.sortByOrder`. [ci skip] --- lodash.src.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lodash.src.js b/lodash.src.js index 84c89f50f0..5b238bac7d 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -6975,6 +6975,7 @@ * @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- {Object} [guard] Enables use as a callback for functions like `_.reduce`. * @returns {Array} Returns the new sorted array. * @example * From faf64062895533a9568c0daac7f4729692277d3e Mon Sep 17 00:00:00 2001 From: jdalton Date: Sat, 7 Mar 2015 23:20:26 -0800 Subject: [PATCH 06/11] Ensure lazy `drop` when applied after `filter` works correctly. [closes #1026] --- lodash.src.js | 71 ++++++++++++++++++++++++++++++--------------------- test/test.js | 21 +++++++++++++++ 2 files changed, 63 insertions(+), 29 deletions(-) diff --git a/lodash.src.js b/lodash.src.js index 5b238bac7d..2b93561c52 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -1223,7 +1223,6 @@ result.__actions__ = actions ? arrayCopy(actions) : null; result.__dir__ = this.__dir__; - result.__dropCount__ = this.__dropCount__; result.__filtered__ = this.__filtered__; result.__iteratees__ = iteratees ? arrayCopy(iteratees) : null; result.__takeCount__ = this.__takeCount__; @@ -1270,9 +1269,8 @@ start = view.start, end = view.end, length = end - start, - dropCount = this.__dropCount__, - takeCount = nativeMin(length, this.__takeCount__), index = isRight ? end : start - 1, + takeCount = nativeMin(length, this.__takeCount__), iteratees = this.__iteratees__, iterLength = iteratees ? iteratees.length : 0, resIndex = 0, @@ -1290,28 +1288,32 @@ iteratee = data.iteratee, type = data.type; - if (type != LAZY_DROP_WHILE_FLAG) { - var computed = iteratee(value); - } else { - data.done = data.done && (isRight ? index < data.index : index > data.index); + if (type == LAZY_DROP_WHILE_FLAG) { + if (data.done && (isRight ? index > data.index : index < data.index)) { + data.count = 0; + data.done = false; + } data.index = index; - computed = data.done || (data.done = !iteratee(value)); - } - if (type == LAZY_MAP_FLAG) { - value = computed; - } else if (!computed) { - if (type == LAZY_TAKE_WHILE_FLAG) { - break outer; - } else { - continue outer; + if (!data.done) { + var limit = data.limit; + if (!(data.done = limit > -1 ? data.count++ >= limit : !iteratee(value))) { + continue outer; + } + } + } else { + var computed = iteratee(value); + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } } } } - if (dropCount) { - dropCount--; - } else { - result[resIndex++] = value; - } + result[resIndex++] = value; } return result; } @@ -11580,24 +11582,35 @@ result = (filtered && isDropWhile) ? new LazyWrapper(this) : this.clone(), iteratees = result.__iteratees__ || (result.__iteratees__ = []); + iteratees.push({ + 'done': false, + 'count': 0, + 'index': 0, + 'iteratee': getCallback(iteratee, thisArg, 1), + 'limit': -1, + 'type': type + }); + result.__filtered__ = filtered || isFilter; - iteratees.push({ 'done': false, 'index': 0, 'iteratee': getCallback(iteratee, thisArg, 1), 'type': type }); return result; }; }); // Add `LazyWrapper` methods for `_.drop` and `_.take` variants. arrayEach(['drop', 'take'], function(methodName, index) { - var countName = '__' + methodName + 'Count__', - whileName = methodName + 'While'; + var whileName = methodName + 'While'; LazyWrapper.prototype[methodName] = function(n) { - n = n == null ? 1 : nativeMax(floor(n) || 0, 0); + var filtered = this.__filtered__, + result = (filtered && !index) ? this.dropWhile() : this.clone(); - var result = this.clone(); - if (result.__filtered__) { - var value = result[countName]; - result[countName] = index ? nativeMin(value, n) : (value + n); + n = n == null ? 1 : nativeMax(floor(n) || 0, 0); + if (filtered) { + if (index) { + result.__takeCount__ = nativeMin(result.__takeCount__, n); + } else { + last(result.__iteratees__).limit = n; + } } else { var views = result.__views__ || (result.__views__ = []); views.push({ 'size': n, 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') }); diff --git a/test/test.js b/test/test.js index 32df338b73..476cb9cf30 100644 --- a/test/test.js +++ b/test/test.js @@ -12509,6 +12509,27 @@ } }); + test('should not execute subsequent iteratees on an empty array in a lazy chain sequence', 4, function() { + if (!isNpm) { + var array = [1], + iteratee = function() { pass = false }, + pass = true, + actual = _(array).rest().map(iteratee).value(); + + ok(pass); + deepEqual(actual, []); + + pass = true; + actual = _(array).filter(_.identity).rest().map(iteratee).value(); + + ok(pass); + deepEqual(actual, []); + } + else { + skipTest(4); + } + }); + test('should be aliased', 1, function() { strictEqual(_.tail, _.rest); }); From 6113da3e68d72e3ce69f1a5e8b4b83a3438cf51c Mon Sep 17 00:00:00 2001 From: jdalton Date: Sat, 7 Mar 2015 23:27:21 -0800 Subject: [PATCH 07/11] Remove unneeded tests. --- test/test.js | 105 +++++++-------------------------------------------- 1 file changed, 14 insertions(+), 91 deletions(-) diff --git a/test/test.js b/test/test.js index 476cb9cf30..e1e0c65091 100644 --- a/test/test.js +++ b/test/test.js @@ -1452,6 +1452,20 @@ deepEqual(bound(['b'], 'c'), [object, 'a', ['b'], 'c']); }); + test('should rebind functions correctly', 3, function() { + var object1 = {}, + object2 = {}, + object3 = {}; + + var bound1 = _.bind(fn, object1), + bound2 = _.bind(bound1, object2, 'a'), + bound3 = _.bind(bound1, object3, 'b'); + + deepEqual(bound1(), [object1]); + deepEqual(bound2(), [object1, 'a']); + deepEqual(bound3(), [object1, 'b']); + }); + test('should return a wrapped value when chaining', 2, function() { if (!isNpm) { var object = {}, @@ -1466,20 +1480,6 @@ skipTest(2); } }); - - test('should rebind functions correctly', 3, function() { - var object1 = {}, - object2 = {}, - object3 = {}; - - var bound1 = _.bind(fn, object1), - bound2 = _.bind(bound1, object2, 'a'), - bound3 = _.bind(bound1, object3, 'b'); - - deepEqual(bound1(), [object1]); - deepEqual(bound2(), [object1, 'a']); - deepEqual(bound3(), [object1, 'b']); - }); }()); /*--------------------------------------------------------------------------*/ @@ -2164,17 +2164,6 @@ deepEqual(_.compact(falsey.concat(array)), array); }); - test('should return a wrapped value when chaining', 2, function() { - if (!isNpm) { - var wrapped = _(falsey).compact(); - ok(wrapped instanceof _); - deepEqual(wrapped.value(), []); - } - else { - skipTest(2); - } - }); - test('should work when in between lazy operators', 2, function() { if (!isNpm) { var actual = _(falsey).thru(_.slice).compact().thru(_.slice).value(); @@ -3801,17 +3790,6 @@ deepEqual(actual, [[2, 3], [5, 6], [8, 9]]); }); - test('should return a wrapped value when chaining', 2, function() { - if (!isNpm) { - var wrapped = _(array).drop(2); - ok(wrapped instanceof _); - deepEqual(wrapped.value(), [3]); - } - else { - skipTest(2); - } - }); - test('should work in a lazy chain sequence', 6, function() { if (!isNpm) { var array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], @@ -3882,17 +3860,6 @@ deepEqual(actual, [[1, 2], [4, 5], [7, 8]]); }); - test('should return a wrapped value when chaining', 2, function() { - if (!isNpm) { - var wrapped = _(array).dropRight(2); - ok(wrapped instanceof _); - deepEqual(wrapped.value(), [1]); - } - else { - skipTest(2); - } - }); - test('should work in a lazy chain sequence', 6, function() { if (!isNpm) { var array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], @@ -4762,17 +4729,6 @@ deepEqual(actual, [[1], [4], [7]]); }); - test('should return a wrapped value when chaining', 2, function() { - if (!isNpm) { - var wrapped = _(array).take(2); - ok(wrapped instanceof _); - deepEqual(wrapped.value(), [1, 2]); - } - else { - skipTest(2); - } - }); - test('should work in a lazy chain sequence', 6, function() { if (!isNpm) { var array = [1, 2, 3, 4, 5, 6, 7, 8, 9 , 10], @@ -4843,17 +4799,6 @@ deepEqual(actual, [[3], [6], [9]]); }); - test('should return a wrapped value when chaining', 2, function() { - if (!isNpm) { - var wrapped = _(array).takeRight(2); - ok(wrapped instanceof _); - deepEqual(wrapped.value(), [2, 3]); - } - else { - skipTest(2); - } - }); - test('should work in a lazy chain sequence', 6, function() { if (!isNpm) { var array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], @@ -6516,17 +6461,6 @@ deepEqual(actual, [[1, 2], [4, 5], [7, 8]]); }); - test('should return a wrapped value when chaining', 2, function() { - if (!isNpm) { - var wrapped = _(array).initial(); - ok(wrapped instanceof _); - deepEqual(wrapped.value(), [1, 2]); - } - else { - skipTest(2); - } - }); - test('should work in a lazy chain sequence', 4, function() { if (!isNpm) { var array = [1, 2, 3], @@ -12467,17 +12401,6 @@ deepEqual(actual, [[2, 3], [5, 6], [8, 9]]); }); - test('should return a wrapped value when chaining', 2, function() { - if (!isNpm) { - var wrapped = _(array).rest(); - ok(wrapped instanceof _); - deepEqual(wrapped.value(), [2, 3]); - } - else { - skipTest(2); - } - }); - test('should work in a lazy chain sequence', 4, function() { if (!isNpm) { var array = [1, 2, 3], From b5dce2f74ba1f9e7db921f954035e69a31cce0cc Mon Sep 17 00:00:00 2001 From: jdalton Date: Sun, 8 Mar 2015 01:00:04 -0800 Subject: [PATCH 08/11] Optimize `createBindWrapper`, `createPartialWrapper`, and `createHybridWrapper`. --- lodash.src.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lodash.src.js b/lodash.src.js index 2b93561c52..98b3180d75 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -3213,7 +3213,8 @@ var Ctor = createCtorWrapper(func); function wrapper() { - return (this instanceof wrapper ? Ctor : func).apply(thisArg, arguments); + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(thisArg, arguments); } return wrapper; } @@ -3416,7 +3417,8 @@ if (isAry && ary < args.length) { args.length = ary; } - return (this instanceof wrapper ? (Ctor || createCtorWrapper(func)) : func).apply(thisBinding, args); + var fn = (this && this !== root && this instanceof wrapper) ? (Ctor || createCtorWrapper(func)) : func; + return fn.apply(thisBinding, args); } return wrapper; } @@ -3475,7 +3477,8 @@ while (argsLength--) { args[leftIndex++] = arguments[++argsIndex]; } - return (this instanceof wrapper ? Ctor : func).apply(isBind ? thisArg : this, args); + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, args); } return wrapper; } From 5e705743965edda84f1b627c65046b3cf86e5e2a Mon Sep 17 00:00:00 2001 From: jdalton Date: Sun, 8 Mar 2015 17:45:53 -0700 Subject: [PATCH 09/11] Add parentheses and cleanup more complex code snippets. --- lodash.src.js | 69 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 25 deletions(-) diff --git a/lodash.src.js b/lodash.src.js index 98b3180d75..36f5ff73c2 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -444,9 +444,8 @@ if (result) { if (index >= ordersLength) { return result; - } else { - return orders[index] ? result : result * -1; } + return result * (orders[index] ? 1 : -1); } } // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications @@ -1269,7 +1268,7 @@ start = view.start, end = view.end, length = end - start, - index = isRight ? end : start - 1, + index = isRight ? end : (start - 1), takeCount = nativeMin(length, this.__takeCount__), iteratees = this.__iteratees__, iterLength = iteratees ? iteratees.length : 0, @@ -1289,14 +1288,14 @@ type = data.type; if (type == LAZY_DROP_WHILE_FLAG) { - if (data.done && (isRight ? index > data.index : index < data.index)) { + if (data.done && (isRight ? (index > data.index) : (index < data.index))) { data.count = 0; data.done = false; } data.index = index; if (!data.done) { var limit = data.limit; - if (!(data.done = limit > -1 ? data.count++ >= limit : !iteratee(value))) { + if (!(data.done = limit > -1 ? (data.count++ >= limit) : !iteratee(value))) { continue outer; } } @@ -1733,7 +1732,7 @@ value = object[key], result = customizer(value, source[key], key, object, source); - if ((result === result ? result !== value : value === value) || + if ((result === result ? (result !== value) : (value === value)) || (typeof value == 'undefined' && !(key in object))) { object[key] = result; } @@ -2083,7 +2082,7 @@ if (end < 0) { end += length; } - length = start > end ? 0 : end >>> 0; + length = start > end ? 0 : (end >>> 0); start >>>= 0; while (start < length) { @@ -2570,7 +2569,7 @@ result = srcValue; } if ((isSrcArr || typeof result != 'undefined') && - (isCommon || (result === result ? result !== value : value === value))) { + (isCommon || (result === result ? (result !== value) : (value === value)))) { object[key] = result; } }); @@ -2630,7 +2629,7 @@ if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); - } else if (result === result ? result !== value : value === value) { + } else if (result === result ? (result !== value) : (value === value)) { object[key] = result; } } @@ -2742,7 +2741,7 @@ if (end < 0) { end += length; } - length = start > end ? 0 : (end - start) >>> 0; + length = start > end ? 0 : ((end - start) >>> 0); start >>>= 0; var result = Array(length); @@ -3241,7 +3240,7 @@ return function() { var length = arguments.length, index = length, - fromIndex = fromRight ? length - 1 : 0; + fromIndex = fromRight ? (length - 1) : 0; if (!length) { return function() { return arguments[0]; }; @@ -3696,8 +3695,10 @@ othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { return false; } } @@ -3723,7 +3724,8 @@ baseEach(collection, function(value, index, collection) { var current = iteratee(value, index, collection); - if ((isMin ? current < computed : current > computed) || (current === exValue && current === result)) { + if ((isMin ? (current < computed) : (current > computed)) || + (current === exValue && current === result)) { computed = current; result = value; } @@ -3939,7 +3941,7 @@ } if (prereq) { var other = object[index]; - return value === value ? value === other : other !== other; + return value === value ? (value === other) : (other !== other); } return false; } @@ -4822,7 +4824,10 @@ var index = binaryIndex(array, value), other = array[index]; - return (value === value ? value === other : other !== other) ? index : -1; + if (value === value ? (value === other) : (other !== other)) { + return index; + } + return -1; } return baseIndexOf(array, value, fromIndex || 0); } @@ -4958,7 +4963,10 @@ } else if (fromIndex) { index = binaryIndex(array, value, true) - 1; var other = array[index]; - return (value === value ? value === other : other !== other) ? index : -1; + if (value === value ? (value === other) : (other !== other)) { + return index; + } + return -1; } if (value !== value) { return indexOfNaN(array, index, true); @@ -8241,7 +8249,7 @@ */ function isElement(value) { return (value && value.nodeType === 1 && isObjectLike(value) && - (lodash.support.nodeTag ? objToString.call(value).indexOf('Element') > -1 : isHostObject(value))) || false; + (lodash.support.nodeTag ? (objToString.call(value).indexOf('Element') > -1) : isHostObject(value))) || false; } // Fallback for environments without DOM support. if (!support.dom) { @@ -9248,7 +9256,7 @@ length = object.length; } if ((typeof Ctor == 'function' && Ctor.prototype === object) || - (typeof object == 'function' ? lodash.support.enumPrototypes : (length && isLength(length)))) { + (typeof object == 'function' ? lodash.support.enumPrototypes : (length && isLength(length)))) { return shimKeys(object); } return isObject(object) ? nativeKeys(object) : []; @@ -9315,7 +9323,7 @@ } } if (support.nonEnumShadows && object !== objectProto) { - var tag = object === stringProto ? stringTag : object === errorProto ? errorTag : objToString.call(object), + var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)), nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag]; if (tag == objectTag) { @@ -9881,7 +9889,11 @@ target = (target + ''); var length = string.length; - position = (typeof position == 'undefined' ? length : nativeMin(position < 0 ? 0 : (+position || 0), length)) - target.length; + position = typeof position == 'undefined' + ? length + : nativeMin(position < 0 ? 0 : (+position || 0), length); + + position -= target.length; return position >= 0 && string.indexOf(target, position) == position; } @@ -10223,7 +10235,10 @@ */ function startsWith(string, target, position) { string = baseToString(string); - position = position == null ? 0 : nativeMin(position < 0 ? 0 : (+position || 0), string.length); + position = position == null + ? 0 + : nativeMin(position < 0 ? 0 : (+position || 0), string.length); + return string.lastIndexOf(target, position) == position; } @@ -10573,7 +10588,7 @@ if (options != null) { if (isObject(options)) { var separator = 'separator' in options ? options.separator : separator; - length = 'length' in options ? +options.length || 0 : length; + length = 'length' in options ? (+options.length || 0) : length; omission = 'omission' in options ? baseToString(options.omission) : omission; } else { length = +options || 0; @@ -10691,7 +10706,7 @@ function attempt() { var func = arguments[0], length = arguments.length, - args = Array(length ? length - 1 : 0); + args = Array(length ? (length - 1) : 0); while (--length > 0) { args[length - 1] = arguments[length]; @@ -10922,7 +10937,11 @@ var chainAll = this.__chain__; if (chain || chainAll) { var result = object(this.__wrapped__); - (result.__actions__ = arrayCopy(this.__actions__)).push({ 'func': func, 'args': arguments, 'thisArg': object }); + (result.__actions__ = arrayCopy(this.__actions__)).push({ + 'func': func, + 'args': arguments, + 'thisArg': object + }); result.__chain__ = chainAll; return result; } From 1253d254af705d293b8717d1c7c0ba67589ccf62 Mon Sep 17 00:00:00 2001 From: jdalton Date: Sun, 8 Mar 2015 17:53:22 -0700 Subject: [PATCH 10/11] Rebuild lodash and docs. --- doc/README.md | 433 +++++++++++++++++++++++++------------------------- lodash.js | 176 ++++++++++++-------- lodash.min.js | 164 +++++++++---------- lodash.src.js | 4 +- 4 files changed, 413 insertions(+), 364 deletions(-) diff --git a/doc/README.md b/doc/README.md index 67a5334ce7..7f287b1afb 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,4 @@ -# lodash v3.4.0 +# lodash v3.5.0 @@ -322,7 +322,7 @@ ### `_.chunk(array, [size=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4288 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4300 "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 @@ -350,7 +350,7 @@ _.chunk(['a', 'b', 'c', 'd'], 3); ### `_.compact(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4319 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4331 "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. @@ -373,7 +373,7 @@ _.compact([0, 1, false, 2, '', 3]); ### `_.difference(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4354 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4366 "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. @@ -403,7 +403,7 @@ _.difference([1, 2, 3], [4, 2]); ### `_.drop(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4392 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4404 "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. @@ -435,7 +435,7 @@ _.drop([1, 2, 3], 0); ### `_.dropRight(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4427 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4439 "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. @@ -467,7 +467,7 @@ _.dropRight([1, 2, 3], 0); ### `_.dropRightWhile(array, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4488 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4500 "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 @@ -527,7 +527,7 @@ _.pluck(_.dropRightWhile(users, 'active'), 'user'); ### `_.dropWhile(array, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4547 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4559 "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 @@ -587,7 +587,7 @@ _.pluck(_.dropWhile(users, 'active'), 'user'); ### `_.fill(array, value, [start=0], [end=array.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4573 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4585 "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`. @@ -611,7 +611,7 @@ including, `end`. ### `_.findIndex(array, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4633 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4645 "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. @@ -670,7 +670,7 @@ _.findIndex(users, 'active'); ### `_.findLastIndex(array, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4694 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4706 "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. @@ -729,7 +729,7 @@ _.findLastIndex(users, 'active'); ### `_.first(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4722 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.first "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4734 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.first "See the npm package") Gets the first element of `array`. @@ -754,7 +754,7 @@ _.first([]); ### `_.flatten(array, [isDeep])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4746 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4758 "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. @@ -782,7 +782,7 @@ _.flatten([1, [2, 3, [4]]], true); ### `_.flattenDeep(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4767 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4779 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") Recursively flattens a nested array. @@ -804,7 +804,7 @@ _.flattenDeep([1, [2, 3, [4]]]); ### `_.indexOf(array, value, [fromIndex=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4804 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4816 "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, @@ -845,7 +845,7 @@ _.indexOf([1, 1, 2, 2], 2, true); ### `_.initial(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4833 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4848 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package") Gets all but the last element of `array`. @@ -867,7 +867,7 @@ _.initial([1, 2, 3]); ### `_.intersection([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4855 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4870 "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. @@ -896,7 +896,7 @@ _.intersection([1, 2], [4, 2], [2, 1]); ### `_.last(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4910 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4925 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") Gets the last element of `array`. @@ -918,7 +918,7 @@ _.last([1, 2, 3]); ### `_.lastIndexOf(array, value, [fromIndex=array.length-1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4940 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L4955 "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. @@ -951,7 +951,7 @@ _.lastIndexOf([1, 1, 2, 2], 2, true); ### `_.pull(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L4988 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5006 "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. @@ -987,7 +987,7 @@ console.log(array); ### `_.pullAt(array, [indexes])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5035 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5053 "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 @@ -1021,7 +1021,7 @@ console.log(evens); ### `_.remove(array, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5078 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5096 "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 @@ -1072,7 +1072,7 @@ console.log(evens); ### `_.rest(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5109 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5127 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package") Gets all but the first element of `array`. @@ -1094,7 +1094,7 @@ _.rest([1, 2, 3]); ### `_.slice(array, [start=0], [end=array.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5127 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5145 "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`.
@@ -1117,7 +1117,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.4.0/lodash.src.js#L5187 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5205 "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 @@ -1176,7 +1176,7 @@ _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); ### `_.sortedLastIndex(array, value, [iteratee=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5214 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5232 "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 @@ -1204,7 +1204,7 @@ _.sortedLastIndex([4, 4, 5, 5], 5); ### `_.take(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5245 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5263 "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. @@ -1236,7 +1236,7 @@ _.take([1, 2, 3], 0); ### `_.takeRight(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5280 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5298 "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. @@ -1268,7 +1268,7 @@ _.takeRight([1, 2, 3], 0); ### `_.takeRightWhile(array, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5341 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5359 "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` @@ -1328,7 +1328,7 @@ _.pluck(_.takeRightWhile(users, 'active'), 'user'); ### `_.takeWhile(array, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5400 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5418 "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 @@ -1388,7 +1388,7 @@ _.pluck(_.takeWhile(users, 'active'), 'user'); ### `_.union([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5430 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5448 "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. @@ -1417,7 +1417,7 @@ _.union([1, 2], [4, 2], [2, 1]); ### `_.uniq(array, [isSorted], [iteratee], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5486 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5504 "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 @@ -1481,7 +1481,7 @@ _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); ### `_.unzip(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5523 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5541 "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` @@ -1508,7 +1508,7 @@ _.unzip(zipped); ### `_.without(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5554 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5572 "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. @@ -1538,7 +1538,7 @@ _.without([1, 2, 1, 3], 1, 2); ### `_.xor([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5573 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5591 "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 @@ -1562,7 +1562,7 @@ _.xor([1, 2], [4, 2]); ### `_.zip([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5603 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5621 "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 @@ -1586,7 +1586,7 @@ _.zip(['fred', 'barney'], [30, 40], [true, false]); ### `_.zipObject(props, [values=[]])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5630 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5648 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package") Creates an object composed from arrays of property names and values. Provide either a single two dimensional array, e.g. `[[key1, value1], [key2, value2]]` @@ -1617,7 +1617,7 @@ _.zipObject(['fred', 'barney'], [30, 40]); ### `_(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L929 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L933 "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 @@ -1637,9 +1637,16 @@ Chaining is supported in custom builds as long as the `_#value` method is directly or indirectly included in the build.

-In addition to lodash methods, wrappers also have the following `Array` methods:
-`concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, -and `unshift` +In addition to lodash methods, wrappers have `Array` and `String` methods. +
+
+The wrapper `Array` methods are:
+`concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, +`splice`, and `unshift` +
+
+The wrapper `String` methods are:
+`replace` and `split`

The wrapper methods that support shortcut fusion are:
@@ -1721,7 +1728,7 @@ _.isArray(squares.value()); ### `_.chain(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5677 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5695 "View in source") [Ⓣ][1] Creates a `lodash` object that wraps `value` with explicit method chaining enabled. @@ -1756,7 +1763,7 @@ var youngest = _.chain(users) ### `_.tap(value, interceptor, [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5706 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5724 "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 @@ -1788,7 +1795,7 @@ _([1, 2, 3]) ### `_.thru(value, interceptor, [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5731 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5749 "View in source") [Ⓣ][1] This method is like `_.tap` except that it returns the result of `interceptor`. @@ -1817,7 +1824,7 @@ _([1, 2, 3]) ### `_.prototype.chain()` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5760 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5778 "View in source") [Ⓣ][1] Enables explicit method chaining on the wrapper object. @@ -1849,7 +1856,7 @@ _(users).chain() ### `_.prototype.commit()` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5789 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5807 "View in source") [Ⓣ][1] Executes the chained sequence and returns the wrapped result. @@ -1881,7 +1888,7 @@ console.log(array); ### `_.prototype.plant()` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5816 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5834 "View in source") [Ⓣ][1] Creates a clone of the chained sequence planting `value` as the wrapped value. @@ -1911,7 +1918,7 @@ wrapper.value(); ### `_.prototype.reverse()` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5854 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5872 "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. @@ -1939,7 +1946,7 @@ console.log(array); ### `_.prototype.toString()` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5879 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5897 "View in source") [Ⓣ][1] Produces the result of coercing the unwrapped value to a string. @@ -1958,7 +1965,7 @@ _([1, 2, 3]).toString(); ### `_.prototype.value()` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5896 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5914 "View in source") [Ⓣ][1] Executes the chained sequence to extract the unwrapped value. @@ -1983,7 +1990,7 @@ _([1, 2, 3]).value(); ### `_.at(collection, [props])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5922 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5940 "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 @@ -2011,7 +2018,7 @@ _.at(['fred', 'barney', 'pebbles'], 0, 2); ### `_.countBy(collection, [iteratee=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L5971 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L5989 "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 @@ -2063,7 +2070,7 @@ _.countBy(['one', 'two', 'three'], 'length'); ### `_.every(collection, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6023 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6041 "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; @@ -2121,7 +2128,7 @@ _.every(users, 'active'); ### `_.filter(collection, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6080 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6098 "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 @@ -2180,7 +2187,7 @@ _.pluck(_.filter(users, 'active'), 'user'); ### `_.find(collection, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6136 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6154 "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 @@ -2240,7 +2247,7 @@ _.result(_.find(users, 'active'), 'user'); ### `_.findLast(collection, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6164 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6182 "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. @@ -2267,7 +2274,7 @@ _.findLast([1, 2, 3, 4], function(n) { ### `_.findWhere(collection, source)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6198 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findwhere "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6216 "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 @@ -2306,7 +2313,7 @@ _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user'); ### `_.forEach(collection, [iteratee=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6232 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6250 "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; @@ -2345,7 +2352,7 @@ _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { ### `_.forEachRight(collection, [iteratee=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6257 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6275 "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. @@ -2372,7 +2379,7 @@ _([1, 2]).forEachRight(function(n) { ### `_.groupBy(collection, [iteratee=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6305 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6323 "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 @@ -2425,7 +2432,7 @@ _.groupBy(['one', 'two', 'three'], 'length'); ### `_.includes(collection, target, [fromIndex=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6345 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6363 "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 @@ -2466,7 +2473,7 @@ _.includes('pebbles', 'eb'); ### `_.indexBy(collection, [iteratee=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6410 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.indexby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6428 "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 @@ -2523,7 +2530,7 @@ _.indexBy(keyData, function(object) { ### `_.invoke(collection, methodName, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6436 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6454 "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 @@ -2553,7 +2560,7 @@ _.invoke([123, 456], String.prototype.split, ''); ### `_.map(collection, [iteratee=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6496 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6514 "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 @@ -2620,7 +2627,7 @@ _.map(users, 'user'); ### `_.partition(collection, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6561 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6579 "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 @@ -2690,7 +2697,7 @@ _.map(_.partition(users, 'active'), mapper); ### `_.pluck(collection, key)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6588 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pluck "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6606 "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`. @@ -2722,7 +2729,7 @@ _.pluck(userIndex, 'age'); ### `_.reduce(collection, [iteratee=_.identity], [accumulator], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6628 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6646 "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 @@ -2768,7 +2775,7 @@ _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) { ### `_.reduceRight(collection, [iteratee=_.identity], [accumulator], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6655 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6673 "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. @@ -2798,7 +2805,7 @@ _.reduceRight(array, function(flattened, other) { ### `_.reject(collection, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6707 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6725 "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. @@ -2856,7 +2863,7 @@ _.pluck(_.reject(users, 'active'), 'user'); ### `_.sample(collection, [n])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6733 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6751 "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. @@ -2882,7 +2889,7 @@ _.sample([1, 2, 3, 4], 2); ### `_.shuffle(collection)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6759 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6777 "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) @@ -2906,7 +2913,7 @@ _.shuffle([1, 2, 3, 4]); ### `_.size(collection)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6796 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6814 "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. @@ -2935,7 +2942,7 @@ _.size('pebbles'); ### `_.some(collection, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6850 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6868 "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 @@ -2994,7 +3001,7 @@ _.some(users, 'active'); ### `_.sortBy(collection, [iteratee=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6907 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6925 "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 @@ -3053,7 +3060,7 @@ _.pluck(_.sortBy(users, 'user'), 'user'); ### `_.sortByAll(collection, props)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6948 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortbyall "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L6966 "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. @@ -3084,7 +3091,7 @@ _.map(_.sortByAll(users, ['user', 'age']), _.values); ### `_.sortByOrder(collection, props, orders)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L6987 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortbyorder "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7006 "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` @@ -3102,9 +3109,9 @@ falsey value will sort it in descending order. #### Example ```js var users = [ - { 'user': 'barney', 'age': 36 }, - { 'user': 'fred', 'age': 40 }, { 'user': 'barney', 'age': 26 }, + { 'user': 'fred', 'age': 40 }, + { 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 30 } ]; @@ -3119,7 +3126,7 @@ _.map(_.sortByOrder(users, ['user', 'age'], [true, false]), _.values); ### `_.where(collection, source)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7032 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.where "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7051 "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 @@ -3164,7 +3171,7 @@ _.pluck(_.where(users, { 'pets': ['dino'] }), 'user'); ### `_.now` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7052 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7071 "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). @@ -3189,7 +3196,7 @@ _.defer(function(stamp) { ### `_.after(n, func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7081 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7100 "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. @@ -3221,7 +3228,7 @@ _.forEach(saves, function(type) { ### `_.ary(func, [n=func.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7115 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7134 "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. @@ -3245,7 +3252,7 @@ _.map(['6', '8', '10'], _.ary(parseInt, 1)); ### `_.before(n, func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7139 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7158 "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 @@ -3270,7 +3277,7 @@ jQuery('#add').on('click', _.before(5, addContactToList)); ### `_.bind(func, thisArg, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7195 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7214 "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 @@ -3316,7 +3323,7 @@ bound('hi'); ### `_.bindAll(object, [methodNames])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7234 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7253 "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 @@ -3353,7 +3360,7 @@ jQuery('#docs').on('click', view.onClick); ### `_.bindKey(object, key, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7286 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7305 "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. @@ -3408,7 +3415,7 @@ bound('hi'); ### `_.curry(func, [arity=func.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7337 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7356 "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 @@ -3458,7 +3465,7 @@ curried(1)(_, 3)(2); ### `_.curryRight(func, [arity=func.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7383 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7402 "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`. @@ -3505,7 +3512,7 @@ curried(3)(1, _)(2); ### `_.debounce(func, [wait=0], [options])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7454 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7473 "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 @@ -3575,7 +3582,7 @@ delete models.todo; ### `_.defer(func, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7585 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7604 "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. @@ -3601,7 +3608,7 @@ _.defer(function(text) { ### `_.delay(func, wait, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7607 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7626 "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. @@ -3628,7 +3635,7 @@ _.delay(function(text) { ### `_.flow([funcs])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7631 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7650 "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 @@ -3657,7 +3664,7 @@ addSquare(1, 2); ### `_.flowRight([funcs])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7653 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7672 "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. @@ -3685,7 +3692,7 @@ addSquare(1, 2); ### `_.memoize(func, [resolver])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7708 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7727 "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 @@ -3748,7 +3755,7 @@ identity(other); ### `_.negate(predicate)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7747 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7766 "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 @@ -3776,7 +3783,7 @@ _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); ### `_.once(func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7773 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7792 "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 @@ -3802,7 +3809,7 @@ initialize(); ### `_.partial(func, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7809 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7828 "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 @@ -3845,7 +3852,7 @@ greetFred('hi'); ### `_.partialRight(func, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7847 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7866 "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. @@ -3887,7 +3894,7 @@ sayHelloTo('fred'); ### `_.rearg(func, indexes)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7882 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7901 "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 @@ -3923,7 +3930,7 @@ map(function(n) { ### `_.spread(func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7917 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7936 "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 the array of arguments provided to the created @@ -3962,7 +3969,7 @@ numbers.then(_.spread(function(x, y) { ### `_.throttle(func, [wait=0], [options])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L7965 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L7984 "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 @@ -4010,7 +4017,7 @@ jQuery(window).on('popstate', throttled.cancel); ### `_.wrap(value, wrapper)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8005 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8024 "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 @@ -4046,7 +4053,7 @@ p('fred, barney, & pebbles'); ### `_.clone(value, [isDeep], [customizer], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8063 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8082 "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 @@ -4107,7 +4114,7 @@ el.childNodes.length; ### `_.cloneDeep(value, [customizer], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8121 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8140 "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 @@ -4162,7 +4169,7 @@ el.childNodes.length; ### `_.isArguments(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8142 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8161 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") Checks if `value` is classified as an `arguments` object. @@ -4187,7 +4194,7 @@ _.isArguments([1, 2, 3]); ### `_.isArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8171 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8190 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") Checks if `value` is classified as an `Array` object. @@ -4212,7 +4219,7 @@ _.isArray(function() { return arguments; }()); ### `_.isBoolean(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8191 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8210 "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. @@ -4237,7 +4244,7 @@ _.isBoolean(null); ### `_.isDate(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8211 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8230 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") Checks if `value` is classified as a `Date` object. @@ -4262,7 +4269,7 @@ _.isDate('Mon April 23 2012'); ### `_.isElement(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8231 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8250 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") Checks if `value` is a DOM element. @@ -4287,7 +4294,7 @@ _.isElement(''); ### `_.isEmpty(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8269 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8288 "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 @@ -4323,7 +4330,7 @@ _.isEmpty({ 'a': 1 }); ### `_.isEqual(value, other, [customizer], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8324 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8343 "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. @@ -4376,7 +4383,7 @@ _.isEqual(array, other, function(value, other) { ### `_.isError(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8350 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8369 "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. @@ -4402,7 +4409,7 @@ _.isError(Error); ### `_.isFinite(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8383 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8402 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") Checks if `value` is a finite primitive number.
@@ -4441,7 +4448,7 @@ _.isFinite(Infinity); ### `_.isFunction(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8403 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8422 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") Checks if `value` is classified as a `Function` object. @@ -4466,7 +4473,7 @@ _.isFunction(/abc/); ### `_.isMatch(object, source, [customizer], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8478 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8497 "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 @@ -4515,7 +4522,7 @@ _.isMatch(object, source, function(value, other) { ### `_.isNaN(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8527 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8546 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") Checks if `value` is `NaN`.
@@ -4551,7 +4558,7 @@ _.isNaN(undefined); ### `_.isNative(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8549 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8568 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") Checks if `value` is a native function. @@ -4576,7 +4583,7 @@ _.isNative(_); ### `_.isNull(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8576 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8595 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") Checks if `value` is `null`. @@ -4601,7 +4608,7 @@ _.isNull(void 0); ### `_.isNumber(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8602 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8621 "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.
@@ -4633,7 +4640,7 @@ _.isNumber('8.4'); ### `_.isObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8432 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8451 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") Checks if `value` is the language type of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) @@ -4665,7 +4672,7 @@ _.isObject(1); ### `_.isPlainObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8636 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8655 "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`. @@ -4705,7 +4712,7 @@ _.isPlainObject(Object.create(null)); ### `_.isRegExp(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8664 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8683 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") Checks if `value` is classified as a `RegExp` object. @@ -4730,7 +4737,7 @@ _.isRegExp('/abc/'); ### `_.isString(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8684 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8703 "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. @@ -4755,7 +4762,7 @@ _.isString(1); ### `_.isTypedArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8704 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8723 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") Checks if `value` is classified as a typed array. @@ -4780,7 +4787,7 @@ _.isTypedArray([]); ### `_.isUndefined(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8724 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8743 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") Checks if `value` is `undefined`. @@ -4805,7 +4812,7 @@ _.isUndefined(null); ### `_.toArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8743 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8762 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") Converts `value` to an array. @@ -4829,7 +4836,7 @@ Converts `value` to an array. ### `_.toPlainObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8779 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8798 "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. @@ -4867,7 +4874,7 @@ _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); ### `_.add(augend, addend)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L11160 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L11190 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") Adds two numbers. @@ -4890,7 +4897,7 @@ _.add(6, 4); ### `_.max(collection, [iteratee], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L11211 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L11241 "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 @@ -4949,7 +4956,7 @@ _.max(users, 'age'); ### `_.min(collection, [iteratee], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L11260 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L11290 "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 @@ -5008,7 +5015,7 @@ _.min(users, 'age'); ### `_.sum(collection)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L11278 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L11308 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") Gets the sum of the values in `collection`. @@ -5039,7 +5046,7 @@ _.sum({ 'a': 4, 'b': 6, 'c': 2 }); ### `_.inRange(n, [start=0], end)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9709 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9728 "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`. @@ -5079,7 +5086,7 @@ _.inRange(5.2, 4); ### `_.random([min=0], [max=1], [floating])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9747 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9766 "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. @@ -5121,7 +5128,7 @@ _.random(1.2, 5.2); ### `_.assign(object, [sources], [customizer], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8814 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8833 "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. @@ -5158,7 +5165,7 @@ defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); ### `_.create(prototype, [properties])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8850 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8869 "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 @@ -5200,7 +5207,7 @@ circle instanceof Shape; ### `_.defaults(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8874 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8893 "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 @@ -5225,7 +5232,7 @@ _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); ### `_.findKey(object, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8931 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L8950 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package") This method is like `_.findIndex` except that it returns the key of the first element `predicate` returns truthy for, instead of the element itself. @@ -5284,7 +5291,7 @@ _.findKey(users, 'active'); ### `_.findLastKey(object, [predicate=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L8984 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9003 "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. @@ -5343,7 +5350,7 @@ _.findLastKey(users, 'active'); ### `_.forIn(object, [iteratee=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9016 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9035 "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 @@ -5379,7 +5386,7 @@ _.forIn(new Foo, function(value, key) { ### `_.forInRight(object, [iteratee=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9048 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9067 "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. @@ -5413,7 +5420,7 @@ _.forInRight(new Foo, function(value, key) { ### `_.forOwn(object, [iteratee=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9080 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9099 "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 @@ -5449,7 +5456,7 @@ _.forOwn(new Foo, function(value, key) { ### `_.forOwnRight(object, [iteratee=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9112 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9131 "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. @@ -5483,7 +5490,7 @@ _.forOwnRight(new Foo, function(value, key) { ### `_.functions(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9132 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9151 "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`. @@ -5506,7 +5513,7 @@ _.functions(_); ### `_.has(object, key)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9153 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9172 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") Checks if `key` exists as a direct property of `object` instead of an inherited property. @@ -5532,7 +5539,7 @@ _.has(object, 'b'); ### `_.invert(object, [multiValue])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9180 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9199 "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 @@ -5563,7 +5570,7 @@ _.invert(object, true); ### `_.keys(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9234 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9253 "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`.
@@ -5600,7 +5607,7 @@ _.keys('hi'); ### `_.keysIn(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9268 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9287 "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`.
@@ -5632,7 +5639,7 @@ _.keysIn(new Foo); ### `_.mapValues(object, [iteratee=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9367 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9386 "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 @@ -5684,7 +5691,7 @@ _.mapValues(users, 'age'); ### `_.merge(object, [sources], [customizer], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9425 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9444 "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 @@ -5741,7 +5748,7 @@ _.merge(object, other, function(a, b) { ### `_.omit(object, [predicate], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9455 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9474 "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. @@ -5776,7 +5783,7 @@ _.omit(object, _.isNumber); ### `_.pairs(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9483 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pairs "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9502 "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]]`. @@ -5799,7 +5806,7 @@ _.pairs({ 'barney': 36, 'fred': 40 }); ### `_.pick(object, [predicate], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9522 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9541 "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 @@ -5832,7 +5839,7 @@ _.pick(object, _.isString); ### `_.result(object, key, [defaultValue])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9561 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9580 "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 @@ -5870,7 +5877,7 @@ _.result(object, 'status', _.constant('busy')); ### `_.transform(object, [iteratee=_.identity], [accumulator], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9598 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9617 "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 @@ -5908,7 +5915,7 @@ _.transform({ 'a': 1, 'b': 2 }, function(result, n, key) { ### `_.values(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9645 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9664 "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`.
@@ -5943,7 +5950,7 @@ _.values('hi'); ### `_.valuesIn(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9672 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9691 "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`. @@ -5982,7 +5989,7 @@ _.valuesIn(new Foo); ### `_.camelCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9804 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9823 "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. @@ -6011,7 +6018,7 @@ _.camelCase('__foo_bar__'); ### `_.capitalize([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9822 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9841 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package") Capitalizes the first character of `string`. @@ -6033,7 +6040,7 @@ _.capitalize('fred'); ### `_.deburr([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9842 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9861 "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) @@ -6057,7 +6064,7 @@ _.deburr('déjà vu'); ### `_.endsWith([string=''], [target], [position=string.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9868 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9887 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") Checks if `string` ends with the given target string. @@ -6087,7 +6094,7 @@ _.endsWith('abc', 'b', 2); ### `_.escape([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9909 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9932 "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. @@ -6132,7 +6139,7 @@ _.escape('fred, barney, & pebbles'); ### `_.escapeRegExp([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9931 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9954 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") Escapes the `RegExp` special characters "\", "^", "$", ".", "|", "?", "*", "+", "(", ")", "[", "]", "{" and "}" in `string`. @@ -6155,7 +6162,7 @@ _.escapeRegExp('[lodash](https://lodash.com/)'); ### `_.kebabCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9959 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L9982 "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 @@ -6185,7 +6192,7 @@ _.kebabCase('__foo_bar__'); ### `_.pad([string=''], [length=0], [chars=' '])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L9986 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10009 "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 then the given padding length. The `chars` string may be truncated if the number of padding @@ -6217,7 +6224,7 @@ _.pad('abc', 3); ### `_.padLeft([string=''], [length=0], [chars=' '])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10025 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padleft "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10048 "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 then the given padding length. The `chars` string may be truncated if the number of padding @@ -6249,7 +6256,7 @@ _.padLeft('abc', 3); ### `_.padRight([string=''], [length=0], [chars=' '])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10053 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10076 "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 then the given padding length. The `chars` string may be truncated if the number of padding @@ -6281,7 +6288,7 @@ _.padRight('abc', 3); ### `_.parseInt(string, [radix])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10081 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10104 "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, @@ -6313,7 +6320,7 @@ _.map(['6', '08', '10'], _.parseInt); ### `_.repeat([string=''], [n=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10123 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10146 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") Repeats the given string `n` times. @@ -6342,7 +6349,7 @@ _.repeat('abc', 0); ### `_.snakeCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10163 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10186 "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. @@ -6371,7 +6378,7 @@ _.snakeCase('--foo-bar'); ### `_.startCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10188 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10211 "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) @@ -6401,7 +6408,7 @@ _.startCase('__foo_bar__'); ### `_.startsWith([string=''], [target], [position=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10213 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10236 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") Checks if `string` starts with the given target string. @@ -6431,7 +6438,7 @@ _.startsWith('abc', 'b', 1); ### `_.template([string=''], [options])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10315 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10341 "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 @@ -6538,7 +6545,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\ ### `_.trim([string=''], [chars=whitespace])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10442 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10468 "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`. @@ -6567,7 +6574,7 @@ _.map([' foo ', ' bar '], _.trim); ### `_.trimLeft([string=''], [chars=whitespace])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10473 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimleft "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10499 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimleft "See the npm package") Removes leading whitespace or specified characters from `string`. @@ -6593,7 +6600,7 @@ _.trimLeft('-_-abc-_-', '_-'); ### `_.trimRight([string=''], [chars=whitespace])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10503 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10529 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimright "See the npm package") Removes trailing whitespace or specified characters from `string`. @@ -6619,7 +6626,7 @@ _.trimRight('-_-abc-_-', '_-'); ### `_.trunc([string=''], [options], [options.length=30], [options.omission='...'], [options.separator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10555 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trunc "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10581 "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 @@ -6667,7 +6674,7 @@ _.trunc('hi-diddly-ho there, neighborino', { ### `_.unescape([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10625 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10651 "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 @@ -6695,7 +6702,7 @@ _.unescape('fred, barney, & pebbles'); ### `_.words([string=''], [pattern])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10650 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10676 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") Splits `string` into an array of its words. @@ -6727,7 +6734,7 @@ _.words('fred, barney, & pebbles', /[^, ]+/g); ### `_.attempt(func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10680 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10706 "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. @@ -6756,7 +6763,7 @@ if (_.isError(elements)) { ### `_.callback([func=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10733 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.callback "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10759 "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 @@ -6801,7 +6808,7 @@ _.filter(users, 'age__gt36'); ### `_.constant(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10758 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10784 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") Creates a function that returns `value`. @@ -6826,7 +6833,7 @@ getter() === object; ### `_.identity(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10779 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10805 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") This method returns the first argument provided to it. @@ -6850,7 +6857,7 @@ _.identity(object) === object; ### `_.matches(source)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10808 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10834 "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 @@ -6885,7 +6892,7 @@ _.filter(users, _.matches({ 'age': 40, 'active': false })); ### `_.matchesProperty(key, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10837 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10863 "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 object to `value`. @@ -6920,7 +6927,7 @@ _.find(users, _.matchesProperty('user', 'fred')); ### `_.mixin([object=this], source, [options])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10877 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10903 "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 @@ -6964,7 +6971,7 @@ _('fred').vowels(); ### `_.noConflict()` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10940 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10970 "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. @@ -6983,7 +6990,7 @@ var lodash = _.noConflict(); ### `_.noop()` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10959 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L10989 "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. @@ -7002,7 +7009,7 @@ _.noop(object) === undefined; ### `_.property(key)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L10986 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L11016 "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. @@ -7034,7 +7041,7 @@ _.pluck(_.sortBy(users, getName), 'user'); ### `_.propertyOf(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L11009 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L11039 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package") The inverse of `_.property`; this method creates a function which returns the property value of a given key on `object`. @@ -7062,7 +7069,7 @@ _.sortBy(['a', 'b', 'c'], _.propertyOf(object)); ### `_.range([start=0], end, [step=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L11048 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L11078 "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 @@ -7104,7 +7111,7 @@ _.range(0); ### `_.runInContext([context=root])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L694 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L693 "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. @@ -7148,7 +7155,7 @@ var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; ### `_.times(n, [iteratee=_.identity], [thisArg])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L11101 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L11131 "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 @@ -7184,7 +7191,7 @@ _.times(3, function(n) { ### `_.uniqueId([prefix])` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L11139 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L11169 "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. @@ -7215,7 +7222,7 @@ _.uniqueId(); ### `_.templateSettings.imports._` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1182 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1186 "View in source") [Ⓣ][1] A reference to the `lodash` function. @@ -7232,7 +7239,7 @@ A reference to the `lodash` function. ### `_.VERSION` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L11560 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L11590 "View in source") [Ⓣ][1] (string): The semantic version number. @@ -7243,7 +7250,7 @@ A reference to the `lodash` function. ### `_.support` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L971 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.support "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L975 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.support "See the npm package") (Object): An object environment feature flags. @@ -7254,7 +7261,7 @@ A reference to the `lodash` function. ### `_.support.argsTag` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L988 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L992 "View in source") [Ⓣ][1] (boolean): Detect if the `toStringTag` of `arguments` objects is resolvable (all but Firefox < 4, IE < 9). @@ -7266,7 +7273,7 @@ A reference to the `lodash` function. ### `_.support.enumErrorProps` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L997 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1001 "View in source") [Ⓣ][1] (boolean): Detect if `name` or `message` properties of `Error.prototype` are enumerable by default (IE < 9, Safari < 5.1). @@ -7278,7 +7285,7 @@ enumerable by default (IE < 9, Safari < 5.1). ### `_.support.enumPrototypes` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1011 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1015 "View in source") [Ⓣ][1] (boolean): Detect if `prototype` properties are enumerable by default.
@@ -7295,7 +7302,7 @@ property to `true`. ### `_.support.funcDecomp` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1021 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1025 "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 @@ -7308,7 +7315,7 @@ the PlayStation 3; forced `false` for Windows 8 apps). ### `_.support.funcNames` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1029 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1033 "View in source") [Ⓣ][1] (boolean): Detect if `Function#name` is supported (all but IE). @@ -7319,7 +7326,7 @@ the PlayStation 3; forced `false` for Windows 8 apps). ### `_.support.nodeTag` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1037 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1041 "View in source") [Ⓣ][1] (boolean): Detect if the `toStringTag` of DOM nodes is resolvable (all but IE < 9). @@ -7330,7 +7337,7 @@ the PlayStation 3; forced `false` for Windows 8 apps). ### `_.support.nonEnumShadows` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1058 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1062 "View in source") [Ⓣ][1] (boolean): Detect if properties shadowing those on `Object.prototype` are non-enumerable. @@ -7346,7 +7353,7 @@ are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug). ### `_.support.nonEnumStrings` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1046 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1050 "View in source") [Ⓣ][1] (boolean): Detect if string indexes are non-enumerable (IE < 9, RingoJS, Rhino, Narwhal). @@ -7358,7 +7365,7 @@ are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug). ### `_.support.ownLast` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1066 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1070 "View in source") [Ⓣ][1] (boolean): Detect if own properties are iterated after inherited properties (IE < 9). @@ -7369,7 +7376,7 @@ are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug). ### `_.support.spliceObjects` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1081 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1085 "View in source") [Ⓣ][1] (boolean): Detect if `Array#shift` and `Array#splice` augment array-like objects correctly. @@ -7388,7 +7395,7 @@ is buggy regardless of mode in IE < 9. ### `_.support.unindexedChars` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1092 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1096 "View in source") [Ⓣ][1] (boolean): Detect lack of support for accessing string characters by index.
@@ -7403,7 +7410,7 @@ by index on string literals, not string objects. ### `_.templateSettings` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1134 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1138 "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 @@ -7416,7 +7423,7 @@ alternative delimiters. ### `_.templateSettings.escape` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1142 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1146 "View in source") [Ⓣ][1] (RegExp): Used to detect `data` property values to be HTML-escaped. @@ -7427,7 +7434,7 @@ alternative delimiters. ### `_.templateSettings.evaluate` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1150 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1154 "View in source") [Ⓣ][1] (RegExp): Used to detect code to be evaluated. @@ -7438,7 +7445,7 @@ alternative delimiters. ### `_.templateSettings.imports` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1174 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1178 "View in source") [Ⓣ][1] (Object): Used to import variables into the compiled template. @@ -7449,7 +7456,7 @@ alternative delimiters. ### `_.templateSettings.interpolate` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1158 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1162 "View in source") [Ⓣ][1] (RegExp): Used to detect `data` property values to inject. @@ -7460,7 +7467,7 @@ alternative delimiters. ### `_.templateSettings.variable` -# [Ⓢ](https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js#L1166 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js#L1170 "View in source") [Ⓣ][1] (string): Used to reference the data object in the template text. diff --git a/lodash.js b/lodash.js index 665cb0f02d..c62ae05126 100644 --- a/lodash.js +++ b/lodash.js @@ -1,6 +1,6 @@ /** * @license - * lodash 3.4.0 (Custom Build) + * lodash 3.5.0 (Custom Build) * Build: `lodash modern -o ./lodash.js` * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.2 @@ -13,7 +13,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '3.4.0'; + var VERSION = '3.5.0'; /** Used to compose bitmasks for wrapper metadata. */ var BIND_FLAG = 1, @@ -36,8 +36,8 @@ /** Used to indicate the type of lazy iteratees. */ var LAZY_DROP_WHILE_FLAG = 0, - LAZY_MAP_FLAG = 2, - LAZY_TAKE_WHILE_FLAG = 3; + LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2; /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; @@ -438,9 +438,8 @@ if (result) { if (index >= ordersLength) { return result; - } else { - return orders[index] ? result : result * -1; } + return result * (orders[index] ? 1 : -1); } } // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications @@ -686,7 +685,8 @@ /** Used for native method references. */ var arrayProto = Array.prototype, - objectProto = Object.prototype; + objectProto = Object.prototype, + stringProto = String.prototype; /** Used to detect DOM support. */ var document = (document = context.window) && document.document; @@ -798,9 +798,14 @@ * Chaining is supported in custom builds as long as the `_#value` method is * directly or indirectly included in the build. * - * In addition to lodash methods, wrappers also have the following `Array` methods: - * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, - * and `unshift` + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, + * `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` * * The wrapper methods that support shortcut fusion are: * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, @@ -1061,7 +1066,6 @@ result.__actions__ = actions ? arrayCopy(actions) : null; result.__dir__ = this.__dir__; - result.__dropCount__ = this.__dropCount__; result.__filtered__ = this.__filtered__; result.__iteratees__ = iteratees ? arrayCopy(iteratees) : null; result.__takeCount__ = this.__takeCount__; @@ -1108,9 +1112,8 @@ start = view.start, end = view.end, length = end - start, - dropCount = this.__dropCount__, + index = isRight ? end : (start - 1), takeCount = nativeMin(length, this.__takeCount__), - index = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees ? iteratees.length : 0, resIndex = 0, @@ -1128,28 +1131,32 @@ iteratee = data.iteratee, type = data.type; - if (type != LAZY_DROP_WHILE_FLAG) { - var computed = iteratee(value); - } else { - data.done = data.done && (isRight ? index < data.index : index > data.index); + if (type == LAZY_DROP_WHILE_FLAG) { + if (data.done && (isRight ? (index > data.index) : (index < data.index))) { + data.count = 0; + data.done = false; + } data.index = index; - computed = data.done || (data.done = !iteratee(value)); - } - if (type == LAZY_MAP_FLAG) { - value = computed; - } else if (!computed) { - if (type == LAZY_TAKE_WHILE_FLAG) { - break outer; - } else { - continue outer; + if (!data.done) { + var limit = data.limit; + if (!(data.done = limit > -1 ? (data.count++ >= limit) : !iteratee(value))) { + continue outer; + } + } + } else { + var computed = iteratee(value); + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } } } } - if (dropCount) { - dropCount--; - } else { - result[resIndex++] = value; - } + result[resIndex++] = value; } return result; } @@ -1569,7 +1576,7 @@ value = object[key], result = customizer(value, source[key], key, object, source); - if ((result === result ? result !== value : value === value) || + if ((result === result ? (result !== value) : (value === value)) || (typeof value == 'undefined' && !(key in object))) { object[key] = result; } @@ -1916,7 +1923,7 @@ if (end < 0) { end += length; } - length = start > end ? 0 : end >>> 0; + length = start > end ? 0 : (end >>> 0); start >>>= 0; while (start < length) { @@ -2403,7 +2410,7 @@ result = srcValue; } if ((isSrcArr || typeof result != 'undefined') && - (isCommon || (result === result ? result !== value : value === value))) { + (isCommon || (result === result ? (result !== value) : (value === value)))) { object[key] = result; } }); @@ -2463,7 +2470,7 @@ if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); - } else if (result === result ? result !== value : value === value) { + } else if (result === result ? (result !== value) : (value === value)) { object[key] = result; } } @@ -2575,7 +2582,7 @@ if (end < 0) { end += length; } - length = start > end ? 0 : (end - start) >>> 0; + length = start > end ? 0 : ((end - start) >>> 0); start >>>= 0; var result = Array(length); @@ -3046,7 +3053,8 @@ var Ctor = createCtorWrapper(func); function wrapper() { - return (this instanceof wrapper ? Ctor : func).apply(thisArg, arguments); + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(thisArg, arguments); } return wrapper; } @@ -3073,7 +3081,7 @@ return function() { var length = arguments.length, index = length, - fromIndex = fromRight ? length - 1 : 0; + fromIndex = fromRight ? (length - 1) : 0; if (!length) { return function() { return arguments[0]; }; @@ -3249,7 +3257,8 @@ if (isAry && ary < args.length) { args.length = ary; } - return (this instanceof wrapper ? (Ctor || createCtorWrapper(func)) : func).apply(thisBinding, args); + var fn = (this && this !== root && this instanceof wrapper) ? (Ctor || createCtorWrapper(func)) : func; + return fn.apply(thisBinding, args); } return wrapper; } @@ -3308,7 +3317,8 @@ while (argsLength--) { args[leftIndex++] = arguments[++argsIndex]; } - return (this instanceof wrapper ? Ctor : func).apply(isBind ? thisArg : this, args); + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, args); } return wrapper; } @@ -3526,8 +3536,10 @@ othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { return false; } } @@ -3553,7 +3565,8 @@ baseEach(collection, function(value, index, collection) { var current = iteratee(value, index, collection); - if ((isMin ? current < computed : current > computed) || (current === exValue && current === result)) { + if ((isMin ? (current < computed) : (current > computed)) || + (current === exValue && current === result)) { computed = current; result = value; } @@ -3765,7 +3778,7 @@ } if (prereq) { var other = object[index]; - return value === value ? value === other : other !== other; + return value === value ? (value === other) : (other !== other); } return false; } @@ -4626,7 +4639,10 @@ var index = binaryIndex(array, value), other = array[index]; - return (value === value ? value === other : other !== other) ? index : -1; + if (value === value ? (value === other) : (other !== other)) { + return index; + } + return -1; } return baseIndexOf(array, value, fromIndex || 0); } @@ -4762,7 +4778,10 @@ } else if (fromIndex) { index = binaryIndex(array, value, true) - 1; var other = array[index]; - return (value === value ? value === other : other !== other) ? index : -1; + if (value === value ? (value === other) : (other !== other)) { + return index; + } + return -1; } if (value !== value) { return indexOfNaN(array, index, true); @@ -6784,13 +6803,14 @@ * @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- {Object} [guard] Enables use as a callback for functions like `_.reduce`. * @returns {Array} Returns the new sorted array. * @example * * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, * { 'user': 'barney', 'age': 26 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 }, * { 'user': 'fred', 'age': 30 } * ]; * @@ -8036,7 +8056,7 @@ */ function isElement(value) { return (value && value.nodeType === 1 && isObjectLike(value) && - objToString.call(value).indexOf('Element') > -1) || false; + (objToString.call(value).indexOf('Element') > -1)) || false; } // Fallback for environments without DOM support. if (!support.dom) { @@ -9040,7 +9060,7 @@ length = object.length; } if ((typeof Ctor == 'function' && Ctor.prototype === object) || - (typeof object != 'function' && (length && isLength(length)))) { + (typeof object != 'function' && (length && isLength(length)))) { return shimKeys(object); } return isObject(object) ? nativeKeys(object) : []; @@ -9644,7 +9664,11 @@ target = (target + ''); var length = string.length; - position = (typeof position == 'undefined' ? length : nativeMin(position < 0 ? 0 : (+position || 0), length)) - target.length; + position = typeof position == 'undefined' + ? length + : nativeMin(position < 0 ? 0 : (+position || 0), length); + + position -= target.length; return position >= 0 && string.indexOf(target, position) == position; } @@ -9986,7 +10010,10 @@ */ function startsWith(string, target, position) { string = baseToString(string); - position = position == null ? 0 : nativeMin(position < 0 ? 0 : (+position || 0), string.length); + position = position == null + ? 0 + : nativeMin(position < 0 ? 0 : (+position || 0), string.length); + return string.lastIndexOf(target, position) == position; } @@ -10336,7 +10363,7 @@ if (options != null) { if (isObject(options)) { var separator = 'separator' in options ? options.separator : separator; - length = 'length' in options ? +options.length || 0 : length; + length = 'length' in options ? (+options.length || 0) : length; omission = 'omission' in options ? baseToString(options.omission) : omission; } else { length = +options || 0; @@ -10454,7 +10481,7 @@ function attempt() { var func = arguments[0], length = arguments.length, - args = Array(length ? length - 1 : 0); + args = Array(length ? (length - 1) : 0); while (--length > 0) { args[length - 1] = arguments[length]; @@ -10685,7 +10712,11 @@ var chainAll = this.__chain__; if (chain || chainAll) { var result = object(this.__wrapped__); - (result.__actions__ = arrayCopy(this.__actions__)).push({ 'func': func, 'args': arguments, 'thisArg': object }); + (result.__actions__ = arrayCopy(this.__actions__)).push({ + 'func': func, + 'args': arguments, + 'thisArg': object + }); result.__chain__ = chainAll; return result; } @@ -11348,24 +11379,35 @@ result = (filtered && isDropWhile) ? new LazyWrapper(this) : this.clone(), iteratees = result.__iteratees__ || (result.__iteratees__ = []); + iteratees.push({ + 'done': false, + 'count': 0, + 'index': 0, + 'iteratee': getCallback(iteratee, thisArg, 1), + 'limit': -1, + 'type': type + }); + result.__filtered__ = filtered || isFilter; - iteratees.push({ 'done': false, 'index': 0, 'iteratee': getCallback(iteratee, thisArg, 1), 'type': type }); return result; }; }); // Add `LazyWrapper` methods for `_.drop` and `_.take` variants. arrayEach(['drop', 'take'], function(methodName, index) { - var countName = '__' + methodName + 'Count__', - whileName = methodName + 'While'; + var whileName = methodName + 'While'; LazyWrapper.prototype[methodName] = function(n) { - n = n == null ? 1 : nativeMax(floor(n) || 0, 0); + var filtered = this.__filtered__, + result = (filtered && !index) ? this.dropWhile() : this.clone(); - var result = this.clone(); - if (result.__filtered__) { - var value = result[countName]; - result[countName] = index ? nativeMin(value, n) : (value + n); + n = n == null ? 1 : nativeMax(floor(n) || 0, 0); + if (filtered) { + if (index) { + result.__takeCount__ = nativeMin(result.__takeCount__, n); + } else { + last(result.__iteratees__).limit = n; + } } else { var views = result.__views__ || (result.__views__ = []); views.push({ 'size': n, 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') }); @@ -11481,11 +11523,11 @@ }; }); - // Add `Array.prototype` functions to `lodash.prototype`. - arrayEach(['concat', 'join', 'pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { - var func = arrayProto[methodName], + // Add `Array` and `String` methods to `lodash.prototype`. + arrayEach(['concat', 'join', 'pop', 'push', 'replace', 'shift', 'sort', 'splice', 'split', 'unshift'], function(methodName) { + var func = (/^(?:replace|split)$/.test(methodName) ? stringProto : arrayProto)[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', - retUnwrapped = /^(?:join|pop|shift)$/.test(methodName); + retUnwrapped = /^(?:join|pop|replace|shift)$/.test(methodName); lodash.prototype[methodName] = function() { var args = arguments; diff --git a/lodash.min.js b/lodash.min.js index a691b0d255..8e2e7c364d 100644 --- a/lodash.min.js +++ b/lodash.min.js @@ -1,89 +1,89 @@ /** * @license - * lodash 3.4.0 (Custom Build) lodash.com/license | Underscore.js 1.8.2 underscorejs.org/LICENSE + * lodash 3.5.0 (Custom Build) lodash.com/license | Underscore.js 1.8.2 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 _(n,t){for(var r=-1,e=n.length,u=-1,o=[];++re&&(e=u)}return e}function Yt(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u=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 _(n,t){for(var r=-1,e=n.length,u=-1,o=[];++re&&(e=u)}return e}function Yt(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++ui(r,a,0)&&u.push(a);return u}function or(n,t){var r=n?n.length:0;if(!ae(r))return _r(n,t);for(var e=-1,u=ge(n);++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,s,0)&&((r||f)&&a.push(s),c.push(l))}return c}function Wr(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(3=o&&f<=i&&(e=I&&t>u||e>u&&t>=I)||o)&&(t&w&&(r[2]=p[2],f|=e&w?0:A),(e=p[3])&&(u=r[3],r[3]=u?Lr(u,e,p[4]):Bt(e),r[4]=u?_(r[3],L):Bt(p[4])),(e=p[5])&&(u=r[5],r[5]=u?Br(u,e,p[6]):Bt(e),r[6]=u?_(r[5],L):Bt(p[6])),(e=p[7])&&(r[7]=Bt(e)),t&O&&(r[8]=null==r[8]?p[8]:io(r[8],p[8])),null==r[9]&&(r[9]=p[9]),r[0]=p[0],r[1]=f),t=r[1],f=r[9] -}return r[9]=null==f?a?0:n.length:oo(f-c,0)||0,(p?xo:ko)(t==w?Mr(r[0],r[2]):t!=E&&t!=(w|E)||r[4].length?Yr.apply(m,r):Gr.apply(m,r),r)}function Xr(n,t,r,e,u,o,i){var f=-1,a=n.length,c=t.length,l=true;if(a!=c&&(!u||c<=a))return false;for(;l&&++fu)||i===e&&i===o)&&(u=i,o=n)}),o}function te(n,t,r){var e=Wt.callback||gu,e=e===gu?tr:e;return r?e(n,t,r):e}function re(n,r,e){var u=Wt.indexOf||we,u=u===we?t:u;return n?u(n,r,e):u}function ee(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&Fu.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function ue(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=Ru),new n -}function oe(n,t,r){var e=n.constructor;switch(t){case G:return $r(n);case D:case M:return new e(+n);case J:case X:case H:case Q:case nt:case tt:case rt:case et:case ut:return t=n.buffer,new e(r?$r(t):t,n.byteOffset,n.length);case K:case Z:return new e(n);case Y:var u=new e(n.source,vt.exec(n));u.lastIndex=n.lastIndex}return u}function ie(n,t){return n=+n,t=null==t?yo:t,-1t?0:t)):[]}function ye(n,t,r){var e=n?n.length:0; -return e?((r?fe(n,t,r):null==t)&&(t=1),t=e-(+t||0),Rr(n,0,0>t?0:t)):[]}function me(n,t,r){var e=-1,u=n?n.length:0;for(t=te(t,r,3);++ee?oo(u+e,0):e;else if(e)return e=Nr(n,r),n=n[e],(r===r?r===n:n!==n)?e:-1;return t(n,r,e||0)}function xe(n){return de(n,1)}function Ae(n,r,e,u){if(!n||!n.length)return[];null!=r&&typeof r!="boolean"&&(u=e,e=fe(n,r,u)?null:r,r=false); -var o=te();if((o!==tr||null!=e)&&(e=o(e,u,3)),r&&re()==t){r=e;var i;e=-1,u=n.length;for(var o=-1,f=[];++e>>0,e=wu(r);++tr?oo(e+r,0):r||0:0,typeof n=="string"||!So(n)&&ru(n)?rarguments.length,or)}function Fe(n,t,r,e){return(So(n)?Zt:Er)(n,te(t,e,4),r,3>arguments.length,ir)}function $e(n,t,r){return(r?fe(n,t,r):null==t)?(n=_e(n),t=n.length,0t?0:+t||0,n.length),n) -}function Le(n){n=_e(n);for(var t=-1,r=n.length,e=wu(r);++t=r||r>t?(f&&Pu(f),r=p,f=s=p=m,r&&(h=Co(),a=n.apply(l,i),s||f||(i=l=null))):s=Ju(e,r)}function u(){s&&Pu(s),f=s=p=m,(g||_!==t)&&(h=Co(),a=n.apply(l,i),s||f||(i=l=null)) -}function o(){if(i=arguments,c=Co(),l=this,p=g&&(s||!v),false===_)var r=v&&!s;else{f||v||(h=c);var o=_-(c-h),d=0>=o||o>_;d?(f&&(f=Pu(f)),h=c,a=n.apply(l,i)):f||(f=Ju(u,o))}return d&&s?s=Pu(s):s||t===_||(s=Ju(e,t)),r&&(d=true,a=n.apply(l,i)),!d||s||f||(i=l=null),a}var i,f,a,c,l,s,p,h=0,_=false,g=true;if(typeof n!="function")throw new Cu($);if(t=0>t?0:+t||0,true===r)var v=true,g=false;else He(r)&&(v=r.leading,_="maxWait"in r&&oo(+r.maxWait||0,t),g="trailing"in r?r.trailing:g);return o.cancel=function(){s&&Pu(s),f&&Pu(f),f=s=p=m -},o}function Ve(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 Cu($);return r.cache=new Ve.Cache,r}function Ye(n){var t=Rr(arguments,1),r=_(t,Ye.placeholder);return Jr(n,E,null,t,r)}function Ze(n){var t=Rr(arguments,1),r=_(t,Ze.placeholder);return Jr(n,R,null,t,r)}function Ge(n){return ae(p(n)?n.length:m)&&Lu.call(n)==B||false}function Je(n){return n&&1===n.nodeType&&p(n)&&-1t||!n||!eo(t))return r;do t%2&&(r+=n),t=Ku(t/2),n+=n;while(t);return r}function pu(n,t,r){var u=n;return(n=e(n))?(r?fe(u,t,r):null==t)?n.slice(g(n),v(n)+1):(t+="",n.slice(o(n,t),i(n,t)+1)):n}function hu(n,t,r){return r&&fe(n,t,r)&&(t=null),n=e(n),n.match(t||Et)||[]}function _u(){for(var n=arguments[0],t=arguments.length,r=wu(t?t-1:0);0<--t;)r[t-1]=arguments[t];try{return n.apply(m,r)}catch(e){return Xe(e)?e:new Au(e)}}function gu(n,t,r){return r&&fe(n,t,r)&&(t=null),p(n)?yu(n):tr(n,t) -}function vu(n){return function(){return n}}function du(n){return n}function yu(n){return wr(rr(n,true))}function mu(n,t,r){if(null==r){var e=He(t),u=e&&Lo(t);((u=u&&u.length&&vr(t,u))?u.length:e)||(u=false,r=t,t=n,n=this)}u||(u=vr(t,Lo(t)));var o=true,e=-1,i=Uo(n),f=u.length;false===r?o=false:He(r)&&"chain"in r&&(o=r.chain);for(;++e>>1,vo=no?no.BYTES_PER_ELEMENT:0,yo=ku.pow(2,53)-1,mo=Qu&&new Qu,bo=Wt.support={};!function(n){bo.funcDecomp=!Qe(h.WinRTError)&&jt.test(y),bo.funcNames=typeof ju.name=="string";try{bo.dom=11===Su.createDocumentFragment().nodeType -}catch(t){bo.dom=false}try{bo.nonEnumArgs=!Zu.call(arguments,1)}catch(r){bo.nonEnumArgs=true}}(0,0),Wt.templateSettings={escape:pt,evaluate:ht,interpolate:_t,variable:"",imports:{_:Wt}};var wo=function(){function n(){}return function(t){if(He(t)){n.prototype=t;var r=new n;n.prototype=null}return r||h.Object()}}(),xo=mo?function(n,t){return mo.set(n,t),n}:du;Mu||($r=Du&&Hu?function(n){var t=n.byteLength,r=no?Ku(t/vo):0,e=r*vo,u=new Du(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 Ao=ro&&Gu?function(n){return new $t(n)}:vu(null),jo=mo?function(n){return mo.get(n)}:bu,ko=function(){var n=0,t=0;return function(r,e){var u=Co(),o=S-(u-t);if(t=u,0=W)return r}else n=0;return xo(r,e)}}(),Eo=zr(function(n,t,r){Fu.call(n,r)?++n[r]:n[r]=1}),Ro=zr(function(n,t,r){Fu.call(n,r)?n[r].push(t):n[r]=[t]}),Io=zr(function(n,t,r){n[r]=t}),Oo=zr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Co=fo||function(){return(new xu).getTime()},To=qr(),Wo=qr(true),So=to||function(n){return p(n)&&ae(n.length)&&Lu.call(n)==z||false -};bo.dom||(Je=function(n){return n&&1===n.nodeType&&p(n)&&!Fo(n)||false});var No=ao||function(n){return typeof n=="number"&&eo(n)},Uo=r(/x/)||Hu&&!r(Hu)?function(n){return Lu.call(n)==P}:r,Fo=Vu?function(n){if(!n||Lu.call(n)!=V)return false;var t=n.valueOf,r=Qe(t)&&(r=Vu(t))&&Vu(r);return r?n==r||Vu(n)==r:pe(n)}:pe,$o=Dr(Ht),Lo=uo?function(n){if(n)var t=n.constructor,r=n.length;return typeof t=="function"&&t.prototype===n||typeof n!="function"&&r&&ae(r)?he(n):He(n)?uo(n):[]}:he,Bo=Dr(Ar),zo=Pr(function(n,t,r){return t=t.toLowerCase(),n+(r?t.charAt(0).toUpperCase()+t.slice(1):t) -}),Do=Pr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()});8!=co(Rt+"08")&&(lu=function(n,t,r){return(r?fe(n,t,r):null==t)?t=0:t&&(t=+t),n=pu(n),co(n,t||(yt.test(n)?16:10))});var Mo=Pr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),qo=Pr(function(n,t,r){return n+(r?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}),Po=Vr(Vt),Ko=Vr(function(n){for(var t=-1,r=n.length,e=po;++t--n?t.apply(this,arguments):void 0 -}},Wt.ary=function(n,t,r){return r&&fe(n,t,r)&&(t=null),t=n&&null==t?n.length:oo(+t||0,0),Jr(n,O,null,null,null,null,t)},Wt.assign=$o,Wt.at=function(n){return ae(n?n.length:0)&&(n=_e(n)),Qt(n,lr(arguments,false,false,1))},Wt.before=ze,Wt.bind=De,Wt.bindAll=function(n){for(var t=n,r=1r&&(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(s?Lt(s,f):o(l,f,0))){for(r=e;--r;){var p=u[r];if(0>(p?Lt(p,f):o(n[r],f,0)))continue n}s&&s.push(f),l.push(f) -}return l},Wt.invert=function(n,t,r){r&&fe(n,t,r)&&(t=null),r=-1;for(var e=Lo(n),u=e.length,o={};++rt?0:t)):[]},Wt.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?fe(n,t,r):null==t)&&(t=1),t=e-(+t||0),Rr(n,0>t?0:t)):[]},Wt.takeRightWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];for(t=te(t,r,3);e--&&t(n[e],e,n););return Rr(n,e+1)},Wt.takeWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];var u=-1;for(t=te(t,r,3);++un||!eo(n))return[];var e=-1,u=wu(io(n,ho));for(t=Fr(t,r,1);++er?0:+r||0,u))-t.length,0<=r&&n.indexOf(t,r)==r},Wt.escape=function(n){return(n=e(n))&&st.test(n)?n.replace(ct,c):n},Wt.escapeRegExp=cu,Wt.every=Ie,Wt.find=Ce,Wt.findIndex=me,Wt.findKey=function(n,t,r){return t=te(t,r,3),cr(n,t,_r,true)},Wt.findLast=function(n,t,r){return t=te(t,r,3),cr(n,t,ir)},Wt.findLastIndex=function(n,t,r){var e=n?n.length:0; -for(t=te(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},Wt.findLastKey=function(n,t,r){return t=te(t,r,3),cr(n,t,gr,true)},Wt.findWhere=function(n,t){return Ce(n,wr(t))},Wt.first=be,Wt.has=function(n,t){return n?Fu.call(n,t):false},Wt.identity=du,Wt.includes=Se,Wt.indexOf=we,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=Nr(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=Po,Wt.min=Ko,Wt.noConflict=function(){return h._=Bu,this},Wt.noop=bu,Wt.now=Co,Wt.pad=function(n,t,r){n=e(n),t=+t;var u=n.length;return ur?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Wt.sum=function(n){So(n)||(n=_e(n));for(var t=n.length,r=0;t--;)r+=+n[t]||0;return r},Wt.template=function(n,t,r){var u=Wt.templateSettings;r&&fe(n,t,r)&&(t=r=null),n=e(n),t=Ht(Ht({},r||t),u,Xt),r=Ht(Ht({},t.imports),u.imports,Xt); -var o,i,f=Lo(r),a=Wr(r,f),c=0;r=t.interpolate||wt;var s="__p+='";r=Iu((t.escape||wt).source+"|"+r.source+"|"+(r===_t?gt:wt).source+"|"+(t.evaluate||wt).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),s+=n.slice(c,a).replace(kt,l),r&&(o=true,s+="'+__e("+r+")+'"),f&&(i=true,s+="';"+f+";\n__p+='"),e&&(s+="'+((__t=("+e+"))==null?'':__t)+'"),c=a+t.length,t}),s+="';",(t=t.variable)||(s="with(obj){"+s+"}"),s=(i?s.replace(ot,""):s).replace(it,"$1").replace(ft,"$1;"),s="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+s+"return __p}",t=_u(function(){return ju(f,p+"return "+s).apply(m,a) -}),t.source=s,Xe(t))throw t;return t},Wt.trim=pu,Wt.trimLeft=function(n,t,r){var u=n;return(n=e(n))?n.slice((r?fe(u,t,r):null==t)?g(n):o(n,t+"")):n},Wt.trimRight=function(n,t,r){var u=n;return(n=e(n))?(r?fe(u,t,r):null==t)?n.slice(0,v(n)+1):n.slice(0,i(n,t+"")+1):n},Wt.trunc=function(n,t,r){r&&fe(n,t,r)&&(t=null);var u=C;if(r=T,null!=t)if(He(t)){var o="separator"in t?t.separator:o,u="length"in t?+t.length||0:u;r="omission"in t?e(t.omission):r}else u=+t||0;if(n=e(n),u>=n.length)return n;if(u-=r.length,1>u)return r; -if(t=n.slice(0,u),null==o)return t+r;if(tu(o)){if(n.slice(u).search(o)){var i,f=n.slice(0,u);for(o.global||(o=Iu(o.source,(vt.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(f);)i=n.index;t=t.slice(0,null==i?u:i)}}else n.indexOf(o,u)!=u&&(o=t.lastIndexOf(o),-1u.__dir__?"Right":"")});return u},Ut.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()},Ut.prototype[n+"RightWhile"]=function(n,t){return this.reverse()[e](n,t).reverse() -}}),Mt(["first","last"],function(n,t){var r="take"+(t?"Right":"");Ut.prototype[n]=function(){return this[r](1).value()[0]}}),Mt(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");Ut.prototype[n]=function(){return this[r](1)}}),Mt(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?wr:jr;Ut.prototype[n]=function(n){return this[r](e(n))}}),Ut.prototype.compact=function(){return this.filter(du)},Ut.prototype.reject=function(n,t){return n=te(n,t,1),this.filter(function(t){return!n(t) -})},Ut.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},Ut.prototype.toArray=function(){return this.drop(0)},_r(Ut.prototype,function(n,t){var r=Wt[t],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 Ut,l=o[0],s=c||So(f); -return s&&e&&typeof l=="function"&&1!=l.length&&(c=s=false),c=c&&!a,u&&!i?c?n.call(f):r.call(Wt,this.value()):s?(f=n.apply(c?f:new Ut(this),o),u||!a&&!f.__actions__||(f.__actions__||(f.__actions__=[])).push({func:Re,args:[t],thisArg:Wt}),new Nt(f,i)):this.thru(t)}}),Mt("concat join pop push shift sort splice unshift".split(" "),function(n){var t=Tu[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|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) -})}}),Ut.prototype.clone=function(){var n=this.__actions__,t=this.__iteratees__,r=this.__views__,e=new Ut(this.__wrapped__);return e.__actions__=n?Bt(n):null,e.__dir__=this.__dir__,e.__dropCount__=this.__dropCount__,e.__filtered__=this.__filtered__,e.__iteratees__=t?Bt(t):null,e.__takeCount__=this.__takeCount__,e.__views__=r?Bt(r):null,e},Ut.prototype.reverse=function(){if(this.__filtered__){var n=new Ut(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Ut.prototype.value=function(){var n=this.__wrapped__.value(); -if(!So(n))return Sr(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;++ih.index),h.index=i,h=h.done||(h.done=!_(p))),g==U)p=h;else if(!h){if(g==F)break n;continue n}}u?u--:l[c++]=p}return l},Wt.prototype.chain=function(){return Ee(this)},Wt.prototype.commit=function(){return new Nt(this.value(),this.__chain__)},Wt.prototype.plant=function(n){for(var t,r=this;r instanceof St;){var e=ve(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 Ut?(this.__actions__.length&&(n=new Ut(this)),new Nt(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 Sr(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 m,b="3.4.0",w=1,x=2,A=4,j=8,k=16,E=32,R=64,I=128,O=256,C=30,T="...",W=150,S=16,N=0,U=2,F=3,$="Expected a function",L="__lodash_placeholder__",B="[object Arguments]",z="[object Array]",D="[object Boolean]",M="[object Date]",q="[object Error]",P="[object Function]",K="[object Number]",V="[object Object]",Y="[object RegExp]",Z="[object String]",G="[object ArrayBuffer]",J="[object Float32Array]",X="[object Float64Array]",H="[object Int8Array]",Q="[object Int16Array]",nt="[object Int32Array]",tt="[object Uint8Array]",rt="[object Uint8ClampedArray]",et="[object Uint16Array]",ut="[object Uint32Array]",ot=/\b__p\+='';/g,it=/\b(__p\+=)''\+/g,ft=/(__e\(.*?\)|\b__t\))\+'';/g,at=/&(?:amp|lt|gt|quot|#39|#96);/g,ct=/[&<>"'`]/g,lt=RegExp(at.source),st=RegExp(ct.source),pt=/<%-([\s\S]+?)%>/g,ht=/<%([\s\S]+?)%>/g,_t=/<%=([\s\S]+?)%>/g,gt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vt=/\w*$/,dt=/^\s*function[ \n\r\t]+\w/,yt=/^0[xX]/,mt=/^\[object .+?Constructor\]$/,bt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,wt=/($^)/,xt=/[.*+?^${}()|[\]\/\\]/g,At=RegExp(xt.source),jt=/\bthis\b/,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"),Rt=" \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",It="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 WinRTError".split(" "),Ot={}; -Ot[J]=Ot[X]=Ot[H]=Ot[Q]=Ot[nt]=Ot[tt]=Ot[rt]=Ot[et]=Ot[ut]=true,Ot[B]=Ot[z]=Ot[G]=Ot[D]=Ot[M]=Ot[q]=Ot[P]=Ot["[object Map]"]=Ot[K]=Ot[V]=Ot[Y]=Ot["[object Set]"]=Ot[Z]=Ot["[object WeakMap]"]=false;var Ct={};Ct[B]=Ct[z]=Ct[G]=Ct[D]=Ct[M]=Ct[J]=Ct[X]=Ct[H]=Ct[Q]=Ct[nt]=Ct[K]=Ct[V]=Ct[Y]=Ct[Z]=Ct[tt]=Ct[rt]=Ct[et]=Ct[ut]=true,Ct[q]=Ct[P]=Ct["[object Map]"]=Ct["[object Set]"]=Ct["[object WeakMap]"]=false;var Tt={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"},St={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Nt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ut={"function":true,object:true},Ft={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$t=Ut[typeof exports]&&exports&&!exports.nodeType&&exports,Lt=Ut[typeof module]&&module&&!module.nodeType&&module,Ut=Ut[typeof window]&&window,Bt=Lt&&Lt.exports===$t&&$t,zt=$t&&Lt&&typeof global=="object"&&global||Ut!==(this&&this.window)&&Ut||this,Dt=y(); +}),u}function lr(n,t,r,e){e-=1;for(var 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=xu(u);++eu(a,s,0)&&((r||f)&&a.push(s),c.push(l))}return c}function Tr(n,t){for(var r=-1,e=t.length,u=xu(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(3=o&&f<=i&&(e=I&&t>u||e>u&&t>=I)||o)&&(t&w&&(r[2]=p[2],f|=e&w?0:A),(e=p[3])&&(u=r[3],r[3]=u?Lr(u,e,p[4]):Bt(e),r[4]=u?_(r[3],L):Bt(p[4])),(e=p[5])&&(u=r[5],r[5]=u?Br(u,e,p[6]):Bt(e),r[6]=u?_(r[5],L):Bt(p[6])),(e=p[7])&&(r[7]=Bt(e)),t&O&&(r[8]=null==r[8]?p[8]:ao(r[8],p[8])),null==r[9]&&(r[9]=p[9]),r[0]=p[0],r[1]=f),t=r[1],f=r[9] +}return r[9]=null==f?a?0:n.length:fo(f-c,0)||0,(p?jo:Ro)(t==w?Mr(r[0],r[2]):t!=E&&t!=(w|E)||r[4].length?Yr.apply(m,r):Gr.apply(m,r),r)}function Xr(n,t,r,e,u,o,i){var f=-1,a=n.length,c=t.length,l=true;if(a!=c&&(!u||c<=a))return false;for(;l&&++fu)||i===e&&i===o)&&(u=i,o=n)}),o}function te(n,t,r){var e=Tt.callback||vu,e=e===vu?tr:e;return r?e(n,t,r):e}function re(n,r,e){var u=Tt.indexOf||we,u=u===we?t:u;return n?u(n,r,e):u}function ee(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&Lu.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function ue(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=Iu),new n +}function oe(n,t,r){var e=n.constructor;switch(t){case G:return $r(n);case D:case M:return new e(+n);case J:case X:case H:case Q:case nt:case tt:case rt:case et:case ut:return t=n.buffer,new e(r?$r(t):t,n.byteOffset,n.length);case K:case Z:return new e(n);case Y:var u=new e(n.source,vt.exec(n));u.lastIndex=n.lastIndex}return u}function ie(n,t){return n=+n,t=null==t?bo:t,-1t?0:t)):[]}function de(n,t,r){var e=n?n.length:0; +return e?((r?fe(n,t,r):null==t)&&(t=1),t=e-(+t||0),Rr(n,0,0>t?0:t)):[]}function me(n,t,r){var e=-1,u=n?n.length:0;for(t=te(t,r,3);++ee?fo(u+e,0):e;else if(e)return e=Nr(n,r),n=n[e],(r===r?r===n:n!==n)?e:-1;return t(n,r,e||0)}function xe(n){var t=n?n.length:0;return t?n[t-1]:m}function Ae(n){return ye(n,1)}function je(n,r,e,u){if(!n||!n.length)return[]; +null!=r&&typeof r!="boolean"&&(u=e,e=fe(n,r,u)?null:r,r=false);var o=te();if((o!==tr||null!=e)&&(e=o(e,u,3)),r&&re()==t){r=e;var i;e=-1,u=n.length;for(var o=-1,f=[];++e>>0,e=xu(r);++tr?fo(e+r,0):r||0:0,typeof n=="string"||!Uo(n)&&eu(n)?rarguments.length,or)}function $e(n,t,r,e){return(Uo(n)?Zt:Er)(n,te(t,e,4),r,3>arguments.length,ir)}function Le(n,t,r){return(r?fe(n,t,r):null==t)?(n=_e(n),t=n.length,0t?0:+t||0,n.length),n) +}function Be(n){n=_e(n);for(var t=-1,r=n.length,e=xu(r);++t=r||r>t?(f&&Vu(f),r=p,f=s=p=m,r&&(h=To(),a=n.apply(l,i),s||f||(i=l=null))):s=Hu(e,r)}function u(){s&&Vu(s),f=s=p=m,(g||_!==t)&&(h=To(),a=n.apply(l,i),s||f||(i=l=null)) +}function o(){if(i=arguments,c=To(),l=this,p=g&&(s||!v),false===_)var r=v&&!s;else{f||v||(h=c);var o=_-(c-h),y=0>=o||o>_;y?(f&&(f=Vu(f)),h=c,a=n.apply(l,i)):f||(f=Hu(u,o))}return y&&s?s=Vu(s):s||t===_||(s=Hu(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,g=true;if(typeof n!="function")throw new Wu($);if(t=0>t?0:+t||0,true===r)var v=true,g=false;else Qe(r)&&(v=r.leading,_="maxWait"in r&&fo(+r.maxWait||0,t),g="trailing"in r?r.trailing:g);return o.cancel=function(){s&&Vu(s),f&&Vu(f),f=s=p=m +},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 Wu($);return r.cache=new Ye.Cache,r}function Ze(n){var t=Rr(arguments,1),r=_(t,Ze.placeholder);return Jr(n,E,null,t,r)}function Ge(n){var t=Rr(arguments,1),r=_(t,Ge.placeholder);return Jr(n,R,null,t,r)}function Je(n){return ae(p(n)?n.length:m)&&zu.call(n)==B||false}function Xe(n){return n&&1===n.nodeType&&p(n)&&-1t||!n||!oo(t))return r;do t%2&&(r+=n),t=Yu(t/2),n+=n;while(t);return r}function hu(n,t,r){var u=n;return(n=e(n))?(r?fe(u,t,r):null==t)?n.slice(g(n),v(n)+1):(t+="",n.slice(o(n,t),i(n,t)+1)):n}function _u(n,t,r){return r&&fe(n,t,r)&&(t=null),n=e(n),n.match(t||Et)||[]}function gu(){for(var n=arguments[0],t=arguments.length,r=xu(t?t-1:0);0<--t;)r[t-1]=arguments[t];try{return n.apply(m,r)}catch(e){return He(e)?e:new ju(e)}}function vu(n,t,r){return r&&fe(n,t,r)&&(t=null),p(n)?mu(n):tr(n,t) +}function yu(n){return function(){return n}}function du(n){return n}function mu(n){return wr(rr(n,true))}function bu(n,t,r){if(null==r){var e=Qe(t),u=e&&zo(t);((u=u&&u.length&&vr(t,u))?u.length:e)||(u=false,r=t,t=n,n=this)}u||(u=vr(t,zo(t)));var o=true,e=-1,i=$o(n),f=u.length;false===r?o=false:Qe(r)&&"chain"in r&&(o=r.chain);for(;++e>>1,mo=ro?ro.BYTES_PER_ELEMENT:0,bo=Eu.pow(2,53)-1,wo=to&&new to,xo=Tt.support={};!function(n){xo.funcDecomp=!nu(h.WinRTError)&&jt.test(d),xo.funcNames=typeof ku.name=="string";try{xo.dom=11===Uu.createDocumentFragment().nodeType +}catch(t){xo.dom=false}try{xo.nonEnumArgs=!Ju.call(arguments,1)}catch(r){xo.nonEnumArgs=true}}(0,0),Tt.templateSettings={escape:pt,evaluate:ht,interpolate:_t,variable:"",imports:{_:Tt}};var Ao=function(){function n(){}return function(t){if(Qe(t)){n.prototype=t;var r=new n;n.prototype=null}return r||h.Object()}}(),jo=wo?function(n,t){return wo.set(n,t),n}:du;Pu||($r=qu&&no?function(n){var t=n.byteLength,r=ro?Yu(t/mo):0,e=r*mo,u=new qu(t);if(r){var o=new ro(u,0,r);o.set(new ro(n,0,r))}return t!=e&&(o=new no(u,e),o.set(new no(n,e))),u +}:yu(null));var ko=uo&&Xu?function(n){return new $t(n)}:yu(null),Eo=wo?function(n){return wo.get(n)}:wu,Ro=function(){var n=0,t=0;return function(r,e){var u=To(),o=S-(u-t);if(t=u,0=T)return r}else n=0;return jo(r,e)}}(),Io=zr(function(n,t,r){Lu.call(n,r)?++n[r]:n[r]=1}),Oo=zr(function(n,t,r){Lu.call(n,r)?n[r].push(t):n[r]=[t]}),Co=zr(function(n,t,r){n[r]=t}),Wo=zr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),To=co||function(){return(new Au).getTime()},So=qr(),No=qr(true),Uo=eo||function(n){return p(n)&&ae(n.length)&&zu.call(n)==z||false +};xo.dom||(Xe=function(n){return n&&1===n.nodeType&&p(n)&&!Lo(n)||false});var Fo=lo||function(n){return typeof n=="number"&&oo(n)},$o=r(/x/)||no&&!r(no)?function(n){return zu.call(n)==P}:r,Lo=Zu?function(n){if(!n||zu.call(n)!=V)return false;var t=n.valueOf,r=nu(t)&&(r=Zu(t))&&Zu(r);return r?n==r||Zu(n)==r:pe(n)}:pe,Bo=Dr(Ht),zo=io?function(n){if(n)var t=n.constructor,r=n.length;return typeof t=="function"&&t.prototype===n||typeof n!="function"&&r&&ae(r)?he(n):Qe(n)?io(n):[]}:he,Do=Dr(Ar),Mo=Pr(function(n,t,r){return t=t.toLowerCase(),n+(r?t.charAt(0).toUpperCase()+t.slice(1):t) +}),qo=Pr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()});8!=so(Rt+"08")&&(su=function(n,t,r){return(r?fe(n,t,r):null==t)?t=0:t&&(t=+t),n=hu(n),so(n,t||(dt.test(n)?16:10))});var Po=Pr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),Ko=Pr(function(n,t,r){return n+(r?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}),Vo=Vr(Vt),Yo=Vr(function(n){for(var t=-1,r=n.length,e=_o;++t--n?t.apply(this,arguments):void 0 +}},Tt.ary=function(n,t,r){return r&&fe(n,t,r)&&(t=null),t=n&&null==t?n.length:fo(+t||0,0),Jr(n,O,null,null,null,null,t)},Tt.assign=Bo,Tt.at=function(n){return ae(n?n.length:0)&&(n=_e(n)),Qt(n,lr(arguments,false,false,1))},Tt.before=De,Tt.bind=Me,Tt.bindAll=function(n){for(var t=n,r=1r&&(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(s?Lt(s,f):o(l,f,0))){for(r=e;--r;){var p=u[r];if(0>(p?Lt(p,f):o(n[r],f,0)))continue n}s&&s.push(f),l.push(f) +}return l},Tt.invert=function(n,t,r){r&&fe(n,t,r)&&(t=null),r=-1;for(var e=zo(n),u=e.length,o={};++rt?0:t)):[]},Tt.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?fe(n,t,r):null==t)&&(t=1),t=e-(+t||0),Rr(n,0>t?0:t)):[]},Tt.takeRightWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];for(t=te(t,r,3);e--&&t(n[e],e,n););return Rr(n,e+1)},Tt.takeWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];var u=-1;for(t=te(t,r,3);++un||!oo(n))return[];var e=-1,u=xu(ao(n,go));for(t=Fr(t,r,1);++er?0:+r||0,u),r-=t.length,0<=r&&n.indexOf(t,r)==r},Tt.escape=function(n){return(n=e(n))&&st.test(n)?n.replace(ct,c):n},Tt.escapeRegExp=lu,Tt.every=Oe,Tt.find=We,Tt.findIndex=me,Tt.findKey=function(n,t,r){return t=te(t,r,3),cr(n,t,_r,true)},Tt.findLast=function(n,t,r){return t=te(t,r,3),cr(n,t,ir)},Tt.findLastIndex=function(n,t,r){var e=n?n.length:0; +for(t=te(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},Tt.findLastKey=function(n,t,r){return t=te(t,r,3),cr(n,t,gr,true)},Tt.findWhere=function(n,t){return We(n,wr(t))},Tt.first=be,Tt.has=function(n,t){return n?Lu.call(n,t):false},Tt.identity=du,Tt.includes=Ne,Tt.indexOf=we,Tt.inRange=function(n,t,r){return t=+t||0,"undefined"===typeof r?(r=t,t=0):r=+r||0,n>=t&&nr?fo(e+r,0):ao(r||0,e-1))+1;else if(r)return u=Nr(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},Tt.max=Vo,Tt.min=Yo,Tt.noConflict=function(){return h._=Du,this},Tt.noop=wu,Tt.now=To,Tt.pad=function(n,t,r){n=e(n),t=+t;var u=n.length;return ur?0:+r||0,n.length),n.lastIndexOf(t,r)==r +},Tt.sum=function(n){Uo(n)||(n=_e(n));for(var t=n.length,r=0;t--;)r+=+n[t]||0;return r},Tt.template=function(n,t,r){var u=Tt.templateSettings;r&&fe(n,t,r)&&(t=r=null),n=e(n),t=Ht(Ht({},r||t),u,Xt),r=Ht(Ht({},t.imports),u.imports,Xt);var o,i,f=zo(r),a=Tr(r,f),c=0;r=t.interpolate||wt;var s="__p+='";r=Ou((t.escape||wt).source+"|"+r.source+"|"+(r===_t?gt:wt).source+"|"+(t.evaluate||wt).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),s+=n.slice(c,a).replace(kt,l),r&&(o=true,s+="'+__e("+r+")+'"),f&&(i=true,s+="';"+f+";\n__p+='"),e&&(s+="'+((__t=("+e+"))==null?'':__t)+'"),c=a+t.length,t +}),s+="';",(t=t.variable)||(s="with(obj){"+s+"}"),s=(i?s.replace(ot,""):s).replace(it,"$1").replace(ft,"$1;"),s="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+s+"return __p}",t=gu(function(){return ku(f,p+"return "+s).apply(m,a)}),t.source=s,He(t))throw t;return t},Tt.trim=hu,Tt.trimLeft=function(n,t,r){var u=n;return(n=e(n))?n.slice((r?fe(u,t,r):null==t)?g(n):o(n,t+"")):n +},Tt.trimRight=function(n,t,r){var u=n;return(n=e(n))?(r?fe(u,t,r):null==t)?n.slice(0,v(n)+1):n.slice(0,i(n,t+"")+1):n},Tt.trunc=function(n,t,r){r&&fe(n,t,r)&&(t=null);var u=C;if(r=W,null!=t)if(Qe(t)){var o="separator"in t?t.separator:o,u="length"in t?+t.length||0:u;r="omission"in t?e(t.omission):r}else u=+t||0;if(n=e(n),u>=n.length)return n;if(u-=r.length,1>u)return r;if(t=n.slice(0,u),null==o)return t+r;if(ru(o)){if(n.slice(u).search(o)){var i,f=n.slice(0,u);for(o.global||(o=Ou(o.source,(vt.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(f);)i=n.index; +t=t.slice(0,null==i?u:i)}}else n.indexOf(o,u)!=u&&(o=t.lastIndexOf(o),-1u.__dir__?"Right":"")}),u},Ut.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()},Ut.prototype[n+"RightWhile"]=function(n,t){return this.reverse()[r](n,t).reverse()}}),Mt(["first","last"],function(n,t){var r="take"+(t?"Right":"");Ut.prototype[n]=function(){return this[r](1).value()[0]}}),Mt(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right"); +Ut.prototype[n]=function(){return this[r](1)}}),Mt(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?wr:jr;Ut.prototype[n]=function(n){return this[r](e(n))}}),Ut.prototype.compact=function(){return this.filter(du)},Ut.prototype.reject=function(n,t){return n=te(n,t,1),this.filter(function(t){return!n(t)})},Ut.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},Ut.prototype.toArray=function(){return this.drop(0) +},_r(Ut.prototype,function(n,t){var r=Tt[t],e=/^(?:filter|map|reject)|While$/.test(t),u=/^(?:first|last)$/.test(t);Tt.prototype[t]=function(){function t(n){return n=[n],Gu.apply(n,o),r.apply(Tt,n)}var o=arguments,i=this.__chain__,f=this.__wrapped__,a=!!this.__actions__.length,c=f instanceof Ut,l=o[0],s=c||Uo(f);return s&&e&&typeof l=="function"&&1!=l.length&&(c=s=false),c=c&&!a,u&&!i?c?n.call(f):r.call(Tt,this.value()):s?(f=n.apply(c?f:new Ut(this),o),u||!a&&!f.__actions__||(f.__actions__||(f.__actions__=[])).push({func:Ie,args:[t],thisArg:Tt}),new Nt(f,i)):this.thru(t) +}}),Mt("concat join pop push replace shift sort splice split unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?Nu:Tu)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|replace|shift)$/.test(n);Tt.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),Ut.prototype.clone=function(){var n=this.__actions__,t=this.__iteratees__,r=this.__views__,e=new Ut(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 +},Ut.prototype.reverse=function(){if(this.__filtered__){var n=new Ut(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Ut.prototype.value=function(){var n=this.__wrapped__.value();if(!Uo(n))return Sr(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),_==F)s=p;else if(!p){if(_==U)continue n;break n}}c[a++]=s}return c},Tt.prototype.chain=function(){return Re(this)},Tt.prototype.commit=function(){return new Nt(this.value(),this.__chain__)},Tt.prototype.plant=function(n){for(var t,r=this;r instanceof St;){var e=ve(r); +t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},Tt.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Ut?(this.__actions__.length&&(n=new Ut(this)),new Nt(n.reverse(),this.__chain__)):this.thru(function(n){return n.reverse()})},Tt.prototype.toString=function(){return this.value()+""},Tt.prototype.run=Tt.prototype.toJSON=Tt.prototype.valueOf=Tt.prototype.value=function(){return Sr(this.__wrapped__,this.__actions__)},Tt.prototype.collect=Tt.prototype.map,Tt.prototype.head=Tt.prototype.first,Tt.prototype.select=Tt.prototype.filter,Tt.prototype.tail=Tt.prototype.rest,Tt +}var m,b="3.5.0",w=1,x=2,A=4,j=8,k=16,E=32,R=64,I=128,O=256,C=30,W="...",T=150,S=16,N=0,U=1,F=2,$="Expected a function",L="__lodash_placeholder__",B="[object Arguments]",z="[object Array]",D="[object Boolean]",M="[object Date]",q="[object Error]",P="[object Function]",K="[object Number]",V="[object Object]",Y="[object RegExp]",Z="[object String]",G="[object ArrayBuffer]",J="[object Float32Array]",X="[object Float64Array]",H="[object Int8Array]",Q="[object Int16Array]",nt="[object Int32Array]",tt="[object Uint8Array]",rt="[object Uint8ClampedArray]",et="[object Uint16Array]",ut="[object Uint32Array]",ot=/\b__p\+='';/g,it=/\b(__p\+=)''\+/g,ft=/(__e\(.*?\)|\b__t\))\+'';/g,at=/&(?:amp|lt|gt|quot|#39|#96);/g,ct=/[&<>"'`]/g,lt=RegExp(at.source),st=RegExp(ct.source),pt=/<%-([\s\S]+?)%>/g,ht=/<%([\s\S]+?)%>/g,_t=/<%=([\s\S]+?)%>/g,gt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vt=/\w*$/,yt=/^\s*function[ \n\r\t]+\w/,dt=/^0[xX]/,mt=/^\[object .+?Constructor\]$/,bt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,wt=/($^)/,xt=/[.*+?^${}()|[\]\/\\]/g,At=RegExp(xt.source),jt=/\bthis\b/,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"),Rt=" \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",It="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 WinRTError".split(" "),Ot={}; +Ot[J]=Ot[X]=Ot[H]=Ot[Q]=Ot[nt]=Ot[tt]=Ot[rt]=Ot[et]=Ot[ut]=true,Ot[B]=Ot[z]=Ot[G]=Ot[D]=Ot[M]=Ot[q]=Ot[P]=Ot["[object Map]"]=Ot[K]=Ot[V]=Ot[Y]=Ot["[object Set]"]=Ot[Z]=Ot["[object WeakMap]"]=false;var Ct={};Ct[B]=Ct[z]=Ct[G]=Ct[D]=Ct[M]=Ct[J]=Ct[X]=Ct[H]=Ct[Q]=Ct[nt]=Ct[K]=Ct[V]=Ct[Y]=Ct[Z]=Ct[tt]=Ct[rt]=Ct[et]=Ct[ut]=true,Ct[q]=Ct[P]=Ct["[object Map]"]=Ct["[object Set]"]=Ct["[object WeakMap]"]=false;var Wt={leading:false,maxWait:0,trailing:false},Tt={"\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"},St={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Nt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ut={"function":true,object:true},Ft={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$t=Ut[typeof exports]&&exports&&!exports.nodeType&&exports,Lt=Ut[typeof module]&&module&&!module.nodeType&&module,Ut=Ut[typeof window]&&window,Bt=Lt&&Lt.exports===$t&&$t,zt=$t&&Lt&&typeof global=="object"&&global||Ut!==(this&&this.window)&&Ut||this,Dt=d(); typeof define=="function"&&typeof define.amd=="object"&&define.amd?(zt._=Dt, define(function(){return Dt})):$t&&Lt?Bt?(Lt.exports=Dt)._=Dt:$t._=Dt:zt._=Dt}).call(this); \ No newline at end of file diff --git a/lodash.src.js b/lodash.src.js index 36f5ff73c2..b72802d51c 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -1,6 +1,6 @@ /** * @license - * lodash 3.4.0 + * lodash 3.5.0 * Copyright 2012-2015 The Dojo Foundation * Based on Underscore.js 1.8.2 * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors @@ -12,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '3.4.0'; + var VERSION = '3.5.0'; /** Used to compose bitmasks for wrapper metadata. */ var BIND_FLAG = 1, From 51e459b386f8301c803442f7fc722e46fc192d35 Mon Sep 17 00:00:00 2001 From: jdalton Date: Sun, 8 Mar 2015 17:57:42 -0700 Subject: [PATCH 11/11] Bump to v3.5.0. --- README.md | 6 +++--- bower.json | 2 +- component.json | 2 +- package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bfd1518d17..44b2991699 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v3.4.0 +# lodash v3.5.0 The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) with packages for [Bower](http://bower.io/), [Component](http://component.github.io/), & [Volo](http://volojs.org/). @@ -16,8 +16,8 @@ $ lodash modern -o ./lodash.js lodash is also available in a variety of other builds & module formats. * npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds - * AMD modules for [modern](https://github.com/lodash/lodash/tree/3.4.0-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.4.0-amd) builds - * ES modules for the [modern](https://github.com/lodash/lodash/tree/3.4.0-es) build + * AMD modules for [modern](https://github.com/lodash/lodash/tree/3.5.0-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.5.0-amd) builds + * ES modules for the [modern](https://github.com/lodash/lodash/tree/3.5.0-es) build ## Further Reading diff --git a/bower.json b/bower.json index bed2376d0b..a80fea5e94 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "3.4.0", + "version": "3.5.0", "main": "lodash.js", "ignore": [ ".*", diff --git a/component.json b/component.json index a2f4d892c5..5cb835828f 100644 --- a/component.json +++ b/component.json @@ -1,7 +1,7 @@ { "name": "lodash", "repo": "lodash/lodash", - "version": "3.4.0", + "version": "3.5.0", "description": "The modern build of lodash.", "license": "MIT", "main": "lodash.js", diff --git a/package.json b/package.json index 27413bd7fb..21ab04f122 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "3.4.0", + "version": "3.5.0", "main": "lodash.src.js", "private": true, "devDependencies": {