From 9999199d2b8b57931021ca5185dd7f542d490331 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 4 Apr 2016 23:44:44 -0700 Subject: [PATCH 01/28] Enable over methods to accept `matchesProperty` shorthands. --- lodash.js | 55 +++++++++++++++++++++++++++++++++++++--------------- test/test.js | 29 +++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 16 deletions(-) diff --git a/lodash.js b/lodash.js index 16a8525cbf..fca9ffc84c 100644 --- a/lodash.js +++ b/lodash.js @@ -2700,23 +2700,24 @@ * @private * @param {Array} array The array to flatten. * @param {number} depth The maximum recursion depth. - * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. * @param {Array} [result=[]] The initial result value. * @returns {Array} Returns the new flattened array. */ - function baseFlatten(array, depth, isStrict, result) { - result || (result = []); - + function baseFlatten(array, depth, predicate, isStrict, result) { var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result || (result = []); + while (++index < length) { var value = array[index]; - if (depth > 0 && isArrayLikeObject(value) && - (isStrict || isArray(value) || isArguments(value))) { + if (depth > 0 && predicate(value)) { if (depth > 1) { // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, isStrict, result); + baseFlatten(value, depth - 1, predicate, isStrict, result); } else { arrayPush(result, value); } @@ -4608,7 +4609,7 @@ */ function createOver(arrayFunc) { return rest(function(iteratees) { - iteratees = arrayMap(baseFlatten(iteratees, 1), getIteratee()); + iteratees = arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), getIteratee()); return rest(function(args) { var thisArg = this; return arrayFunc(iteratees, function(iteratee) { @@ -5463,6 +5464,29 @@ return null; } + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArrayLikeObject(value) && (isArray(value) || isArguments(value)); + } + + /** + * Checks if `value` is a flattenable array and not a `_.matchesProperty` + * iteratee shorthand. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenableIteratee(value) { + return isArray(value) && !(value.length == 2 && !isFunction(value[0])); + } + /** * Checks if the given arguments are from an iteratee call. * @@ -5922,7 +5946,7 @@ */ var difference = rest(function(array, values) { return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, true)) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : []; }); @@ -5956,7 +5980,7 @@ iteratee = undefined; } return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, true), getIteratee(iteratee)) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee)) : []; }); @@ -5987,7 +6011,7 @@ comparator = undefined; } return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, true), undefined, comparator) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) : []; }); @@ -7253,7 +7277,7 @@ * // => [2, 1, 4] */ var union = rest(function(arrays) { - return baseUniq(baseFlatten(arrays, 1, true)); + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); }); /** @@ -7284,7 +7308,7 @@ if (isArrayLikeObject(iteratee)) { iteratee = undefined; } - return baseUniq(baseFlatten(arrays, 1, true), getIteratee(iteratee)); + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee)); }); /** @@ -7312,7 +7336,7 @@ if (isArrayLikeObject(comparator)) { comparator = undefined; } - return baseUniq(baseFlatten(arrays, 1, true), undefined, comparator); + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); }); /** @@ -9616,8 +9640,7 @@ * // => [100, 10] */ var overArgs = rest(function(func, transforms) { - transforms = arrayMap(baseFlatten(transforms, 1), getIteratee()); - + transforms = arrayMap(baseFlatten(transforms, 1, isFlattenableIteratee), getIteratee()); var funcsLength = transforms.length; return rest(function(args) { var index = -1, diff --git a/test/test.js b/test/test.js index 7a4c97b5d0..4af03d888a 100644 --- a/test/test.js +++ b/test/test.js @@ -16040,6 +16040,15 @@ assert.deepEqual(over(object), [false, true]); }); + QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) { + assert.expect(2); + + var over = _.over(['a', 2], [['b', 2]]); + + assert.deepEqual(over({ 'a': 1, 'b': 2 }), [false, true]); + assert.deepEqual(over({ 'a': 2, 'b': 1 }), [true, false]); + }); + QUnit.test('should provide arguments to predicates', function(assert) { assert.expect(1); @@ -16088,6 +16097,7 @@ assert.expect(2); var over = _.overEvery(undefined, null); + assert.strictEqual(over(true), true); assert.strictEqual(over(false), false); }); @@ -16116,6 +16126,15 @@ assert.strictEqual(over(object), false); }); + QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) { + assert.expect(2); + + var over = _.overEvery(['a', 1], [['b', 2]]); + + assert.strictEqual(over({ 'a': 1, 'b': 2 }), true); + assert.strictEqual(over({ 'a': 1, 'b': -2 }), false); + }); + QUnit.test('should flatten `predicates`', function(assert) { assert.expect(1); @@ -16190,6 +16209,7 @@ assert.expect(2); var over = _.overSome(undefined, null); + assert.strictEqual(over(true), true); assert.strictEqual(over(false), false); }); @@ -16218,6 +16238,15 @@ assert.strictEqual(over(object), false); }); + QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) { + assert.expect(2); + + var over = _.overSome(['a', 1], [['b', 2]]); + + assert.strictEqual(over({ 'a': 3, 'b': 2 }), true); + assert.strictEqual(over({ 'a': 2, 'b': 3 }), false); + }); + QUnit.test('should flatten `predicates`', function(assert) { assert.expect(1); From 3583c56067e96558f59e9edac94a30977b8d945c Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 5 Apr 2016 08:08:31 -0700 Subject: [PATCH 02/28] Replace double quotes with ticks. [ci skip] --- test/test.js | 98 ++++++++++++++++++++++++++-------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/test/test.js b/test/test.js index 4af03d888a..641eb59078 100644 --- a/test/test.js +++ b/test/test.js @@ -3493,7 +3493,7 @@ assert.deepEqual(actual, expected); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(1); var actual = _.countBy(['one', 'two', 'three'], 'length'); @@ -4982,19 +4982,19 @@ assert.deepEqual(args, [4, 3, array]); }); - QUnit.test('should work with "_.matches" shorthands', function(assert) { + QUnit.test('should work with `_.matches` shorthands', function(assert) { assert.expect(1); assert.deepEqual(_.dropRightWhile(objects, { 'b': 2 }), objects.slice(0, 2)); }); - QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) { + QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) { assert.expect(1); assert.deepEqual(_.dropRightWhile(objects, ['b', 2]), objects.slice(0, 2)); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(1); assert.deepEqual(_.dropRightWhile(objects, 'b'), objects.slice(0, 1)); @@ -5052,19 +5052,19 @@ assert.deepEqual(args, [1, 0, array]); }); - QUnit.test('should work with "_.matches" shorthands', function(assert) { + QUnit.test('should work with `_.matches` shorthands', function(assert) { assert.expect(1); assert.deepEqual(_.dropWhile(objects, { 'b': 2 }), objects.slice(1)); }); - QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) { + QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) { assert.expect(1); assert.deepEqual(_.dropWhile(objects, ['b', 2]), objects.slice(1)); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(1); assert.deepEqual(_.dropWhile(objects, 'b'), objects.slice(2)); @@ -5340,7 +5340,7 @@ assert.deepEqual(actual, expected); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(2); var objects = [{ 'a': 0, 'b': 1 }, { 'a': 1, 'b': 2 }]; @@ -5348,7 +5348,7 @@ assert.strictEqual(_.every(objects, 'b'), true); }); - QUnit.test('should work with "_.matches" shorthands', function(assert) { + QUnit.test('should work with `_.matches` shorthands', function(assert) { assert.expect(2); var objects = [{ 'a': 0, 'b': 0 }, { 'a': 0, 'b': 1 }]; @@ -5627,19 +5627,19 @@ assert.strictEqual(func(objects, function(object) { return object.a === 3; }), expected[1]); }); - QUnit.test('should work with "_.matches" shorthands', function(assert) { + QUnit.test('should work with `_.matches` shorthands', function(assert) { assert.expect(1); assert.strictEqual(func(objects, { 'b': 2 }), expected[2]); }); - QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) { + QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) { assert.expect(1); assert.strictEqual(func(objects, ['b', 2]), expected[2]); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(1); assert.strictEqual(func(objects, 'b'), expected[3]); @@ -5857,7 +5857,7 @@ assert.deepEqual(actual, expected); }); - QUnit.test('`_.' + methodName + '` should work with "_.property" shorthands', function(assert) { + QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) { assert.expect(1); var objects = [{ 'a': [1, 2] }, { 'a': [3, 4] }]; @@ -7027,7 +7027,7 @@ assert.deepEqual(actual, expected); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(1); var actual = _.groupBy(['one', 'two', 'three'], 'length'); @@ -11753,7 +11753,7 @@ assert.strictEqual(matches(array), true); }); - QUnit.test('should support deep paths for "_.matchesProperty" shorthands', function(assert) { + QUnit.test('should support deep paths for `_.matchesProperty` shorthands', function(assert) { assert.expect(1); var object = { 'a': { 'b': { 'c': { 'd': 1, 'e': 2 } } } }, @@ -11803,7 +11803,7 @@ assert.strictEqual(prop(array), 'a'); }); - QUnit.test('should support deep paths for "_.property" shorthands', function(assert) { + QUnit.test('should support deep paths for `_.property` shorthands', function(assert) { assert.expect(1); var object = { 'a': { 'b': { 'c': 3 } } }, @@ -12467,7 +12467,7 @@ assert.deepEqual(actual, expected); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(1); var expected = { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }, @@ -13037,7 +13037,7 @@ assert.deepEqual(_.map(object, String), expected); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(1); var objects = [{ 'a': 'x' }, { 'a': 'y' }]; @@ -13197,7 +13197,7 @@ assert.deepEqual(actual, { '1': 1, '2': 2 }); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(1); var actual = _.mapKeys({ 'a': { 'b': 'c' } }, 'b'); @@ -13241,7 +13241,7 @@ assert.deepEqual(actual, { '0': '1', '1': '2' }); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(1); var actual = _.mapValues({ 'a': { 'b': 1 } }, 'b'); @@ -14131,7 +14131,7 @@ assert.deepEqual(args, [{ 'a': 2 }]); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(2); var arrays = [[2], [3], [1]]; @@ -15218,7 +15218,7 @@ assert.strictEqual(actual, isMax ? 1 : 3); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(2); var objects = [{ 'a': 2 }, { 'a': 3 }, { 'a': 1 }], @@ -16022,7 +16022,7 @@ assert.deepEqual(over('a', 'b', 'c'), ['a', 'a']); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(1); var object = { 'a': 1, 'b': 2 }, @@ -16031,7 +16031,7 @@ assert.deepEqual(over(object), [2, 1]); }); - QUnit.test('should work with "_.matches" shorthands', function(assert) { + QUnit.test('should work with `_.matches` shorthands', function(assert) { assert.expect(1); var object = { 'a': 1, 'b': 2 }, @@ -16040,7 +16040,7 @@ assert.deepEqual(over(object), [false, true]); }); - QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) { + QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) { assert.expect(2); var over = _.over(['a', 2], [['b', 2]]); @@ -16102,7 +16102,7 @@ assert.strictEqual(over(false), false); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(2); var object = { 'a': 1, 'b': 2 }, @@ -16114,7 +16114,7 @@ assert.strictEqual(over(object), true); }); - QUnit.test('should work with "_.matches" shorthands', function(assert) { + QUnit.test('should work with `_.matches` shorthands', function(assert) { assert.expect(2); var object = { 'a': 1, 'b': 2 }, @@ -16126,7 +16126,7 @@ assert.strictEqual(over(object), false); }); - QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) { + QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) { assert.expect(2); var over = _.overEvery(['a', 1], [['b', 2]]); @@ -16214,7 +16214,7 @@ assert.strictEqual(over(false), false); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(2); var object = { 'a': 1, 'b': 2 }, @@ -16226,7 +16226,7 @@ assert.strictEqual(over(object), false); }); - QUnit.test('should work with "_.matches" shorthands', function(assert) { + QUnit.test('should work with `_.matches` shorthands', function(assert) { assert.expect(2); var object = { 'a': 1, 'b': 2 }, @@ -16238,7 +16238,7 @@ assert.strictEqual(over(object), false); }); - QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) { + QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) { assert.expect(2); var over = _.overSome(['a', 1], [['b', 2]]); @@ -16951,7 +16951,7 @@ assert.deepEqual(actual, expected); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(1); var objects = [{ 'a': 1 }, { 'a': 1 }, { 'b': 2 }], @@ -18149,13 +18149,13 @@ assert.deepEqual(actual, [0]); }); - QUnit.test('`_.' + methodName + '` should work with "_.property" shorthands', function(assert) { + QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) { assert.expect(1); assert.deepEqual(func(objects, 'a'), [objects[isFilter ? 1 : 0]]); }); - QUnit.test('`_.' + methodName + '` should work with "_.matches" shorthands', function(assert) { + QUnit.test('`_.' + methodName + '` should work with `_.matches` shorthands', function(assert) { assert.expect(1); assert.deepEqual(func(objects, objects[1]), [objects[isFilter ? 1 : 0]]); @@ -18289,7 +18289,7 @@ assert.deepEqual(argsList, [[1, 0, clone], [2, 1, clone], [3, 2, clone]]); }); - QUnit.test('should work with "_.matches" shorthands', function(assert) { + QUnit.test('should work with `_.matches` shorthands', function(assert) { assert.expect(1); var objects = [{ 'a': 0, 'b': 1 }, { 'a': 1, 'b': 2 }]; @@ -18297,7 +18297,7 @@ assert.deepEqual(objects, [{ 'a': 0, 'b': 1 }]); }); - QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) { + QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) { assert.expect(1); var objects = [{ 'a': 0, 'b': 1 }, { 'a': 1, 'b': 2 }]; @@ -18305,7 +18305,7 @@ assert.deepEqual(objects, [{ 'a': 0, 'b': 1 }]); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(1); var objects = [{ 'a': 0 }, { 'a': 1 }]; @@ -19704,7 +19704,7 @@ assert.deepEqual(actual, expected); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(2); var objects = [{ 'a': 0, 'b': 0 }, { 'a': 0, 'b': 1 }]; @@ -19712,7 +19712,7 @@ assert.strictEqual(_.some(objects, 'b'), true); }); - QUnit.test('should work with "_.matches" shorthands', function(assert) { + QUnit.test('should work with `_.matches` shorthands', function(assert) { assert.expect(2); var objects = [{ 'a': 0, 'b': 0 }, { 'a': 1, 'b': 1}]; @@ -19764,7 +19764,7 @@ assert.deepEqual(actual, expected); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(1); var actual = lodashStable.map(_.sortBy(objects.concat(undefined), 'b'), 'b'); @@ -19996,7 +19996,7 @@ assert.deepEqual(args, [40]); }); - QUnit.test('`_.' + methodName + '` should work with "_.property" shorthands', function(assert) { + QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) { assert.expect(1); var objects = [{ 'x': 30 }, { 'x': 50 }], @@ -20442,7 +20442,7 @@ assert.deepEqual(args, [6]); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(2); var arrays = [[2], [3], [1]]; @@ -20749,19 +20749,19 @@ assert.deepEqual(args, [4, 3, array]); }); - QUnit.test('should work with "_.matches" shorthands', function(assert) { + QUnit.test('should work with `_.matches` shorthands', function(assert) { assert.expect(1); assert.deepEqual(_.takeRightWhile(objects, { 'b': 2 }), objects.slice(2)); }); - QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) { + QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) { assert.expect(1); assert.deepEqual(_.takeRightWhile(objects, ['b', 2]), objects.slice(2)); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(1); assert.deepEqual(_.takeRightWhile(objects, 'b'), objects.slice(1)); @@ -20864,18 +20864,18 @@ assert.deepEqual(args, [1, 0, array]); }); - QUnit.test('should work with "_.matches" shorthands', function(assert) { + QUnit.test('should work with `_.matches` shorthands', function(assert) { assert.expect(1); assert.deepEqual(_.takeWhile(objects, { 'b': 2 }), objects.slice(0, 1)); }); - QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) { + QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) { assert.expect(1); assert.deepEqual(_.takeWhile(objects, ['b', 2]), objects.slice(0, 1)); }); - QUnit.test('should work with "_.property" shorthands', function(assert) { + QUnit.test('should work with `_.property` shorthands', function(assert) { assert.expect(1); assert.deepEqual(_.takeWhile(objects, 'b'), objects.slice(0, 2)); @@ -23568,7 +23568,7 @@ assert.deepEqual(args, [objects[0]]); }); - QUnit.test('`_.' + methodName + '` should work with "_.property" shorthands', function(assert) { + QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) { assert.expect(2); var expected = isSorted ? [{ 'a': 1 }, { 'a': 2 }, { 'a': 3 }] : objects.slice(0, 3), From 083c5b703a925d42baf99313ded52894e8c6b63d Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 5 Apr 2016 08:23:34 -0700 Subject: [PATCH 03/28] Add `_.matchesProperty` test for matching `undefined` values of nested objects. --- test/test.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/test/test.js b/test/test.js index 641eb59078..d497f3ec29 100644 --- a/test/test.js +++ b/test/test.js @@ -7329,7 +7329,7 @@ }); }); - QUnit.test('`_.' + methodName + '` should return `false` for nested nullish values', function(assert) { + QUnit.test('`_.' + methodName + '` should return `false` for nullish values of nested objects', function(assert) { assert.expect(2); var values = [, null, undefined], @@ -13759,7 +13759,7 @@ }); }); - QUnit.test('should return `false` with deep paths when `object` is nullish', function(assert) { + QUnit.test('should return `false` for deep paths when `object` is nullish', function(assert) { assert.expect(2); var values = [, null, undefined], @@ -13968,6 +13968,22 @@ assert.deepEqual(actual, expected); }); + QUnit.test('should match `undefined` values of nested objects', function(assert) { + assert.expect(4); + + var object = { 'a': { 'b': undefined } }; + + lodashStable.each(['a.b', ['a', 'b']], function(path) { + var matches = _.matchesProperty(path, undefined); + assert.strictEqual(matches(object), true); + }); + + lodashStable.each(['a.a', ['a', 'a']], function(path) { + var matches = _.matchesProperty(path, undefined); + assert.strictEqual(matches(object), false); + }); + }); + QUnit.test('should match `undefined` values on primitives', function(assert) { assert.expect(2); From 6f3fb587e289ca535e673dfc34310c1dfbf03556 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 5 Apr 2016 08:39:09 -0700 Subject: [PATCH 04/28] Simplify deep property tests. --- test/test.js | 142 +++++++++++++++++++++++++-------------------------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/test/test.js b/test/test.js index d497f3ec29..7cc31c34ab 100644 --- a/test/test.js +++ b/test/test.js @@ -6943,14 +6943,14 @@ QUnit.test('should not support deep paths', function(assert) { assert.expect(1); - var actual = _.fromPairs([['a.b.c', 1]]); - assert.deepEqual(actual, { 'a.b.c': 1 }); + var actual = _.fromPairs([['a.b', 1]]); + assert.deepEqual(actual, { 'a.b': 1 }); }); QUnit.test('should support consuming the return value of `_.toPairs`', function(assert) { assert.expect(1); - var object = { 'a.b.c': 1 }; + var object = { 'a.b': 1 }; assert.deepEqual(_.fromPairs(_.toPairs(object)), object); }); @@ -7159,13 +7159,13 @@ QUnit.test('`_.' + methodName + '` should support deep paths', function(assert) { assert.expect(4); - var object = { 'a': { 'b': { 'c': 3 } } }; + var object = { 'a': { 'b': 2 } }; - lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { + lodashStable.each(['a.b', ['a', 'b']], function(path) { assert.strictEqual(func(object, path), true); }); - lodashStable.each(['a.c.b', ['a', 'c', 'b']], function(path) { + lodashStable.each(['a.a', ['a', 'a']], function(path) { assert.strictEqual(func(object, path), false); }); }); @@ -7242,9 +7242,9 @@ QUnit.test('`_.' + methodName + '` should check for a key over a path', function(assert) { assert.expect(2); - var object = { 'a.b.c': 3, 'a': { 'b': { 'c': 4 } } }; + var object = { 'a.b': 1 }; - lodashStable.each(['a.b.c', ['a.b.c']], function(path) { + lodashStable.each(['a.b', ['a.b']], function(path) { assert.strictEqual(func(object, path), true); }); }); @@ -7335,7 +7335,7 @@ var values = [, null, undefined], expected = lodashStable.map(values, alwaysFalse); - lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { + lodashStable.each(['a.b', ['a', 'b']], function(path) { var actual = lodashStable.map(values, function(value, index) { var object = index ? { 'a': value } : {}; return func(object, path); @@ -8095,7 +8095,7 @@ var actual = lodashStable.map(values, function(value) { try { - return _.invoke(value, 'a.b.c', 1, 2); + return _.invoke(value, 'a.b', 1, 2); } catch (e) {} }); @@ -11756,8 +11756,8 @@ QUnit.test('should support deep paths for `_.matchesProperty` shorthands', function(assert) { assert.expect(1); - var object = { 'a': { 'b': { 'c': { 'd': 1, 'e': 2 } } } }, - matches = _.iteratee(['a.b.c', { 'e': 2 }]); + var object = { 'a': { 'b': { 'c': 1, 'd': 2 } } }, + matches = _.iteratee(['a.b', { 'c': 1 }]); assert.strictEqual(matches(object), true); }); @@ -11806,10 +11806,10 @@ QUnit.test('should support deep paths for `_.property` shorthands', function(assert) { assert.expect(1); - var object = { 'a': { 'b': { 'c': 3 } } }, - prop = _.iteratee('a.b.c'); + var object = { 'a': { 'b': 2 } }, + prop = _.iteratee('a.b'); - assert.strictEqual(prop(object), 3); + assert.strictEqual(prop(object), 2); }); QUnit.test('should work with functions created by `_.partial` and `_.partialRight`', function(assert) { @@ -13694,10 +13694,10 @@ QUnit.test('should support deep paths', function(assert) { assert.expect(2); - var object = { 'a': { 'b': { 'c': 3 } } }; + var object = { 'a': { 'b': 2 } }; - lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { - var matches = _.matchesProperty(path, 3); + lodashStable.each(['a.b', ['a', 'b']], function(path) { + var matches = _.matchesProperty(path, 2); assert.strictEqual(matches(object), true); }); }); @@ -13729,10 +13729,10 @@ QUnit.test('should match a key over a path', function(assert) { assert.expect(2); - var object = { 'a.b.c': 3, 'a': { 'b': { 'c': 4 } } }; + var object = { 'a.b': 1, 'a': { 'b': 2 } }; - lodashStable.each(['a.b.c', ['a.b.c']], function(path) { - var matches = _.matchesProperty(path, 3); + lodashStable.each(['a.b', ['a.b']], function(path) { + var matches = _.matchesProperty(path, 1); assert.strictEqual(matches(object), true); }); }); @@ -14859,11 +14859,11 @@ QUnit.test('should work with deep property values', function(assert) { assert.expect(2); - var object = { 'a': { 'b': { 'c': alwaysThree } } }; + var object = { 'a': { 'b': alwaysTwo } }; - lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { + lodashStable.each(['a.b', ['a', 'b']], function(path) { var method = _.method(path); - assert.strictEqual(method(object), 3); + assert.strictEqual(method(object), 2); }); }); @@ -14914,11 +14914,11 @@ QUnit.test('should use a key over a path', function(assert) { assert.expect(2); - var object = { 'a.b.c': alwaysThree, 'a': { 'b': { 'c': alwaysFour } } }; + var object = { 'a.b': alwaysOne, 'a': { 'b': alwaysTwo } }; - lodashStable.each(['a.b.c', ['a.b.c']], function(path) { + lodashStable.each(['a.b', ['a.b']], function(path) { var method = _.method(path); - assert.strictEqual(method(object), 3); + assert.strictEqual(method(object), 1); }); }); @@ -15014,11 +15014,11 @@ QUnit.test('should work with deep property values', function(assert) { assert.expect(2); - var object = { 'a': { 'b': { 'c': alwaysThree } } }; + var object = { 'a': { 'b': alwaysTwo } }; - lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { + lodashStable.each(['a.b', ['a', 'b']], function(path) { var methodOf = _.methodOf(object); - assert.strictEqual(methodOf(path), 3); + assert.strictEqual(methodOf(path), 2); }); }); @@ -15069,11 +15069,11 @@ QUnit.test('should use a key over a path', function(assert) { assert.expect(2); - var object = { 'a.b.c': alwaysThree, 'a': { 'b': { 'c': alwaysFour } } }; + var object = { 'a.b': alwaysOne, 'a': { 'b': alwaysTwo } }; - lodashStable.each(['a.b.c', ['a.b.c']], function(path) { + lodashStable.each(['a.b', ['a.b']], function(path) { var methodOf = _.methodOf(object); - assert.strictEqual(methodOf(path), 3); + assert.strictEqual(methodOf(path), 1); }); }); @@ -17144,11 +17144,11 @@ QUnit.test('should pluck deep property values', function(assert) { assert.expect(2); - var object = { 'a': { 'b': { 'c': 3 } } }; + var object = { 'a': { 'b': 2 } }; - lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { + lodashStable.each(['a.b', ['a', 'b']], function(path) { var prop = _.property(path); - assert.strictEqual(prop(object), 3); + assert.strictEqual(prop(object), 2); }); }); @@ -17199,11 +17199,11 @@ QUnit.test('should pluck a key over a path', function(assert) { assert.expect(2); - var object = { 'a.b.c': 3, 'a': { 'b': { 'c': 4 } } }; + var object = { 'a.b': 1, 'a': { 'b': 2 } }; - lodashStable.each(['a.b.c', ['a.b.c']], function(path) { + lodashStable.each(['a.b', ['a.b']], function(path) { var prop = _.property(path); - assert.strictEqual(prop(object), 3); + assert.strictEqual(prop(object), 1); }); }); @@ -17273,11 +17273,11 @@ QUnit.test('should pluck deep property values', function(assert) { assert.expect(2); - var object = { 'a': { 'b': { 'c': 3 } } }, + var object = { 'a': { 'b': 2 } }, propOf = _.propertyOf(object); - lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { - assert.strictEqual(propOf(path), 3); + lodashStable.each(['a.b', ['a', 'b']], function(path) { + assert.strictEqual(propOf(path), 2); }); }); @@ -17331,11 +17331,11 @@ QUnit.test('should pluck a key over a path', function(assert) { assert.expect(2); - var object = { 'a.b.c': 3, 'a': { 'b': { 'c': 4 } } }, + var object = { 'a.b': 1, 'a': { 'b': 2 } }, propOf = _.propertyOf(object); - lodashStable.each(['a.b.c', ['a.b.c']], function(path) { - assert.strictEqual(propOf(path), 3); + lodashStable.each(['a.b', ['a.b']], function(path) { + assert.strictEqual(propOf(path), 1); }); }); @@ -17583,15 +17583,15 @@ assert.expect(3); var array = []; - array.a = { 'b': { 'c': 3 } }; + array.a = { 'b': 2 }; - var actual = _.pullAt(array, 'a.b.c'); + var actual = _.pullAt(array, 'a.b'); - assert.deepEqual(actual, [3]); - assert.deepEqual(array.a, { 'b': {} }); + assert.deepEqual(actual, [2]); + assert.deepEqual(array.a, {}); try { - actual = _.pullAt(array, 'a.b.c.d.e'); + actual = _.pullAt(array, 'a.b.c'); } catch (e) {} assert.deepEqual(actual, [undefined]); @@ -18517,20 +18517,20 @@ QUnit.test('`_.' + methodName + '` should get deep property values', function(assert) { assert.expect(2); - var object = { 'a': { 'b': { 'c': 3 } } }; + var object = { 'a': { 'b': 2 } }; - lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { - assert.strictEqual(func(object, path), 3); + lodashStable.each(['a.b', ['a', 'b']], function(path) { + assert.strictEqual(func(object, path), 2); }); }); QUnit.test('`_.' + methodName + '` should get a key over a path', function(assert) { assert.expect(2); - var object = { 'a.b.c': 3, 'a': { 'b': { 'c': 4 } } }; + var object = { 'a.b': 1, 'a': { 'b': 2 } }; - lodashStable.each(['a.b.c', ['a.b.c']], function(path) { - assert.strictEqual(func(object, path), 3); + lodashStable.each(['a.b', ['a.b']], function(path) { + assert.strictEqual(func(object, path), 1); }); }); @@ -18620,11 +18620,11 @@ QUnit.test('`_.' + methodName + '` should follow `path` over non-plain objects', function(assert) { assert.expect(2); - var paths = ['a.b.c', ['a', 'b', 'c']]; + var paths = ['a.b', ['a', 'b']]; lodashStable.each(paths, function(path) { - numberProto.a = { 'b': { 'c': 1 } }; - assert.strictEqual(func(0, path), 1); + numberProto.a = { 'b': 2 }; + assert.strictEqual(func(0, path), 2); delete numberProto.a; }); }); @@ -18640,7 +18640,7 @@ }); var actual = lodashStable.transform(values, function(result, value) { - lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { + lodashStable.each(['a.b', ['a', 'b']], function(path) { result.push( func(object, path, value), func(null, path, value) @@ -19161,30 +19161,30 @@ QUnit.test('`_.' + methodName + '` should set deep property values', function(assert) { assert.expect(4); - var object = { 'a': { 'b': { 'c': oldValue } } }; + var object = { 'a': { 'b': oldValue } }; - lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { + lodashStable.each(['a.b', ['a', 'b']], function(path) { var actual = func(object, path, updater); assert.strictEqual(actual, object); - assert.strictEqual(object.a.b.c, value); + assert.strictEqual(object.a.b, value); - object.a.b.c = oldValue; + object.a.b = oldValue; }); }); QUnit.test('`_.' + methodName + '` should set a key over a path', function(assert) { assert.expect(4); - var object = { 'a.b.c': oldValue }; + var object = { 'a.b': oldValue }; - lodashStable.each(['a.b.c', ['a.b.c']], function(path) { + lodashStable.each(['a.b', ['a.b']], function(path) { var actual = func(object, path, updater); assert.strictEqual(actual, object); - assert.deepEqual(object, { 'a.b.c': value }); + assert.deepEqual(object, { 'a.b': value }); - object['a.b.c'] = oldValue; + object['a.b'] = oldValue; }); }); @@ -23811,10 +23811,10 @@ QUnit.test('should unset deep property values', function(assert) { assert.expect(4); - lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { - var object = { 'a': { 'b': { 'c': null } } }; + lodashStable.each(['a.b', ['a', 'b']], function(path) { + var object = { 'a': { 'b': null } }; assert.strictEqual(_.unset(object, path), true); - assert.deepEqual(object, { 'a': { 'b': {} } }); + assert.deepEqual(object, { 'a': {} }); }); }); From f0f6a1e38220708f1af77bf6b2b7416f66fdf020 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 5 Apr 2016 08:44:14 -0700 Subject: [PATCH 05/28] Simplify deep path doc examples. [ci skip] --- lodash.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lodash.js b/lodash.js index fca9ffc84c..2b1c57e136 100644 --- a/lodash.js +++ b/lodash.js @@ -12092,16 +12092,16 @@ * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * - * var object = { 'a': { 'b': { 'c': 3 } } }; - * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.has(object, 'a'); * // => true * - * _.has(object, 'a.b.c'); + * _.has(object, 'a.b'); * // => true * - * _.has(object, ['a', 'b', 'c']); + * _.has(object, ['a', 'b']); * // => true * * _.has(other, 'a'); @@ -12123,15 +12123,15 @@ * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * - * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.hasIn(object, 'a'); * // => true * - * _.hasIn(object, 'a.b.c'); + * _.hasIn(object, 'a.b'); * // => true * - * _.hasIn(object, ['a', 'b', 'c']); + * _.hasIn(object, ['a', 'b']); * // => true * * _.hasIn(object, 'b'); @@ -14527,14 +14527,14 @@ * @example * * var objects = [ - * { 'a': { 'b': { 'c': _.constant(2) } } }, - * { 'a': { 'b': { 'c': _.constant(1) } } } + * { 'a': { 'b': _.constant(2) } }, + * { 'a': { 'b': _.constant(1) } } * ]; * - * _.map(objects, _.method('a.b.c')); + * _.map(objects, _.method('a.b')); * // => [2, 1] * - * _.map(objects, _.method(['a', 'b', 'c'])); + * _.map(objects, _.method(['a', 'b'])); * // => [2, 1] */ var method = rest(function(path, args) { @@ -14787,14 +14787,14 @@ * @example * * var objects = [ - * { 'a': { 'b': { 'c': 2 } } }, - * { 'a': { 'b': { 'c': 1 } } } + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } * ]; * - * _.map(objects, _.property('a.b.c')); + * _.map(objects, _.property('a.b')); * // => [2, 1] * - * _.map(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); * // => [1, 2] */ function property(path) { From 513c0ae64dc1a5505a2ecfc6b645a43b1b28d97b Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 5 Apr 2016 10:17:17 -0700 Subject: [PATCH 06/28] Update list of fp methods with spread arguments. [ci skip] --- lib/fp/template/doc/wiki.jst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fp/template/doc/wiki.jst b/lib/fp/template/doc/wiki.jst index cb13e04e50..d4a1144682 100644 --- a/lib/fp/template/doc/wiki.jst +++ b/lib/fp/template/doc/wiki.jst @@ -114,8 +114,8 @@ Methods with custom argument orders:
Methods with unchanged argument orders:
<%= toFuncList(_.keys(mapping.skipRearg)) %> -The methods `partial` & `partialRight` accept an array of arguments to partially -apply as their second parameter. +The methods `invokeArgs`, `invokeArgsMap`, `partial`, `partialRight`, & `without` +accept an array of arguments as their second parameter. #### New Methods From 55e7b8764ed4d03d7a73a32085ae90193ca7e0c5 Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Tue, 5 Apr 2016 22:04:10 +0200 Subject: [PATCH 07/28] Update jquery to 2.2.3. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4121433815..8111f263c3 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "fs-extra": "~0.26.7", "glob": "^7.0.3", "istanbul": "0.4.2", - "jquery": "^2.2.2", + "jquery": "^2.2.3", "jscs": "^2.11.0", "lodash": "4.7.0", "platform": "^1.3.1", From 5e2f113d50372c8771a63569833b25e86c18746a Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 5 Apr 2016 14:11:35 -0700 Subject: [PATCH 08/28] Update vendor/backbone to v1.3.3. --- vendor/backbone/backbone.js | 4 ++-- vendor/backbone/test/collection.js | 2 +- vendor/backbone/test/view.js | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/vendor/backbone/backbone.js b/vendor/backbone/backbone.js index 2ca5cd53be..55ccb22bd0 100644 --- a/vendor/backbone/backbone.js +++ b/vendor/backbone/backbone.js @@ -1,4 +1,4 @@ -// Backbone.js 1.3.2 +// Backbone.js 1.3.3 // (c) 2010-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors // Backbone may be freely distributed under the MIT license. @@ -44,7 +44,7 @@ var slice = Array.prototype.slice; // Current version of the library. Keep in sync with `package.json`. - Backbone.VERSION = '1.3.2'; + Backbone.VERSION = '1.3.3'; // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns // the `$` variable. diff --git a/vendor/backbone/test/collection.js b/vendor/backbone/test/collection.js index a0f6bf662e..dd98aca5c2 100644 --- a/vendor/backbone/test/collection.js +++ b/vendor/backbone/test/collection.js @@ -1898,7 +1898,7 @@ assert.deepEqual(changed.merged, []); assert.ok(changed.removed.length === 2); - assert.ok(changed.removed.indexOf(model) > -1 && changed.removed.indexOf(model2) > -1); + assert.ok(_.indexOf(changed.removed, model) > -1 && _.indexOf(changed.removed, model2) > -1); }); collection.remove([model, model2]); }); diff --git a/vendor/backbone/test/view.js b/vendor/backbone/test/view.js index 9a34454879..faf3445ba7 100644 --- a/vendor/backbone/test/view.js +++ b/vendor/backbone/test/view.js @@ -14,6 +14,11 @@ className: 'test-view', other: 'non-special-option' }); + }, + + afterEach: function() { + $('#testElement').remove(); + $('#test-view').remove(); } }); From 27d3311b6a8002a54c8bcfbd1945abf6d94f77d9 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 5 Apr 2016 21:52:17 -0700 Subject: [PATCH 09/28] Don't spell out two hundred. [ci skip] --- lodash.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lodash.js b/lodash.js index 2b1c57e136..a5ee905226 100644 --- a/lodash.js +++ b/lodash.js @@ -1487,9 +1487,9 @@ * Shortcut fusion is an optimization to merge iteratee calls; this avoids * the creation of intermediate arrays and can greatly reduce the number of * iteratee executions. Sections of a chain sequence qualify for shortcut - * fusion if the section is applied to an array of at least two hundred - * elements and any iteratees accept only one argument. The heuristic for - * whether a section qualifies for shortcut fusion is subject to change. + * fusion if the section is applied to an array of at least `200` elements + * and any iteratees accept only one argument. The heuristic for whether a + * section qualifies for shortcut fusion is subject to change. * * Chaining is supported in custom builds as long as the `_#value` method is * directly or indirectly included in the build. From 8c72ffc58332528a95b6119e723e8c09398208b0 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 5 Apr 2016 23:47:18 -0700 Subject: [PATCH 10/28] Add more fp browser usage examples. [ci skip] --- lib/fp/template/doc/wiki.jst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/fp/template/doc/wiki.jst b/lib/fp/template/doc/wiki.jst index d4a1144682..f73a8a3d29 100644 --- a/lib/fp/template/doc/wiki.jst +++ b/lib/fp/template/doc/wiki.jst @@ -9,6 +9,19 @@ In a browser: ```html + ``` In Node.js: From 504aead673a56515e910830223f391bb0f4a6a77 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 5 Apr 2016 23:51:08 -0700 Subject: [PATCH 11/28] Add placeholders section. [ci skip] --- lib/fp/template/doc/wiki.jst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/fp/template/doc/wiki.jst b/lib/fp/template/doc/wiki.jst index f73a8a3d29..dd83844b46 100644 --- a/lib/fp/template/doc/wiki.jst +++ b/lib/fp/template/doc/wiki.jst @@ -147,6 +147,21 @@ There are <%= _.size(mapping.aliasToReal) %> method aliases:
return ' * `_.' + alias + '` is an alias of `_.' + realName + '`'; }).join('\n') %> +## Placeholders + +The placeholder argument, which defaults to `_`, may be used to fill in method +arguments in a different order. Placeholders are filled by the first available +arguments of the curried returned function. +```js +// The equivalent of `2 > 5`. +_.gt(2)(5); +// → false + +// The equivalent of `_.gt(5, 2)` or `5 > 2`. +_.gt(_, 2)(5); +// → true +``` + ## Chaining The `lodash/fp` module **does not** convert chain sequence methods. See From 786a92669e2407ca68d57ec8568efb979991a6a8 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 5 Apr 2016 10:18:03 -0700 Subject: [PATCH 12/28] Update chaining note. [ci skip] --- lib/fp/template/doc/wiki.jst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fp/template/doc/wiki.jst b/lib/fp/template/doc/wiki.jst index dd83844b46..7ca2f0f70c 100644 --- a/lib/fp/template/doc/wiki.jst +++ b/lib/fp/template/doc/wiki.jst @@ -166,7 +166,7 @@ _.gt(_, 2)(5); The `lodash/fp` module **does not** convert chain sequence methods. See [Izaak Schroeder’s article](https://medium.com/making-internets/why-using-chain-is-a-mistake-9bc1f80d51ba) -for more details. +on using functional composition as an alternative to method chaining. ## Convert From d7f43eba6a47778837d2037675555ee972a7be73 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 5 Apr 2016 23:48:40 -0700 Subject: [PATCH 13/28] Make exceptions to fp argument ordering stand out. [ci skip] --- lib/fp/template/doc/wiki.jst | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/lib/fp/template/doc/wiki.jst b/lib/fp/template/doc/wiki.jst index 7ca2f0f70c..188302fb9b 100644 --- a/lib/fp/template/doc/wiki.jst +++ b/lib/fp/template/doc/wiki.jst @@ -69,11 +69,11 @@ The iteratee of `mapKeys` is invoked with one argument: (key) Methods have fixed arities to support auto-currying. ```js -// The `lodash/padStart` method accepts an optional `chars` param. +// `lodash/padStart` accepts an optional `chars` param. _.padStart('a', 3, '-') // → '--a' -// The `lodash/fp/padStart` method does not. +// `lodash/fp/padStart` does not. fp.padStart(3)('a'); // → ' a' fp.padCharsStart('-')(3)('a'); @@ -96,40 +96,44 @@ Methods with a fixed arity of four:
Method arguments are rearranged to make composition easier. ```js -// The `lodash/filter` method is data-first iteratee-last: +// `lodash/filter` is data-first iteratee-last: // (collection, iteratee) var compact = _.partial(_.filter, _, Boolean); compact(['a', null, 'c']); // → ['a', 'c'] -// The `lodash/fp/filter` method is iteratee-first data-last: +// `lodash/fp/filter` is iteratee-first data-last: // (iteratee, collection) var compact = fp.filter(Boolean); compact(['a', null, 'c']); // → ['a', 'c'] ``` -Methods with a fixed arity of two have an argument order of:
+##### Most methods follow these rules + +A fixed arity of two has an argument order of:
<%= toArgOrder(mapping.aryRearg[2]) %> -Methods with a fixed arity of three have an argument order of:
+A fixed arity of three has an argument order of:
<%= toArgOrder(mapping.aryRearg[3]) %> -Methods with a fixed arity of four have an argument order of:
+A fixed arity of four has an argument order of:
<%= toArgOrder(mapping.aryRearg[4]) %> +##### Exceptions to the rules + +Methods that accept an array of arguments as their second parameter:
+<%= toFuncList(_.keys(mapping.methodSpread)) %> + +Methods with unchanged argument orders:
+<%= toFuncList(_.keys(mapping.skipRearg)) %> + Methods with custom argument orders:
<%= _.map(_.keys(mapping.methodRearg), function(methodName) { var orders = mapping.methodRearg[methodName]; return ' * `_.' + methodName + '` has an order of ' + toArgOrder(orders); }).join('\n') %> -Methods with unchanged argument orders:
-<%= toFuncList(_.keys(mapping.skipRearg)) %> - -The methods `invokeArgs`, `invokeArgsMap`, `partial`, `partialRight`, & `without` -accept an array of arguments as their second parameter. - #### New Methods Not all variadic methods have corresponding new method variants. Feel free to From e120d63ee253021e1d640af086ef8f0c4f4fb64b Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 6 Apr 2016 07:59:05 -0700 Subject: [PATCH 14/28] Add doc note about group ordering of `_.groupBy`. [ci skip] [closes #2212] --- lodash.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lodash.js b/lodash.js index a5ee905226..d4625d2025 100644 --- a/lodash.js +++ b/lodash.js @@ -8349,9 +8349,10 @@ /** * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The corresponding value of - * each key is an array of elements responsible for generating the key. The - * iteratee is invoked with one argument: (value). + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ From 58afd8c36450aa906e22441872520206587aa2be Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 6 Apr 2016 14:10:56 -0700 Subject: [PATCH 15/28] Update debounce article links. [ci skip] --- lodash.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lodash.js b/lodash.js index d4625d2025..2a3675f4c7 100644 --- a/lodash.js +++ b/lodash.js @@ -9270,7 +9270,7 @@ * on the trailing edge of the timeout only if the debounced function is * invoked more than once during the `wait` timeout. * - * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.debounce` and `_.throttle`. * * @static @@ -9874,7 +9874,7 @@ * invoked on the trailing edge of the timeout only if the throttled function * is invoked more than once during the `wait` timeout. * - * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.throttle` and `_.debounce`. * * @static From 0588dcb3e930546a2605057782a9cf3b3b8b8d5f Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 6 Apr 2016 23:22:22 -0700 Subject: [PATCH 16/28] Add `Hash` util and split out file helper. --- lib/common/file.js | 36 ++++++++++++++++++++++++++++++ lib/common/mapping.js | 9 ++++++++ lib/common/uglify.options.js | 11 +++++++-- lib/common/util.js | 43 ++++++++++++++---------------------- lib/fp/build-dist.js | 4 ++-- lib/fp/build-doc.js | 11 ++++----- lib/fp/build-modules.js | 20 ++++++++--------- lib/main/build-dist.js | 6 ++--- lib/main/build-modules.js | 4 ++-- 9 files changed, 94 insertions(+), 50 deletions(-) create mode 100644 lib/common/file.js create mode 100644 lib/common/mapping.js diff --git a/lib/common/file.js b/lib/common/file.js new file mode 100644 index 0000000000..783a194ba6 --- /dev/null +++ b/lib/common/file.js @@ -0,0 +1,36 @@ +'use strict'; + +var _ = require('lodash'), + fs = require('fs-extra'), + glob = require('glob'), + path = require('path'); + +var minify = require('../common/minify.js'); + +/*----------------------------------------------------------------------------*/ + +function copy(srcPath, destPath) { + return _.partial(fs.copy, srcPath, destPath); +} + +function globTemplate(pattern) { + return _.transform(glob.sync(pattern), function(result, filePath) { + var key = path.basename(filePath, path.extname(filePath)); + result[key] = _.template(fs.readFileSync(filePath, 'utf8')); + }, {}); +} + +function min(srcPath, destPath) { + return _.partial(minify, srcPath, destPath); +} + +function write(filePath, data) { + return _.partial(fs.writeFile, filePath, data); +} + +module.exports = { + 'copy': copy, + 'globTemplate': globTemplate, + 'min': min, + 'write': write +}; diff --git a/lib/common/mapping.js b/lib/common/mapping.js new file mode 100644 index 0000000000..332f5afd48 --- /dev/null +++ b/lib/common/mapping.js @@ -0,0 +1,9 @@ +'use strict'; + +var _mapping = require('../../fp/_mapping'), + util = require('./util'), + Hash = util.Hash; + +/*----------------------------------------------------------------------------*/ + +module.exports = new Hash(_mapping); diff --git a/lib/common/uglify.options.js b/lib/common/uglify.options.js index d79d4757fc..469207fc54 100644 --- a/lib/common/uglify.options.js +++ b/lib/common/uglify.options.js @@ -1,4 +1,11 @@ -module.exports = { +'use strict'; + +var util = require('./util'), + Hash = util.Hash; + +/*----------------------------------------------------------------------------*/ + +module.exports = new Hash({ 'compress': { 'pure_getters': true, 'unsafe': true, @@ -13,4 +20,4 @@ module.exports = { 'comments': /^!|@cc_on|@license|@preserve/i, 'max_line_len': 500 } -}; +}); diff --git a/lib/common/util.js b/lib/common/util.js index a0a13558e1..64451862d0 100644 --- a/lib/common/util.js +++ b/lib/common/util.js @@ -1,36 +1,27 @@ 'use strict'; -var _ = require('lodash'), - fs = require('fs-extra'), - glob = require('glob'), - path = require('path'); - -var minify = require('../common/minify.js'); +var _ = require('lodash'); /*----------------------------------------------------------------------------*/ -function copyFile(srcPath, destPath) { - return _.partial(fs.copy, srcPath, destPath); -} - -function globTemplate(pattern) { - return _.transform(glob.sync(pattern), function(result, filePath) { - var key = path.basename(filePath, path.extname(filePath)); - result[key] = _.template(fs.readFileSync(filePath, 'utf8')); - }, {}); +/** + * Creates a hash object. If a `properties` object is provided, its own + * enumerable properties are assigned to the created object. + * + * @memberOf util + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new hash object. + */ +function Hash(properties) { + return _.transform(properties, function(result, value, key) { + result[key] = (_.isPlainObject(value) && !(value instanceof Hash)) + ? new Hash(value) + : value; + }, this); } -function minFile(srcPath, destPath) { - return _.partial(minify, srcPath, destPath); -} - -function writeFile(filePath, data) { - return _.partial(fs.writeFile, filePath, data); -} +Hash.prototype = Object.create(null); module.exports = { - 'copyFile': copyFile, - 'globTemplate': globTemplate, - 'minFile': minFile, - 'writeFile': writeFile + 'Hash': Hash }; diff --git a/lib/fp/build-dist.js b/lib/fp/build-dist.js index 3506409fef..bad62d2ebe 100644 --- a/lib/fp/build-dist.js +++ b/lib/fp/build-dist.js @@ -5,7 +5,7 @@ var _ = require('lodash'), path = require('path'), webpack = require('webpack'); -var util = require('../common/util'); +var file = require('../common/file'); var basePath = path.join(__dirname, '..', '..'), distPath = path.join(basePath, 'dist'), @@ -48,7 +48,7 @@ function build() { async.series([ _.partial(webpack, mappingConfig), _.partial(webpack, fpConfig), - util.minFile(path.join(distPath, filename)) + file.min(path.join(distPath, filename)) ], onComplete); } diff --git a/lib/fp/build-doc.js b/lib/fp/build-doc.js index 350b9a7e49..02800bcfd5 100644 --- a/lib/fp/build-doc.js +++ b/lib/fp/build-doc.js @@ -2,12 +2,13 @@ var _ = require('lodash'), fs = require('fs-extra'), - path = require('path'), - util = require('../common/util'); + path = require('path'); -var mapping = require('../../fp/_mapping'), - templatePath = path.join(__dirname, 'template/doc'), - template = util.globTemplate(path.join(templatePath, '*.jst')); +var file = require('../common/file'), + mapping = require('../common/mapping'); + +var templatePath = path.join(__dirname, 'template/doc'), + template = file.globTemplate(path.join(templatePath, '*.jst')); var argNames = ['a', 'b', 'c', 'd']; diff --git a/lib/fp/build-modules.js b/lib/fp/build-modules.js index 5479c9a1ca..43902e01c6 100644 --- a/lib/fp/build-modules.js +++ b/lib/fp/build-modules.js @@ -5,11 +5,11 @@ var _ = require('lodash'), glob = require('glob'), path = require('path'); -var util = require('../common/util'); +var file = require('../common/file'), + mapping = require('../common/mapping'); -var mapping = require('../../fp/_mapping'), - templatePath = path.join(__dirname, 'template/modules'), - template = util.globTemplate(path.join(templatePath, '*.jst')); +var templatePath = path.join(__dirname, 'template/modules'), + template = file.globTemplate(path.join(templatePath, '*.jst')); var aryMethods = _.union( mapping.aryMethod[1], @@ -105,14 +105,14 @@ function build(target) { var actions = modulePaths.map(function(modulePath) { var moduleName = path.basename(modulePath, '.js'); - return util.writeFile(path.join(fpPath, moduleName + '.js'), getTemplate(moduleName)); + return file.write(path.join(fpPath, moduleName + '.js'), getTemplate(moduleName)); }); - actions.unshift(util.copyFile(path.join(__dirname, '../../fp'), fpPath)); - actions.push(util.writeFile(path.join(fpPath, '_falseOptions.js'), template._falseOptions())); - actions.push(util.writeFile(path.join(fpPath, '_util.js'), template._util())); - actions.push(util.writeFile(path.join(target, 'fp.js'), template.fp())); - actions.push(util.writeFile(path.join(fpPath, 'convert.js'), template.convert())); + actions.unshift(file.copy(path.join(__dirname, '../../fp'), fpPath)); + actions.push(file.write(path.join(fpPath, '_falseOptions.js'), template._falseOptions())); + actions.push(file.write(path.join(fpPath, '_util.js'), template._util())); + actions.push(file.write(path.join(target, 'fp.js'), template.fp())); + actions.push(file.write(path.join(fpPath, 'convert.js'), template.convert())); async.series(actions, onComplete); } diff --git a/lib/main/build-dist.js b/lib/main/build-dist.js index b617419110..b43d86d3b8 100644 --- a/lib/main/build-dist.js +++ b/lib/main/build-dist.js @@ -4,7 +4,7 @@ var _ = require('lodash'), async = require('async'), path = require('path'); -var util = require('../common/util'); +var file = require('../common/file'); var basePath = path.join(__dirname, '..', '..'), distPath = path.join(basePath, 'dist'), @@ -23,8 +23,8 @@ function onComplete(error) { function build() { async.series([ - util.copyFile(baseLodash, distLodash), - util.minFile(distLodash) + file.copy(baseLodash, distLodash), + file.min(distLodash) ], onComplete); } diff --git a/lib/main/build-modules.js b/lib/main/build-modules.js index 5d038c2f66..5d89e0dc2e 100644 --- a/lib/main/build-modules.js +++ b/lib/main/build-modules.js @@ -4,7 +4,7 @@ var _ = require('lodash'), async = require('async'), path = require('path'); -var util = require('../common/util'); +var file = require('../common/file'); var basePath = path.join(__dirname, '..', '..'), distPath = path.join(basePath, 'dist'); @@ -25,7 +25,7 @@ function onComplete(error) { function build(target) { var actions = _.map(filePairs, function(pair) { - return util.copyFile(pair[0], path.join(target, pair[1])); + return file.copy(pair[0], path.join(target, pair[1])); }); async.series(actions, onComplete); From 4305ffde18874110f866aff587ebcf7f5c4ec707 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 6 Apr 2016 23:38:11 -0700 Subject: [PATCH 17/28] Add commas. [ci skip] --- lodash.js | 58 +++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/lodash.js b/lodash.js index 2a3675f4c7..dad78502bf 100644 --- a/lodash.js +++ b/lodash.js @@ -5152,10 +5152,10 @@ } /** - * Gets the appropriate "iteratee" function. If the `_.iteratee` method is - * customized this function returns the custom method, otherwise it returns - * `baseIteratee`. If arguments are provided, the chosen function is invoked - * with them and its result is returned. + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. * * @private * @param {*} [value] The value to convert to an iteratee. @@ -6410,8 +6410,8 @@ /** * Gets the index at which the first occurrence of `value` is found in `array` * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the offset - * from the end of `array`. + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. * * @static * @memberOf _ @@ -8380,7 +8380,7 @@ }); /** - * Checks if `value` is in `collection`. If `collection` is a string it's + * Checks if `value` is in `collection`. If `collection` is a string, it's * checked for a substring of `value`, otherwise * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) * is used for equality comparisons. If `fromIndex` is negative, it's used as @@ -8425,8 +8425,8 @@ /** * Invokes the method at `path` of each element in `collection`, returning * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `methodName` is a function it's - * invoked for, and `this` bound to, each element in `collection`. + * are provided to each invoked method. If `methodName` is a function, it's + * invoked for and `this` bound to, each element in `collection`. * * @static * @memberOf _ @@ -8627,7 +8627,7 @@ * Reduces `collection` to a value which is the accumulated result of running * each element in `collection` thru `iteratee`, where each successive * invocation is supplied the return value of the previous. If `accumulator` - * is not given the first element of `collection` is used as the initial + * is not given, the first element of `collection` is used as the initial * value. The iteratee is invoked with four arguments: * (accumulator, value, index|key, collection). * @@ -9492,7 +9492,7 @@ /** * Creates a function that memoizes the result of `func`. If `resolver` is - * provided it determines the cache key for storing the result based on the + * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. @@ -10039,7 +10039,7 @@ /** * This method is like `_.clone` except that it accepts `customizer` which - * is invoked to produce the cloned value. If `customizer` returns `undefined` + * is invoked to produce the cloned value. If `customizer` returns `undefined`, * cloning is handled by the method instead. The `customizer` is invoked with * up to four arguments; (value [, index|key, object, stack]). * @@ -10518,7 +10518,7 @@ /** * This method is like `_.isEqual` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined` comparisons + * is invoked to compare values. If `customizer` returns `undefined`, comparisons * are handled by the method instead. The `customizer` is invoked with up to * six arguments: (objValue, othValue [, index|key, object, other, stack]). * @@ -10811,7 +10811,7 @@ /** * This method is like `_.isMatch` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined` comparisons + * is invoked to compare values. If `customizer` returns `undefined`, comparisons * are handled by the method instead. The `customizer` is invoked with five * arguments: (objValue, srcValue, index|key, object, source). * @@ -11622,7 +11622,7 @@ /** * This method is like `_.assignIn` except that it accepts `customizer` * which is invoked to produce the assigned values. If `customizer` returns - * `undefined` assignment is handled by the method instead. The `customizer` + * `undefined`, assignment is handled by the method instead. The `customizer` * is invoked with five arguments: (objValue, srcValue, key, object, source). * * **Note:** This method mutates `object`. @@ -11654,7 +11654,7 @@ /** * This method is like `_.assign` except that it accepts `customizer` * which is invoked to produce the assigned values. If `customizer` returns - * `undefined` assignment is handled by the method instead. The `customizer` + * `undefined`, assignment is handled by the method instead. The `customizer` * is invoked with five arguments: (objValue, srcValue, key, object, source). * * **Note:** This method mutates `object`. @@ -11709,7 +11709,7 @@ /** * Creates an object that inherits from the `prototype` object. If a - * `properties` object is given its own enumerable string keyed properties + * `properties` object is given, its own enumerable string keyed properties * are assigned to the created object. * * @static @@ -12053,7 +12053,7 @@ /** * Gets the value at `path` of `object`. If the resolved value is - * `undefined` the `defaultValue` is used in its place. + * `undefined`, the `defaultValue` is used in its place. * * @static * @memberOf _ @@ -12417,7 +12417,7 @@ /** * This method is like `_.merge` except that it accepts `customizer` which * is invoked to produce the merged values of the destination and source - * properties. If `customizer` returns `undefined` merging is handled by the + * properties. If `customizer` returns `undefined`, merging is handled by the * method instead. The `customizer` is invoked with seven arguments: * (objValue, srcValue, key, object, source, stack). * @@ -12609,7 +12609,7 @@ } /** - * Sets the value at `path` of `object`. If a portion of `path` doesn't exist + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, * it's created. Arrays are created for missing index properties while objects * are created for all other missing properties. Use `_.setWith` to customize * `path` creation. @@ -12962,7 +12962,7 @@ /** * Checks if `n` is between `start` and up to but not including, `end`. If - * `end` is not specified it's set to `start` with `start` then set to `0`. + * `end` is not specified, it's set to `start` with `start` then set to `0`. * If `start` is greater than `end` the params are swapped to support * negative ranges. * @@ -13619,7 +13619,7 @@ * in "interpolate" delimiters, HTML-escape interpolated data properties in * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data * properties may be accessed as free variables in the template. If a setting - * object is given it takes precedence over `_.templateSettings` values. + * object is given, it takes precedence over `_.templateSettings` values. * * **Note:** In the development build `_.template` utilizes * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) @@ -14414,8 +14414,8 @@ /** * Creates a function that invokes `func` with the arguments of the created - * function. If `func` is a property name the created function returns the - * property value for a given element. If `func` is an array or object the + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the * created function returns `true` for elements that contain the equivalent * source properties, otherwise it returns `false`. * @@ -14575,7 +14575,7 @@ /** * Adds all own enumerable string keyed function properties of a source - * object to the destination object. If `object` is a function then methods + * object to the destination object. If `object` is a function, then methods * are added to its prototype as well. * * **Note:** Use `_.runInContext` to create a pristine `lodash` function to @@ -14832,7 +14832,7 @@ /** * Creates an array of numbers (positive and/or negative) progressing from * `start` up to, but not including, `end`. A step of `-1` is used if a negative - * `start` is specified without an `end` or `step`. If `end` is not specified + * `start` is specified without an `end` or `step`. If `end` is not specified, * it's set to `start` with `start` then set to `0`. * * **Note:** JavaScript follows the IEEE-754 standard for resolving @@ -14979,7 +14979,7 @@ } /** - * Generates a unique ID. If `prefix` is given the ID is appended to it. + * Generates a unique ID. If `prefix` is given, the ID is appended to it. * * @static * @since 0.1.0 @@ -15087,7 +15087,7 @@ var floor = createRound('floor'); /** - * Computes the maximum value of `array`. If `array` is empty or falsey + * Computes the maximum value of `array`. If `array` is empty or falsey, * `undefined` is returned. * * @static @@ -15187,7 +15187,7 @@ } /** - * Computes the minimum value of `array`. If `array` is empty or falsey + * Computes the minimum value of `array`. If `array` is empty or falsey, * `undefined` is returned. * * @static From e014592ea0e87a7c0594c98d21f9b35bdbf9ce54 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 6 Apr 2016 23:38:28 -0700 Subject: [PATCH 18/28] Fix typo in `Hash` descripton. [ci skip] --- lodash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lodash.js b/lodash.js index dad78502bf..bd9a0f2f98 100644 --- a/lodash.js +++ b/lodash.js @@ -1811,7 +1811,7 @@ /*------------------------------------------------------------------------*/ /** - * Creates an hash object. + * Creates a hash object. * * @private * @constructor From bbc84903a78109e7534fe153fd526710ac8adba9 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 6 Apr 2016 23:36:08 -0700 Subject: [PATCH 19/28] Update istanbul to 0.4.3. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8111f263c3..8a74d5dc2e 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "ecstatic": "^1.4.0", "fs-extra": "~0.26.7", "glob": "^7.0.3", - "istanbul": "0.4.2", + "istanbul": "0.4.3", "jquery": "^2.2.3", "jscs": "^2.11.0", "lodash": "4.7.0", From 06412d5f12a1f2723a262a5d71bdf81c65b0d62d Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 7 Apr 2016 01:20:26 -0700 Subject: [PATCH 20/28] Remove `Hash` use from Uglify options because it breaks it. --- lib/common/uglify.options.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/common/uglify.options.js b/lib/common/uglify.options.js index 469207fc54..a528c5f5ff 100644 --- a/lib/common/uglify.options.js +++ b/lib/common/uglify.options.js @@ -1,11 +1,6 @@ 'use strict'; -var util = require('./util'), - Hash = util.Hash; - -/*----------------------------------------------------------------------------*/ - -module.exports = new Hash({ +module.exports = { 'compress': { 'pure_getters': true, 'unsafe': true, @@ -20,4 +15,4 @@ module.exports = new Hash({ 'comments': /^!|@cc_on|@license|@preserve/i, 'max_line_len': 500 } -}); +}; From f4ff4f29b1777773a65bbc5289449ca34bdfaf5c Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 7 Apr 2016 12:19:02 -0700 Subject: [PATCH 21/28] Simplify `toSource`. --- lodash.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lodash.js b/lodash.js index bd9a0f2f98..ab41fba39c 100644 --- a/lodash.js +++ b/lodash.js @@ -5291,8 +5291,8 @@ (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = objectToString.call(value), - Ctor = result == objectTag ? value.constructor : null, - ctorString = toSource(Ctor); + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; if (ctorString) { switch (ctorString) { @@ -5791,12 +5791,15 @@ * @returns {string} Returns the source code. */ function toSource(func) { - if (isFunction(func)) { + if (func != null) { try { return funcToString.call(func); } catch (e) {} + try { + return (func + ''); + } catch (e) {} } - return toString(func); + return ''; } /** From dc63bc2bd904a3bf277fc1886ee7e96f1f7a9228 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 7 Apr 2016 20:47:14 -0700 Subject: [PATCH 22/28] Fix dynamic test labels for groups of methods. --- test/test.js | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/test/test.js b/test/test.js index 7cc31c34ab..9405802f74 100644 --- a/test/test.js +++ b/test/test.js @@ -5615,37 +5615,37 @@ 'findLastKey': ['2', undefined, '2', '2'] })[methodName]; - QUnit.test('should return the found value', function(assert) { + QUnit.test('`_.' + methodName + '` should return the found value', function(assert) { assert.expect(1); assert.strictEqual(func(objects, function(object) { return object.a; }), expected[0]); }); - QUnit.test('should return `' + expected[1] + '` if value is not found', function(assert) { + QUnit.test('`_.' + methodName + '` should return `' + expected[1] + '` if value is not found', function(assert) { assert.expect(1); assert.strictEqual(func(objects, function(object) { return object.a === 3; }), expected[1]); }); - QUnit.test('should work with `_.matches` shorthands', function(assert) { + QUnit.test('`_.' + methodName + '` should work with `_.matches` shorthands', function(assert) { assert.expect(1); assert.strictEqual(func(objects, { 'b': 2 }), expected[2]); }); - QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) { + QUnit.test('`_.' + methodName + '` should work with `_.matchesProperty` shorthands', function(assert) { assert.expect(1); assert.strictEqual(func(objects, ['b', 2]), expected[2]); }); - QUnit.test('should work with `_.property` shorthands', function(assert) { + QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) { assert.expect(1); assert.strictEqual(func(objects, 'b'), expected[3]); }); - QUnit.test('should return `' + expected[1] + '` for empty collections', function(assert) { + QUnit.test('`_.' + methodName + '` should return `' + expected[1] + '` for empty collections', function(assert) { assert.expect(1); var emptyValues = lodashStable.endsWith(methodName, 'Index') ? lodashStable.reject(empties, lodashStable.isPlainObject) : empties, @@ -5673,7 +5673,7 @@ 'findLastKey': '3' })[methodName]; - QUnit.test('should return an unwrapped value when implicitly chaining', function(assert) { + QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', function(assert) { assert.expect(1); if (!isNpm) { @@ -5684,7 +5684,7 @@ } }); - QUnit.test('should return a wrapped value when explicitly chaining', function(assert) { + QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', function(assert) { assert.expect(1); if (!isNpm) { @@ -5695,7 +5695,7 @@ } }); - QUnit.test('should not execute immediately when explicitly chaining', function(assert) { + QUnit.test('`_.' + methodName + '` should not execute immediately when explicitly chaining', function(assert) { assert.expect(1); if (!isNpm) { @@ -5707,7 +5707,7 @@ } }); - QUnit.test('should work in a lazy sequence', function(assert) { + QUnit.test('`_.' + methodName + '` should work in a lazy sequence', function(assert) { assert.expect(2); if (!isNpm) { @@ -5736,7 +5736,7 @@ })[methodName]; if (expected != null) { - QUnit.test('should work with an object for `collection`', function(assert) { + QUnit.test('`_.' + methodName + '` should work with an object for `collection`', function(assert) { assert.expect(1); var actual = func({ 'a': 1, 'b': 2, 'c': 3 }, function(n) { @@ -6225,7 +6225,7 @@ lodashStable.each(['forOwn', 'forOwnRight'], function(methodName) { var func = _[methodName]; - QUnit.test('should iterate over `length` properties', function(assert) { + QUnit.test('`_.' + methodName + '` should iterate over `length` properties', function(assert) { assert.expect(1); var object = { '0': 'zero', '1': 'one', 'length': 2 }, @@ -20063,7 +20063,7 @@ var func = _[methodName], isSortedIndexOf = methodName == 'sortedIndexOf'; - QUnit.test('should perform a binary search', function(assert) { + QUnit.test('`_.' + methodName + '` should perform a binary search', function(assert) { assert.expect(1); var sorted = [4, 4, 5, 5, 6, 6]; @@ -21921,7 +21921,7 @@ var func = _[methodName], isDebounce = methodName == 'debounce'; - QUnit.test('_.' + methodName + ' should not error for non-object `options` values', function(assert) { + QUnit.test('`_.' + methodName + '` should not error for non-object `options` values', function(assert) { assert.expect(1); var pass = true; @@ -21934,7 +21934,7 @@ assert.ok(pass); }); - QUnit.test('_.' + methodName + ' should use a default `wait` of `0`', function(assert) { + QUnit.test('`_.' + methodName + '` should use a default `wait` of `0`', function(assert) { assert.expect(1); var done = assert.async(); @@ -21954,7 +21954,7 @@ }, 32); }); - QUnit.test('_.' + methodName + ' should invoke `func` with the correct `this` binding', function(assert) { + QUnit.test('`_.' + methodName + '` should invoke `func` with the correct `this` binding', function(assert) { assert.expect(1); var done = assert.async(); @@ -21976,7 +21976,7 @@ }, 64); }); - QUnit.test('_.' + methodName + ' supports recursive calls', function(assert) { + QUnit.test('`_.' + methodName + '` supports recursive calls', function(assert) { assert.expect(2); var done = assert.async(); @@ -22007,7 +22007,7 @@ }, 256); }); - QUnit.test('_.' + methodName + ' should work if the system time is set backwards', function(assert) { + QUnit.test('`_.' + methodName + '` should work if the system time is set backwards', function(assert) { assert.expect(1); var done = assert.async(); @@ -22048,7 +22048,7 @@ } }); - QUnit.test('_.' + methodName + ' should support cancelling delayed calls', function(assert) { + QUnit.test('`_.' + methodName + '` should support cancelling delayed calls', function(assert) { assert.expect(1); var done = assert.async(); @@ -22068,7 +22068,7 @@ }, 64); }); - QUnit.test('_.' + methodName + ' should reset `lastCalled` after cancelling', function(assert) { + QUnit.test('`_.' + methodName + '` should reset `lastCalled` after cancelling', function(assert) { assert.expect(3); var done = assert.async(); @@ -22091,7 +22091,7 @@ }, 64); }); - QUnit.test('_.' + methodName + ' should support flushing delayed calls', function(assert) { + QUnit.test('`_.' + methodName + '` should support flushing delayed calls', function(assert) { assert.expect(2); var done = assert.async(); @@ -22111,7 +22111,7 @@ }, 64); }); - QUnit.test('_.' + methodName + ' should noop `cancel` and `flush` when nothing is queued', function(assert) { + QUnit.test('`_.' + methodName + '` should noop `cancel` and `flush` when nothing is queued', function(assert) { assert.expect(2); var done = assert.async(); @@ -22311,7 +22311,7 @@ array = [1, 2, 3], func = _[methodName]; - QUnit.test('should return a dense array', function(assert) { + QUnit.test('`_.' + methodName + '` should return a dense array', function(assert) { assert.expect(3); var sparse = Array(3); @@ -22324,7 +22324,7 @@ assert.deepEqual(actual, sparse); }); - QUnit.test('should treat array-like objects like arrays', function(assert) { + QUnit.test('`_.' + methodName + '` should treat array-like objects like arrays', function(assert) { assert.expect(2); var object = { '0': 'a', '1': 'b', '2': 'c', 'length': 3 }; @@ -22332,7 +22332,7 @@ assert.deepEqual(func(args), array); }); - QUnit.test('should return a shallow clone of arrays', function(assert) { + QUnit.test('`_.' + methodName + '` should return a shallow clone of arrays', function(assert) { assert.expect(2); var actual = func(array); @@ -22340,7 +22340,7 @@ assert.notStrictEqual(actual, array); }); - QUnit.test('should work with a node list for `collection`', function(assert) { + QUnit.test('`_.' + methodName + '` should work with a node list for `collection`', function(assert) { assert.expect(1); if (document) { From 87444e1a45cdc0755679bf03eacac6e1f81ae72d Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 7 Apr 2016 20:47:37 -0700 Subject: [PATCH 23/28] Add `sumBy` tests. --- test/test.js | 84 +++++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/test/test.js b/test/test.js index 9405802f74..89495a5dc2 100644 --- a/test/test.js +++ b/test/test.js @@ -20389,83 +20389,87 @@ /*--------------------------------------------------------------------------*/ - QUnit.module('lodash.sum'); + QUnit.module('lodash.sumBy'); (function() { - var array = [6, 4, 2]; - - QUnit.test('should return the sum of an array of numbers', function(assert) { - assert.expect(1); - - assert.strictEqual(_.sum(array), 12); - }); + var array = [6, 4, 2], + objects = [{ 'a': 2 }, { 'a': 3 }, { 'a': 1 }]; - QUnit.test('should return `0` when passing empty `array` values', function(assert) { + QUnit.test('should work with an `iteratee` argument', function(assert) { assert.expect(1); - var expected = lodashStable.map(empties, alwaysZero), - actual = lodashStable.map(empties, _.sum); + var actual = _.sumBy(objects, function(object) { + return object.a; + }); - assert.deepEqual(actual, expected); + assert.deepEqual(actual, 6); }); - QUnit.test('should skip `undefined` values', function(assert) { + QUnit.test('should provide the correct `iteratee` arguments', function(assert) { assert.expect(1); - assert.strictEqual(_.sum([1, undefined]), 1); - }); + var args; - QUnit.test('should not skip `NaN` values', function(assert) { - assert.expect(1); + _.sumBy(array, function() { + args || (args = slice.call(arguments)); + }); - assert.deepEqual(_.sum([1, NaN]), NaN); + assert.deepEqual(args, [6]); }); - QUnit.test('should not coerce values to numbers', function(assert) { - assert.expect(1); + QUnit.test('should work with `_.property` shorthands', function(assert) { + assert.expect(2); - assert.strictEqual(_.sum(['1', '2']), '12'); + var arrays = [[2], [3], [1]]; + assert.strictEqual(_.sumBy(arrays, 0), 6); + assert.strictEqual(_.sumBy(objects, 'a'), 6); }); }()); /*--------------------------------------------------------------------------*/ - QUnit.module('lodash.sumBy'); + QUnit.module('sum methods'); - (function() { + lodashStable.each(['sum', 'sumBy'], function(methodName) { var array = [6, 4, 2], - objects = [{ 'a': 2 }, { 'a': 3 }, { 'a': 1 }]; + func = _[methodName]; - QUnit.test('should work with an `iteratee` argument', function(assert) { + QUnit.test('`_.' + methodName + '` should return the sum of an array of numbers', function(assert) { assert.expect(1); - var actual = _.sumBy(objects, function(object) { - return object.a; + assert.strictEqual(func(array), 12); + }); + + QUnit.test('`_.' + methodName + '` should return `0` when passing empty `array` values', function(assert) { + assert.expect(1); + + var expected = lodashStable.map(empties, alwaysZero); + + var actual = lodashStable.map(empties, function(value) { + return func(value); }); - assert.deepEqual(actual, 6); + assert.deepEqual(actual, expected); }); - QUnit.test('should provide the correct `iteratee` arguments', function(assert) { + QUnit.test('`_.' + methodName + '` should skip `undefined` values', function(assert) { assert.expect(1); - var args; + assert.strictEqual(func([1, undefined]), 1); + }); - _.sumBy(array, function() { - args || (args = slice.call(arguments)); - }); + QUnit.test('`_.' + methodName + '` should not skip `NaN` values', function(assert) { + assert.expect(1); - assert.deepEqual(args, [6]); + assert.deepEqual(func([1, NaN]), NaN); }); - QUnit.test('should work with `_.property` shorthands', function(assert) { - assert.expect(2); + QUnit.test('`_.' + methodName + '` should not coerce values to numbers', function(assert) { + assert.expect(1); - var arrays = [[2], [3], [1]]; - assert.strictEqual(_.sumBy(arrays, 0), 6); - assert.strictEqual(_.sumBy(objects, 'a'), 6); + assert.strictEqual(func(['1', '2']), '12'); }); - }()); + }); /*--------------------------------------------------------------------------*/ From 23901dfd455dd9a5e3a4e5c8cd636c53c0051daa Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 7 Apr 2016 21:01:35 -0700 Subject: [PATCH 24/28] Update docdown. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8a74d5dc2e..fd1f424a64 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "codecov.io": "~0.1.6", "coveralls": "^2.11.9", "curl-amd": "~0.8.12", - "docdown": "~0.5.0", + "docdown": "~0.5.1", "dojo": "^1.11.1", "ecstatic": "^1.4.0", "fs-extra": "~0.26.7", From e776e679afeeef477c87ee6b565eca416cb57d87 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 8 Apr 2016 01:03:43 -0700 Subject: [PATCH 25/28] Ensure `_.split` works with emojis. --- lodash.js | 13 ++++++++++++- test/test.js | 29 ++++++++++++++++++++++++++--- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/lodash.js b/lodash.js index ab41fba39c..08693b1a7e 100644 --- a/lodash.js +++ b/lodash.js @@ -13560,7 +13560,18 @@ * // => ['a', 'b'] */ function split(string, separator, limit) { - return toString(string).split(separator, limit); + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator += ''; + if (separator == '' && reHasComplexSymbol.test(string)) { + var strSymbols = stringToArray(string); + return limit === undefined ? strSymbols : strSymbols.slice(0, limit < 0 ? 0 : limit); + } + } + return string.split(separator, limit); } /** diff --git a/test/test.js b/test/test.js index 89495a5dc2..27817fc414 100644 --- a/test/test.js +++ b/test/test.js @@ -20092,7 +20092,7 @@ QUnit.module('lodash.split'); (function() { - QUnit.test('should support string split', function(assert) { + QUnit.test('should split a string by `separator`', function(assert) { assert.expect(3); var string = 'abcde'; @@ -20101,6 +20101,19 @@ assert.deepEqual(_.split(string, '', 2), ['a', 'b']); }); + QUnit.test('should return an array containing an empty string for empty values', function(assert) { + assert.expect(1); + + var values = [, null, undefined, ''], + expected = lodashStable.map(values, lodashStable.constant([''])); + + var actual = lodashStable.map(values, function(value, index) { + return index ? _.split(value) : _.split(); + }); + + assert.deepEqual(actual, expected); + }); + QUnit.test('should allow mixed string and array prototype methods', function(assert) { assert.expect(1); @@ -23238,7 +23251,7 @@ thumbsUp = '\ud83d\udc4d'; QUnit.test('should account for astral symbols', function(assert) { - assert.expect(26); + assert.expect(33); var allHearts = _.repeat(hearts, 10), chars = hearts + comboGlyph, @@ -23259,7 +23272,17 @@ assert.strictEqual(_.padEnd(string, 16, chars), string + chars + hearts); assert.strictEqual(_.size(string), 13); - assert.deepEqual(_.toArray(string), ['A', ' ', leafs, ',', ' ', comboGlyph, ',', ' ', 'a', 'n', 'd', ' ', rocket]); + assert.deepEqual(_.split(string, ' '), ['A', leafs + ',', comboGlyph + ',', 'and', rocket]); + assert.deepEqual(_.split(string, ' ', 3), ['A', leafs + ',', comboGlyph + ',']); + assert.deepEqual(_.split(string, undefined), [string]); + assert.deepEqual(_.split(string, undefined, 0), []); + assert.deepEqual(_.split(string, '', -1), []); + + var expected = ['A', ' ', leafs, ',', ' ', comboGlyph, ',', ' ', 'a', 'n', 'd', ' ', rocket]; + + assert.deepEqual(_.split(string, ''), expected); + assert.deepEqual(_.split(string, '', 6), expected.slice(0, 6)); + assert.deepEqual(_.toArray(string), expected); assert.strictEqual(_.trim(trimString, chars), string); assert.strictEqual(_.trimStart(trimString, chars), string + trimChars); From 977264f55b2e8756d1ad3816649a8f2149e2cdbf Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 8 Apr 2016 02:06:56 -0700 Subject: [PATCH 26/28] Fix split test fails across enviros. --- test/test.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/test.js b/test/test.js index 27817fc414..5306ddf7af 100644 --- a/test/test.js +++ b/test/test.js @@ -23251,7 +23251,7 @@ thumbsUp = '\ud83d\udc4d'; QUnit.test('should account for astral symbols', function(assert) { - assert.expect(33); + assert.expect(32); var allHearts = _.repeat(hearts, 10), chars = hearts + comboGlyph, @@ -23274,9 +23274,8 @@ assert.strictEqual(_.size(string), 13); assert.deepEqual(_.split(string, ' '), ['A', leafs + ',', comboGlyph + ',', 'and', rocket]); assert.deepEqual(_.split(string, ' ', 3), ['A', leafs + ',', comboGlyph + ',']); - assert.deepEqual(_.split(string, undefined), [string]); - assert.deepEqual(_.split(string, undefined, 0), []); - assert.deepEqual(_.split(string, '', -1), []); + assert.deepEqual(_.split(string, undefined), string.split(undefined)); + assert.deepEqual(_.split(string, undefined, 0), string.split(undefined, 0)); var expected = ['A', ' ', leafs, ',', ' ', comboGlyph, ',', ' ', 'a', 'n', 'd', ' ', rocket]; From fac5e727e65e26ea9c4544053a02ea908b8e55b3 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 7 Apr 2016 18:27:23 -0700 Subject: [PATCH 27/28] Rebuild lodash and docs. --- dist/lodash.core.js | 66 ++-- dist/lodash.core.min.js | 52 +-- dist/lodash.js | 190 ++++++----- dist/lodash.min.js | 214 ++++++------ doc/README.md | 714 ++++++++++++++++++++-------------------- lodash.js | 4 +- package.json | 4 +- 7 files changed, 649 insertions(+), 595 deletions(-) diff --git a/dist/lodash.core.js b/dist/lodash.core.js index 6fca30634f..b6e5b32445 100644 --- a/dist/lodash.core.js +++ b/dist/lodash.core.js @@ -1,6 +1,6 @@ /** * @license - * lodash 4.8.2 (Custom Build) + * lodash 4.9.0 (Custom Build) * Build: `lodash core -o ./dist/lodash.core.js` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -13,7 +13,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.8.2'; + var VERSION = '4.9.0'; /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; @@ -402,9 +402,9 @@ * Shortcut fusion is an optimization to merge iteratee calls; this avoids * the creation of intermediate arrays and can greatly reduce the number of * iteratee executions. Sections of a chain sequence qualify for shortcut - * fusion if the section is applied to an array of at least two hundred - * elements and any iteratees accept only one argument. The heuristic for - * whether a section qualifies for shortcut fusion is subject to change. + * fusion if the section is applied to an array of at least `200` elements + * and any iteratees accept only one argument. The heuristic for whether a + * section qualifies for shortcut fusion is subject to change. * * Chaining is supported in custom builds as long as the `_#value` method is * directly or indirectly included in the build. @@ -640,23 +640,24 @@ * @private * @param {Array} array The array to flatten. * @param {number} depth The maximum recursion depth. - * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. * @param {Array} [result=[]] The initial result value. * @returns {Array} Returns the new flattened array. */ - function baseFlatten(array, depth, isStrict, result) { - result || (result = []); - + function baseFlatten(array, depth, predicate, isStrict, result) { var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result || (result = []); + while (++index < length) { var value = array[index]; - if (depth > 0 && isArrayLikeObject(value) && - (isStrict || isArray(value) || isArguments(value))) { + if (depth > 0 && predicate(value)) { if (depth > 1) { // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, isStrict, result); + baseFlatten(value, depth - 1, predicate, isStrict, result); } else { arrayPush(result, value); } @@ -1393,6 +1394,17 @@ return null; } + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArrayLikeObject(value) && (isArray(value) || isArguments(value)); + } + /** * Checks if `value` is likely a prototype object. * @@ -1527,8 +1539,8 @@ /** * Gets the index at which the first occurrence of `value` is found in `array` * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the offset - * from the end of `array`. + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. * * @static * @memberOf _ @@ -1956,7 +1968,7 @@ * Reduces `collection` to a value which is the accumulated result of running * each element in `collection` thru `iteratee`, where each successive * invocation is supplied the return value of the previous. If `accumulator` - * is not given the first element of `collection` is used as the initial + * is not given, the first element of `collection` is used as the initial * value. The iteratee is invoked with four arguments: * (accumulator, value, index|key, collection). * @@ -3212,7 +3224,7 @@ /** * This method is like `_.assignIn` except that it accepts `customizer` * which is invoked to produce the assigned values. If `customizer` returns - * `undefined` assignment is handled by the method instead. The `customizer` + * `undefined`, assignment is handled by the method instead. The `customizer` * is invoked with five arguments: (objValue, srcValue, key, object, source). * * **Note:** This method mutates `object`. @@ -3243,7 +3255,7 @@ /** * Creates an object that inherits from the `prototype` object. If a - * `properties` object is given its own enumerable string keyed properties + * `properties` object is given, its own enumerable string keyed properties * are assigned to the created object. * * @static @@ -3317,16 +3329,16 @@ * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * - * var object = { 'a': { 'b': { 'c': 3 } } }; - * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.has(object, 'a'); * // => true * - * _.has(object, 'a.b.c'); + * _.has(object, 'a.b'); * // => true * - * _.has(object, ['a', 'b', 'c']); + * _.has(object, ['a', 'b']); * // => true * * _.has(other, 'a'); @@ -3583,8 +3595,8 @@ /** * Creates a function that invokes `func` with the arguments of the created - * function. If `func` is a property name the created function returns the - * property value for a given element. If `func` is an array or object the + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the * created function returns `true` for elements that contain the equivalent * source properties, otherwise it returns `false`. * @@ -3655,7 +3667,7 @@ /** * Adds all own enumerable string keyed function properties of a source - * object to the destination object. If `object` is a function then methods + * object to the destination object. If `object` is a function, then methods * are added to its prototype as well. * * **Note:** Use `_.runInContext` to create a pristine `lodash` function to @@ -3765,7 +3777,7 @@ } /** - * Generates a unique ID. If `prefix` is given the ID is appended to it. + * Generates a unique ID. If `prefix` is given, the ID is appended to it. * * @static * @since 0.1.0 @@ -3789,7 +3801,7 @@ /*------------------------------------------------------------------------*/ /** - * Computes the maximum value of `array`. If `array` is empty or falsey + * Computes the maximum value of `array`. If `array` is empty or falsey, * `undefined` is returned. * * @static @@ -3813,7 +3825,7 @@ } /** - * Computes the minimum value of `array`. If `array` is empty or falsey + * Computes the minimum value of `array`. If `array` is empty or falsey, * `undefined` is returned. * * @static diff --git a/dist/lodash.core.min.js b/dist/lodash.core.min.js index 3cde601c53..37cd8bddab 100644 --- a/dist/lodash.core.min.js +++ b/dist/lodash.core.min.js @@ -1,30 +1,30 @@ /** * @license - * lodash 4.8.2 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * lodash 4.9.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE * Build: `lodash core -o ./dist/lodash.core.js` */ -;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r){for(var e=-1,u=n.length;++e-1&&0==n%1&&(null==t?9007199254740991:t)>n}function a(n){return n instanceof l?n:new l(n)}function l(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function p(n,t,r,e){var u;return(u=n===ln)||(u=An[r],u=(n===u||n!==n&&u!==u)&&!En.call(e,r)),u?t:n}function s(n){return Y(n)?Rn(n):{}}function h(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){ -n.apply(ln,r)},t)}function v(n,t){var r=true;return zn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function y(n,t){var r=[];return zn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function g(t,r,e,u){u||(u=[]);for(var o=-1,i=t.length;++o0&&Z(c)&&Q(c)&&(e||Un(c)||L(c))?r>1?g(c,r-1,e,u):n(u,c):e||(u[u.length]=c)}return u}function b(n,t){return n&&Cn(n,t,un)}function _(n,t){return y(t,function(t){return W(n[t])})}function j(n,t,r,e,u){return n===t?true:null==n||null==t||!Y(n)&&!Z(t)?n!==n&&t!==t:d(n,t,j,r,e,u); -}function d(n,t,r,e,u,o){var i=Un(n),f=Un(t),a="[object Array]",l="[object Array]";i||(a=Nn.call(n),a="[object Arguments]"==a?"[object Object]":a),f||(l=Nn.call(t),l="[object Arguments]"==l?"[object Object]":l);var p="[object Object]"==a&&!c(n),f="[object Object]"==l&&!c(t),l=a==l;o||(o=[]);var s=J(o,function(t){return t[0]===n});return s&&s[1]?s[1]==t:(o.push([n,t]),l&&!p?(r=i||isTypedArray(n)?I(n,t,r,e,u,o):$(n,t,a),o.pop(),r):2&u||(i=p&&En.call(n,"__wrapped__"),a=f&&En.call(t,"__wrapped__"),!i&&!a)?l?(r=q(n,t,r,e,u,o), -o.pop(),r):false:(i=i?n.value():n,t=a?t.value():t,r=r(i,t,e,u,o),o.pop(),r))}function m(n){return typeof n=="function"?n:null==n?fn:(typeof n=="object"?x:E)(n)}function O(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function w(n,t){var r=-1,e=Q(n)?Array(n.length):[];return zn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function x(n){var t=un(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&j(n[u],r[u],ln,3)))return false}return true}}function A(n,t){ -return n=Object(n),P(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function E(n){return function(t){return null==t?ln:t[n]}}function k(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e1?r[u-1]:ln,o=typeof o=="function"?(u--,o):ln;for(t=Object(t);++ef))return false;for(a=true;++iarguments.length,zn)}function U(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Vn(n),function(){ -return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=ln),r}}function V(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");return t=$n(t===ln?n.length-1:Vn(t),0),function(){for(var r=arguments,e=-1,u=$n(r.length-t,0),o=Array(u);++et}function L(n){return Z(n)&&Q(n)&&En.call(n,"callee")&&(!Bn.call(n,"callee")||"[object Arguments]"==Nn.call(n)); -}function Q(n){return null!=n&&X(Gn(n))&&!W(n)}function W(n){return n=Y(n)?Nn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function X(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function Y(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function Z(n){return!!n&&typeof n=="object"}function nn(n){return typeof n=="number"||Z(n)&&"[object Number]"==Nn.call(n)}function tn(n){return typeof n=="string"||!Un(n)&&Z(n)&&"[object String]"==Nn.call(n)}function rn(n,t){ -return t>n}function en(n){return typeof n=="string"?n:null==n?"":n+""}function un(n){var t=C(n);if(!t&&!Q(n))return In(Object(n));var r,e=z(n),u=!!e,e=e||[],o=e.length;for(r in n)!En.call(n,r)||u&&("length"==r||f(r,o))||t&&"constructor"==r||e.push(r);return e}function on(n){for(var t=-1,r=C(n),e=O(n),u=e.length,o=z(n),i=!!o,o=o||[],c=o.length;++t"'`]/g,hn=RegExp(sn.source),vn=/^(?:0|[1-9]\d*)$/,yn={ -"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},gn={"function":true,object:true},bn=gn[typeof exports]&&exports&&!exports.nodeType?exports:ln,_n=gn[typeof module]&&module&&!module.nodeType?module:ln,jn=_n&&_n.exports===bn?bn:ln,dn=o(gn[typeof self]&&self),mn=o(gn[typeof window]&&window),On=o(gn[typeof this]&&this),wn=o(bn&&_n&&typeof global=="object"&&global)||mn!==(On&&On.window)&&mn||dn||On||Function("return this")(),xn=Array.prototype,An=Object.prototype,En=An.hasOwnProperty,kn=0,Nn=An.toString,Sn=wn._,Tn=wn.Reflect,Fn=Tn?Tn.f:ln,Rn=Object.create,Bn=An.propertyIsEnumerable,Dn=wn.isFinite,In=Object.keys,$n=Math.max,qn=!Bn.call({ -valueOf:1},"valueOf");l.prototype=s(a.prototype),l.prototype.constructor=l;var zn=function(n,t){return function(r,e){if(null==r)return r;if(!Q(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++ot)return t?N(r):[];for(var e=Array(t-1);t--;)e[t-1]=arguments[t];return g(e,1),n(N(r),cn)},a.create=function(n,t){var r=s(n);return t?Kn(r,t):r},a.defaults=Wn,a.defer=Mn,a.delay=Pn,a.filter=function(n,t){return y(n,m(t))},a.flatten=function(n){return n&&n.length?g(n,1):[]},a.flattenDeep=function(n){return n&&n.length?g(n,pn):[]},a.iteratee=Yn,a.keys=un,a.map=function(n,t){return w(n,m(t))},a.matches=function(n){ -return x(Kn({},n))},a.mixin=an,a.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},a.once=function(n){return U(2,n)},a.pick=Xn,a.slice=function(n,t,r){var e=n?n.length:0;return r=r===ln?e:+r,e?k(n,null==t?0:+t,r):[]},a.sortBy=function(n,t){var r=0;return t=m(t),w(w(n,function(n,e,u){return{c:n,b:r++,a:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.a;var e=t.a;if(r!==e){var u=null===r,o=r===ln,i=r===r,c=null===e,f=e===ln,a=e===e; -if(r>e&&!c||!i||u&&!f&&a||o&&a){r=1;break n}if(e>r&&!u||!a||c&&!o&&i||f&&i){r=-1;break n}}r=0}return r||n.b-t.b}),E("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return Q(n)?n.length?N(n):[]:cn(n)},a.values=cn,a.extend=Ln,an(a,a),a.clone=function(n){return Y(n)?Un(n)?N(n):F(n,un(n)):n},a.escape=function(n){return(n=en(n))&&hn.test(n)?n.replace(sn,i):n},a.every=function(n,t,r){return t=r?ln:t,v(n,m(t))},a.find=J,a.forEach=M,a.has=function(n,t){return null!=n&&En.call(n,t); -},a.head=G,a.identity=fn,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?$n(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r-1&&0==n%1&&(null==t?9007199254740991:t)>n}function a(n){return n instanceof l?n:new l(n)}function l(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function p(n,t,r,e){var u;return(u=n===pn)||(u=En[r],u=(n===u||n!==n&&u!==u)&&!kn.call(e,r)),u?t:n}function s(n){return Z(n)?Bn(n):{}}function h(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){ +n.apply(pn,r)},t)}function v(n,t){var r=true;return Cn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function y(n,t){var r=[];return Cn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function g(t,r,e,u,o){var i=-1,c=t.length;for(e||(e=C),o||(o=[]);++i0&&e(f)?r>1?g(f,r-1,e,u,o):n(o,f):u||(o[o.length]=f)}return o}function b(n,t){return n&&Gn(n,t,on)}function _(n,t){return y(t,function(t){return X(n[t])})}function j(n,t,r,e,u){return n===t?true:null==n||null==t||!Z(n)&&!nn(t)?n!==n&&t!==t:d(n,t,j,r,e,u); +}function d(n,t,r,e,u,o){var i=Vn(n),f=Vn(t),a="[object Array]",l="[object Array]";i||(a=Sn.call(n),a="[object Arguments]"==a?"[object Object]":a),f||(l=Sn.call(t),l="[object Arguments]"==l?"[object Object]":l);var p="[object Object]"==a&&!c(n),f="[object Object]"==l&&!c(t),l=a==l;o||(o=[]);var s=M(o,function(t){return t[0]===n});return s&&s[1]?s[1]==t:(o.push([n,t]),l&&!p?(r=i||isTypedArray(n)?I(n,t,r,e,u,o):$(n,t,a),o.pop(),r):2&u||(i=p&&kn.call(n,"__wrapped__"),a=f&&kn.call(t,"__wrapped__"),!i&&!a)?l?(r=q(n,t,r,e,u,o), +o.pop(),r):false:(i=i?n.value():n,t=a?t.value():t,r=r(i,t,e,u,o),o.pop(),r))}function m(n){return typeof n=="function"?n:null==n?an:(typeof n=="object"?x:E)(n)}function O(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function w(n,t){var r=-1,e=W(n)?Array(n.length):[];return Cn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function x(n){var t=on(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&j(n[u],r[u],pn,3)))return false}return true}}function A(n,t){ +return n=Object(n),U(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function E(n){return function(t){return null==t?pn:t[n]}}function k(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e1?r[u-1]:pn,o=typeof o=="function"?(u--,o):pn;for(t=Object(t);++ef))return false;for(a=true;++iarguments.length,Cn)}function V(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function"); +return n=Hn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=pn),r}}function H(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");return t=qn(t===pn?n.length-1:Hn(t),0),function(){for(var r=arguments,e=-1,u=qn(r.length-t,0),o=Array(u);++et}function Q(n){return nn(n)&&W(n)&&kn.call(n,"callee")&&(!Dn.call(n,"callee")||"[object Arguments]"==Sn.call(n)); +}function W(n){return null!=n&&Y(Jn(n))&&!X(n)}function X(n){return n=Z(n)?Sn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function Y(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function Z(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function nn(n){return!!n&&typeof n=="object"}function tn(n){return typeof n=="number"||nn(n)&&"[object Number]"==Sn.call(n)}function rn(n){return typeof n=="string"||!Vn(n)&&nn(n)&&"[object String]"==Sn.call(n)}function en(n,t){ +return t>n}function un(n){return typeof n=="string"?n:null==n?"":n+""}function on(n){var t=G(n);if(!t&&!W(n))return $n(Object(n));var r,e=z(n),u=!!e,e=e||[],o=e.length;for(r in n)!kn.call(n,r)||u&&("length"==r||f(r,o))||t&&"constructor"==r||e.push(r);return e}function cn(n){for(var t=-1,r=G(n),e=O(n),u=e.length,o=z(n),i=!!o,o=o||[],c=o.length;++t"'`]/g,vn=RegExp(hn.source),yn=/^(?:0|[1-9]\d*)$/,gn={ +"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},bn={"function":true,object:true},_n=bn[typeof exports]&&exports&&!exports.nodeType?exports:pn,jn=bn[typeof module]&&module&&!module.nodeType?module:pn,dn=jn&&jn.exports===_n?_n:pn,mn=o(bn[typeof self]&&self),On=o(bn[typeof window]&&window),wn=o(bn[typeof this]&&this),xn=o(_n&&jn&&typeof global=="object"&&global)||On!==(wn&&wn.window)&&On||mn||wn||Function("return this")(),An=Array.prototype,En=Object.prototype,kn=En.hasOwnProperty,Nn=0,Sn=En.toString,Tn=xn._,Fn=xn.Reflect,Rn=Fn?Fn.f:pn,Bn=Object.create,Dn=En.propertyIsEnumerable,In=xn.isFinite,$n=Object.keys,qn=Math.max,zn=!Dn.call({ +valueOf:1},"valueOf");l.prototype=s(a.prototype),l.prototype.constructor=l;var Cn=function(n,t){return function(r,e){if(null==r)return r;if(!W(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++ot)return t?N(r):[];for(var e=Array(t-1);t--;)e[t-1]=arguments[t];return g(e,1),n(N(r),fn)},a.create=function(n,t){var r=s(n);return t?Ln(r,t):r},a.defaults=Xn,a.defer=Pn,a.delay=Un,a.filter=function(n,t){return y(n,m(t))},a.flatten=function(n){return n&&n.length?g(n,1):[]},a.flattenDeep=function(n){return n&&n.length?g(n,sn):[]},a.iteratee=Zn,a.keys=on,a.map=function(n,t){return w(n,m(t))},a.matches=function(n){ +return x(Ln({},n))},a.mixin=ln,a.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},a.once=function(n){return V(2,n)},a.pick=Yn,a.slice=function(n,t,r){var e=n?n.length:0;return r=r===pn?e:+r,e?k(n,null==t?0:+t,r):[]},a.sortBy=function(n,t){var r=0;return t=m(t),w(w(n,function(n,e,u){return{c:n,b:r++,a:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.a;var e=t.a;if(r!==e){var u=null===r,o=r===pn,i=r===r,c=null===e,f=e===pn,a=e===e; +if(r>e&&!c||!i||u&&!f&&a||o&&a){r=1;break n}if(e>r&&!u||!a||c&&!o&&i||f&&i){r=-1;break n}}r=0}return r||n.b-t.b}),E("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return W(n)?n.length?N(n):[]:fn(n)},a.values=fn,a.extend=Qn,ln(a,a),a.clone=function(n){return Z(n)?Vn(n)?N(n):F(n,on(n)):n},a.escape=function(n){return(n=un(n))&&vn.test(n)?n.replace(hn,i):n},a.every=function(n,t,r){return t=r?pn:t,v(n,m(t))},a.find=M,a.forEach=P,a.has=function(n,t){return null!=n&&kn.call(n,t); +},a.head=J,a.identity=an,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?qn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r + * lodash 4.9.0 (Custom Build) * Build: `lodash -o ./dist/lodash.js` * Copyright jQuery Foundation and other contributors * Released under MIT license @@ -13,7 +13,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.8.2'; + var VERSION = '4.9.0'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -1488,9 +1488,9 @@ * Shortcut fusion is an optimization to merge iteratee calls; this avoids * the creation of intermediate arrays and can greatly reduce the number of * iteratee executions. Sections of a chain sequence qualify for shortcut - * fusion if the section is applied to an array of at least two hundred - * elements and any iteratees accept only one argument. The heuristic for - * whether a section qualifies for shortcut fusion is subject to change. + * fusion if the section is applied to an array of at least `200` elements + * and any iteratees accept only one argument. The heuristic for whether a + * section qualifies for shortcut fusion is subject to change. * * Chaining is supported in custom builds as long as the `_#value` method is * directly or indirectly included in the build. @@ -1812,7 +1812,7 @@ /*------------------------------------------------------------------------*/ /** - * Creates an hash object. + * Creates a hash object. * * @private * @constructor @@ -2701,23 +2701,24 @@ * @private * @param {Array} array The array to flatten. * @param {number} depth The maximum recursion depth. - * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. * @param {Array} [result=[]] The initial result value. * @returns {Array} Returns the new flattened array. */ - function baseFlatten(array, depth, isStrict, result) { - result || (result = []); - + function baseFlatten(array, depth, predicate, isStrict, result) { var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result || (result = []); + while (++index < length) { var value = array[index]; - if (depth > 0 && isArrayLikeObject(value) && - (isStrict || isArray(value) || isArguments(value))) { + if (depth > 0 && predicate(value)) { if (depth > 1) { // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, isStrict, result); + baseFlatten(value, depth - 1, predicate, isStrict, result); } else { arrayPush(result, value); } @@ -4609,7 +4610,7 @@ */ function createOver(arrayFunc) { return rest(function(iteratees) { - iteratees = arrayMap(baseFlatten(iteratees, 1), getIteratee()); + iteratees = arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), getIteratee()); return rest(function(args) { var thisArg = this; return arrayFunc(iteratees, function(iteratee) { @@ -5152,10 +5153,10 @@ } /** - * Gets the appropriate "iteratee" function. If the `_.iteratee` method is - * customized this function returns the custom method, otherwise it returns - * `baseIteratee`. If arguments are provided, the chosen function is invoked - * with them and its result is returned. + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. * * @private * @param {*} [value] The value to convert to an iteratee. @@ -5291,8 +5292,8 @@ (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = objectToString.call(value), - Ctor = result == objectTag ? value.constructor : null, - ctorString = toSource(Ctor); + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; if (ctorString) { switch (ctorString) { @@ -5464,6 +5465,29 @@ return null; } + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArrayLikeObject(value) && (isArray(value) || isArguments(value)); + } + + /** + * Checks if `value` is a flattenable array and not a `_.matchesProperty` + * iteratee shorthand. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenableIteratee(value) { + return isArray(value) && !(value.length == 2 && !isFunction(value[0])); + } + /** * Checks if the given arguments are from an iteratee call. * @@ -5768,12 +5792,15 @@ * @returns {string} Returns the source code. */ function toSource(func) { - if (isFunction(func)) { + if (func != null) { try { return funcToString.call(func); } catch (e) {} + try { + return (func + ''); + } catch (e) {} } - return toString(func); + return ''; } /** @@ -5923,7 +5950,7 @@ */ var difference = rest(function(array, values) { return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, true)) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : []; }); @@ -5957,7 +5984,7 @@ iteratee = undefined; } return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, true), getIteratee(iteratee)) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee)) : []; }); @@ -5988,7 +6015,7 @@ comparator = undefined; } return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, true), undefined, comparator) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) : []; }); @@ -6387,8 +6414,8 @@ /** * Gets the index at which the first occurrence of `value` is found in `array` * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the offset - * from the end of `array`. + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. * * @static * @memberOf _ @@ -7254,7 +7281,7 @@ * // => [2, 1, 4] */ var union = rest(function(arrays) { - return baseUniq(baseFlatten(arrays, 1, true)); + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); }); /** @@ -7285,7 +7312,7 @@ if (isArrayLikeObject(iteratee)) { iteratee = undefined; } - return baseUniq(baseFlatten(arrays, 1, true), getIteratee(iteratee)); + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee)); }); /** @@ -7313,7 +7340,7 @@ if (isArrayLikeObject(comparator)) { comparator = undefined; } - return baseUniq(baseFlatten(arrays, 1, true), undefined, comparator); + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); }); /** @@ -8326,9 +8353,10 @@ /** * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The corresponding value of - * each key is an array of elements responsible for generating the key. The - * iteratee is invoked with one argument: (value). + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ @@ -8356,7 +8384,7 @@ }); /** - * Checks if `value` is in `collection`. If `collection` is a string it's + * Checks if `value` is in `collection`. If `collection` is a string, it's * checked for a substring of `value`, otherwise * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) * is used for equality comparisons. If `fromIndex` is negative, it's used as @@ -8401,8 +8429,8 @@ /** * Invokes the method at `path` of each element in `collection`, returning * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `methodName` is a function it's - * invoked for, and `this` bound to, each element in `collection`. + * are provided to each invoked method. If `methodName` is a function, it's + * invoked for and `this` bound to, each element in `collection`. * * @static * @memberOf _ @@ -8603,7 +8631,7 @@ * Reduces `collection` to a value which is the accumulated result of running * each element in `collection` thru `iteratee`, where each successive * invocation is supplied the return value of the previous. If `accumulator` - * is not given the first element of `collection` is used as the initial + * is not given, the first element of `collection` is used as the initial * value. The iteratee is invoked with four arguments: * (accumulator, value, index|key, collection). * @@ -9246,7 +9274,7 @@ * on the trailing edge of the timeout only if the debounced function is * invoked more than once during the `wait` timeout. * - * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.debounce` and `_.throttle`. * * @static @@ -9468,7 +9496,7 @@ /** * Creates a function that memoizes the result of `func`. If `resolver` is - * provided it determines the cache key for storing the result based on the + * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. @@ -9617,8 +9645,7 @@ * // => [100, 10] */ var overArgs = rest(function(func, transforms) { - transforms = arrayMap(baseFlatten(transforms, 1), getIteratee()); - + transforms = arrayMap(baseFlatten(transforms, 1, isFlattenableIteratee), getIteratee()); var funcsLength = transforms.length; return rest(function(args) { var index = -1, @@ -9851,7 +9878,7 @@ * invoked on the trailing edge of the timeout only if the throttled function * is invoked more than once during the `wait` timeout. * - * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.throttle` and `_.debounce`. * * @static @@ -10016,7 +10043,7 @@ /** * This method is like `_.clone` except that it accepts `customizer` which - * is invoked to produce the cloned value. If `customizer` returns `undefined` + * is invoked to produce the cloned value. If `customizer` returns `undefined`, * cloning is handled by the method instead. The `customizer` is invoked with * up to four arguments; (value [, index|key, object, stack]). * @@ -10495,7 +10522,7 @@ /** * This method is like `_.isEqual` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined` comparisons + * is invoked to compare values. If `customizer` returns `undefined`, comparisons * are handled by the method instead. The `customizer` is invoked with up to * six arguments: (objValue, othValue [, index|key, object, other, stack]). * @@ -10788,7 +10815,7 @@ /** * This method is like `_.isMatch` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined` comparisons + * is invoked to compare values. If `customizer` returns `undefined`, comparisons * are handled by the method instead. The `customizer` is invoked with five * arguments: (objValue, srcValue, index|key, object, source). * @@ -11599,7 +11626,7 @@ /** * This method is like `_.assignIn` except that it accepts `customizer` * which is invoked to produce the assigned values. If `customizer` returns - * `undefined` assignment is handled by the method instead. The `customizer` + * `undefined`, assignment is handled by the method instead. The `customizer` * is invoked with five arguments: (objValue, srcValue, key, object, source). * * **Note:** This method mutates `object`. @@ -11631,7 +11658,7 @@ /** * This method is like `_.assign` except that it accepts `customizer` * which is invoked to produce the assigned values. If `customizer` returns - * `undefined` assignment is handled by the method instead. The `customizer` + * `undefined`, assignment is handled by the method instead. The `customizer` * is invoked with five arguments: (objValue, srcValue, key, object, source). * * **Note:** This method mutates `object`. @@ -11686,7 +11713,7 @@ /** * Creates an object that inherits from the `prototype` object. If a - * `properties` object is given its own enumerable string keyed properties + * `properties` object is given, its own enumerable string keyed properties * are assigned to the created object. * * @static @@ -12030,7 +12057,7 @@ /** * Gets the value at `path` of `object`. If the resolved value is - * `undefined` the `defaultValue` is used in its place. + * `undefined`, the `defaultValue` is used in its place. * * @static * @memberOf _ @@ -12070,16 +12097,16 @@ * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * - * var object = { 'a': { 'b': { 'c': 3 } } }; - * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.has(object, 'a'); * // => true * - * _.has(object, 'a.b.c'); + * _.has(object, 'a.b'); * // => true * - * _.has(object, ['a', 'b', 'c']); + * _.has(object, ['a', 'b']); * // => true * * _.has(other, 'a'); @@ -12101,15 +12128,15 @@ * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * - * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.hasIn(object, 'a'); * // => true * - * _.hasIn(object, 'a.b.c'); + * _.hasIn(object, 'a.b'); * // => true * - * _.hasIn(object, ['a', 'b', 'c']); + * _.hasIn(object, ['a', 'b']); * // => true * * _.hasIn(object, 'b'); @@ -12394,7 +12421,7 @@ /** * This method is like `_.merge` except that it accepts `customizer` which * is invoked to produce the merged values of the destination and source - * properties. If `customizer` returns `undefined` merging is handled by the + * properties. If `customizer` returns `undefined`, merging is handled by the * method instead. The `customizer` is invoked with seven arguments: * (objValue, srcValue, key, object, source, stack). * @@ -12586,7 +12613,7 @@ } /** - * Sets the value at `path` of `object`. If a portion of `path` doesn't exist + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, * it's created. Arrays are created for missing index properties while objects * are created for all other missing properties. Use `_.setWith` to customize * `path` creation. @@ -12939,7 +12966,7 @@ /** * Checks if `n` is between `start` and up to but not including, `end`. If - * `end` is not specified it's set to `start` with `start` then set to `0`. + * `end` is not specified, it's set to `start` with `start` then set to `0`. * If `start` is greater than `end` the params are swapped to support * negative ranges. * @@ -13534,7 +13561,18 @@ * // => ['a', 'b'] */ function split(string, separator, limit) { - return toString(string).split(separator, limit); + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator += ''; + if (separator == '' && reHasComplexSymbol.test(string)) { + var strSymbols = stringToArray(string); + return limit === undefined ? strSymbols : strSymbols.slice(0, limit < 0 ? 0 : limit); + } + } + return string.split(separator, limit); } /** @@ -13596,7 +13634,7 @@ * in "interpolate" delimiters, HTML-escape interpolated data properties in * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data * properties may be accessed as free variables in the template. If a setting - * object is given it takes precedence over `_.templateSettings` values. + * object is given, it takes precedence over `_.templateSettings` values. * * **Note:** In the development build `_.template` utilizes * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) @@ -14391,8 +14429,8 @@ /** * Creates a function that invokes `func` with the arguments of the created - * function. If `func` is a property name the created function returns the - * property value for a given element. If `func` is an array or object the + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the * created function returns `true` for elements that contain the equivalent * source properties, otherwise it returns `false`. * @@ -14505,14 +14543,14 @@ * @example * * var objects = [ - * { 'a': { 'b': { 'c': _.constant(2) } } }, - * { 'a': { 'b': { 'c': _.constant(1) } } } + * { 'a': { 'b': _.constant(2) } }, + * { 'a': { 'b': _.constant(1) } } * ]; * - * _.map(objects, _.method('a.b.c')); + * _.map(objects, _.method('a.b')); * // => [2, 1] * - * _.map(objects, _.method(['a', 'b', 'c'])); + * _.map(objects, _.method(['a', 'b'])); * // => [2, 1] */ var method = rest(function(path, args) { @@ -14552,7 +14590,7 @@ /** * Adds all own enumerable string keyed function properties of a source - * object to the destination object. If `object` is a function then methods + * object to the destination object. If `object` is a function, then methods * are added to its prototype as well. * * **Note:** Use `_.runInContext` to create a pristine `lodash` function to @@ -14765,14 +14803,14 @@ * @example * * var objects = [ - * { 'a': { 'b': { 'c': 2 } } }, - * { 'a': { 'b': { 'c': 1 } } } + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } * ]; * - * _.map(objects, _.property('a.b.c')); + * _.map(objects, _.property('a.b')); * // => [2, 1] * - * _.map(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); * // => [1, 2] */ function property(path) { @@ -14809,7 +14847,7 @@ /** * Creates an array of numbers (positive and/or negative) progressing from * `start` up to, but not including, `end`. A step of `-1` is used if a negative - * `start` is specified without an `end` or `step`. If `end` is not specified + * `start` is specified without an `end` or `step`. If `end` is not specified, * it's set to `start` with `start` then set to `0`. * * **Note:** JavaScript follows the IEEE-754 standard for resolving @@ -14956,7 +14994,7 @@ } /** - * Generates a unique ID. If `prefix` is given the ID is appended to it. + * Generates a unique ID. If `prefix` is given, the ID is appended to it. * * @static * @since 0.1.0 @@ -15064,7 +15102,7 @@ var floor = createRound('floor'); /** - * Computes the maximum value of `array`. If `array` is empty or falsey + * Computes the maximum value of `array`. If `array` is empty or falsey, * `undefined` is returned. * * @static @@ -15164,7 +15202,7 @@ } /** - * Computes the minimum value of `array`. If `array` is empty or falsey + * Computes the minimum value of `array`. If `array` is empty or falsey, * `undefined` is returned. * * @static diff --git a/dist/lodash.min.js b/dist/lodash.min.js index 9241273864..e941d665ff 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -1,6 +1,6 @@ /** * @license - * lodash 4.8.2 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * lodash 4.9.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE * Build: `lodash -o ./dist/lodash.js` */ ;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,o=t.length;++un&&!o||!u||r&&!i&&f||e&&f)return 1;if(n>t&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function W(t){return function(n,r){var e; return n===T&&r===T?0:(n!==T&&(e=n),r!==T&&(e=e===T?r:t(e,r)),e)}}function B(t){return Mt[t]}function C(t){return Lt[t]}function z(t){return"\\"+Ft[t]}function U(t,n,r){var e=t.length;for(n+=r?0:-1;r?n--:++n-1&&0==t%1&&(null==n?9007199254740991:n)>t}function $(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value); -return r}function D(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function F(t,n){for(var r=-1,e=t.length,u=0,o=[];++rr?false:(r==t.length-1?t.pop():Bu.call(t,r,1),true)}function qt(t,n){var r=Vt(t,n);return 0>r?T:t[r][1]}function Vt(t,n){for(var r=t.length;r--;)if(be(t[r][0],n))return r;return-1}function Kt(t,n,r){ -var e=Vt(t,n);0>e?t.push([n,r]):t[e][1]=r}function Gt(t,n,r,e){return t===T||be(t,pu[r])&&!vu.call(e,r)?n:t}function Ht(t,n,r){(r===T||be(t[n],r))&&(typeof n!="number"||r!==T||n in t)||(t[n]=r)}function Qt(t,n,r){var e=t[n];vu.call(t,n)&&be(e,r)&&(r!==T||n in t)||(t[n]=r)}function Xt(t,n,r,e){return fo(t,function(t,u,o){n(e,t,r(t),o)}),e}function tn(t,n){return t&&ur(n,Ke(n),t)}function nn(t,n){for(var r=-1,e=null==t,u=n.length,o=Array(u);++rr?r:t),n!==T&&(t=n>t?n:t)),t}function fn(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==T)return c;if(!Ie(t))return t;if(o=Qo(t)){if(c=Mr(t),!n)return er(t,c)}else{var a=zr(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(Xo(t))return Xn(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){if(M(t))return i?t:{};if(c=Lr(l?{}:t),!n)return ir(t,tn(c,t)); -}else{if(!Ut[a])return i?t:{};c=$r(t,a,fn,n)}}if(f||(f=new Ft),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?bn(t,Ke,Cr):Ke(t);return u(s||t,function(u,o){s&&(o=u,u=t[o]),Qt(c,o,fn(u,n,r,e,o,t,f))}),c}function cn(t){var n=Ke(t),r=n.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=n[u],i=t[o],f=e[o];if(f===T&&!(o in Object(e))||!i(f))return false}return true}}function an(t){return Ie(t)?Su(t):{}}function ln(t,n,r){if(typeof t!="function")throw new su("Expected a function");return Wu(function(){ -t.apply(T,r)},n)}function sn(t,n,r,e){var u=-1,o=f,i=true,l=t.length,s=[],h=n.length;if(!l)return s;r&&(n=a(n,O(r))),e?(o=c,i=false):n.length>=200&&(o=Dt,i=false,n=new $t(n));t:for(;++u0&&we(i)&&(r||Qo(i)||je(i))?n>1?_n(i,n-1,r,e):l(e,i):r||(e[e.length]=i)}return e}function vn(t,n){return t&&ao(t,n,Ke)}function gn(t,n){return t&&lo(t,n,Ke)}function dn(t,n){return i(n,function(n){return Oe(t[n])})}function yn(t,n){n=Nr(n,t)?[n]:un(n);for(var r=0,e=n.length;null!=t&&e>r;)t=t[n[r++]];return r&&r==e?t:T}function bn(t,n,r){return n=n(t),Qo(t)?n:l(n,r(t))}function xn(t,n){return vu.call(t,n)||typeof t=="object"&&n in t&&null===Uu(Object(t))}function jn(t,n){return n in Object(t); -}function mn(t,n,r){for(var e=r?c:f,u=t[0].length,o=t.length,i=o,l=Array(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=a(p,O(n))),s=Fu(p.length,s),l[i]=r||!n&&(120>u||120>p.length)?T:new $t(i&&p)}var p=t[0],_=-1,v=l[0];t:for(;++_h.length;){var g=p[_],d=n?n(g):g;if(v?!Dt(v,d):!e(h,d,r)){for(i=o;--i;){var y=l[i];if(y?!Dt(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function wn(t,n,r){var e={};return vn(t,function(t,u,o){n(e,r(t),u,o)}),e}function An(t,n,e){return Nr(n,t)||(n=un(n), -t=Kr(t,n),n=Xr(n)),n=null==t?t:t[n],null==n?T:r(n,t,e)}function On(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!Ie(t)&&!Se(n))n=t!==t&&n!==n;else t:{var o=Qo(t),i=Qo(n),f="[object Array]",c="[object Array]";o||(f=zr(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=zr(n),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!M(t),i="[object Object]"==c&&!M(n);if((c=f==c)&&!a)u||(u=new Ft),n=o||Me(t)?kr(t,n,On,r,e,u):Er(t,n,f,On,r,e,u);else{if(!(2&e)&&(o=a&&vu.call(t,"__wrapped__"), -f=i&&vu.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new Ft),n=On(t,n,r,e,u);break t}if(c)n:if(u||(u=new Ft),o=2&e,f=Ke(t),i=f.length,c=Ke(n).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in n:xn(n,l))){n=false;break n}}if(c=u.get(t))n=c==n;else{c=true,u.set(t,n);for(var s=o;++ae?c*("desc"==r[e]?-1:1):c;break t}}e=t.b-n.b}return e})}function zn(t,n){return t=Object(t),s(n,function(n,r){return r in t&&(n[r]=t[r]),n},{})}function Un(t,n){for(var r=-1,e=bn(t,Ge,vo),u=e.length,o={};++rn||n>9007199254740991)return r;do n%2&&(r+=t),(n=zu(n/2))&&(t+=t);while(n);return r}function Pn(t,n,r,e){n=Nr(n,t)?[n]:un(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++un&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Array(u);++e=u){for(;u>e;){var o=e+u>>>1,i=t[o];(r?n>=i:n>i)&&null!==i?e=o+1:u=o}return u}return Vn(t,n,ru,r)}function Vn(t,n,r,e){ -n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=n===T;o>u;){var a=zu((u+o)/2),l=r(t[a]),s=l!==T,h=l===l;(i?h||e:f?h&&s&&(e||null!=l):c?h&&(e||s):null==l?0:e?n>=l:n>l)?u=a+1:o=a}return Fu(o,4294967294)}function Kn(t,n){for(var r=0,e=t.length,u=t[0],o=n?n(u):u,i=o,f=1,c=[u];++rr?false:(r==t.length-1?t.pop():zu.call(t,r,1),true)}function qt(t,n){var r=Vt(t,n);return 0>r?T:t[r][1]}function Vt(t,n){for(var r=t.length;r--;)if(je(t[r][0],n))return r;return-1}function Kt(t,n,r){ +var e=Vt(t,n);0>e?t.push([n,r]):t[e][1]=r}function Gt(t,n,r,e){return t===T||je(t,vu[r])&&!du.call(e,r)?n:t}function Ht(t,n,r){(r===T||je(t[n],r))&&(typeof n!="number"||r!==T||n in t)||(t[n]=r)}function Qt(t,n,r){var e=t[n];du.call(t,n)&&je(e,r)&&(r!==T||n in t)||(t[n]=r)}function Xt(t,n,r,e){return ao(t,function(t,u,o){n(e,t,r(t),o)}),e}function tn(t,n){return t&&ur(n,Je(n),t)}function nn(t,n){for(var r=-1,e=null==t,u=n.length,o=Array(u);++rr?r:t),n!==T&&(t=n>t?n:t)),t}function fn(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==T)return c;if(!Re(t))return t;if(o=ti(t)){if(c=Mr(t),!n)return er(t,c)}else{var a=zr(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(ni(t))return Xn(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){if(M(t))return i?t:{};if(c=Lr(l?{}:t),!n)return ir(t,tn(c,t)); +}else{if(!Ut[a])return i?t:{};c=$r(t,a,fn,n)}}if(f||(f=new Ft),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?bn(t,Je,Cr):Je(t);return u(s||t,function(u,o){s&&(o=u,u=t[o]),Qt(c,o,fn(u,n,r,e,o,t,f))}),c}function cn(t){var n=Je(t),r=n.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=n[u],i=t[o],f=e[o];if(f===T&&!(o in Object(e))||!i(f))return false}return true}}function an(t){return Re(t)?Wu(t):{}}function ln(t,n,r){if(typeof t!="function")throw new pu("Expected a function");return Cu(function(){ +t.apply(T,r)},n)}function sn(t,n,r,e){var u=-1,o=f,i=true,l=t.length,s=[],h=n.length;if(!l)return s;r&&(n=a(n,O(r))),e?(o=c,i=false):n.length>=200&&(o=Dt,i=false,n=new $t(n));t:for(;++u0&&r(f)?n>1?_n(f,n-1,r,e,u):l(u,f):e||(u[u.length]=f)}return u}function vn(t,n){return t&&so(t,n,Je)}function gn(t,n){return t&&ho(t,n,Je)}function dn(t,n){return i(n,function(n){return Ee(t[n])})}function yn(t,n){n=Zr(n,t)?[n]:un(n);for(var r=0,e=n.length;null!=t&&e>r;)t=t[n[r++]];return r&&r==e?t:T}function bn(t,n,r){return n=n(t),ti(t)?n:l(n,r(t))}function xn(t,n){return du.call(t,n)||typeof t=="object"&&n in t&&null===Lu(Object(t))}function jn(t,n){return n in Object(t); +}function mn(t,n,r){for(var e=r?c:f,u=t[0].length,o=t.length,i=o,l=Array(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=a(p,O(n))),s=Pu(p.length,s),l[i]=r||!n&&(120>u||120>p.length)?T:new $t(i&&p)}var p=t[0],_=-1,v=l[0];t:for(;++_h.length;){var g=p[_],d=n?n(g):g;if(v?!Dt(v,d):!e(h,d,r)){for(i=o;--i;){var y=l[i];if(y?!Dt(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function wn(t,n,r){var e={};return vn(t,function(t,u,o){n(e,r(t),u,o)}),e}function An(t,n,e){return Zr(n,t)||(n=un(n), +t=Jr(t,n),n=ne(n)),n=null==t?t:t[n],null==n?T:r(n,t,e)}function On(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!Re(t)&&!We(n))n=t!==t&&n!==n;else t:{var o=ti(t),i=ti(n),f="[object Array]",c="[object Array]";o||(f=zr(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=zr(n),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!M(t),i="[object Object]"==c&&!M(n);if((c=f==c)&&!a)u||(u=new Ft),n=o||$e(t)?kr(t,n,On,r,e,u):Er(t,n,f,On,r,e,u);else{if(!(2&e)&&(o=a&&du.call(t,"__wrapped__"), +f=i&&du.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new Ft),n=On(t,n,r,e,u);break t}if(c)n:if(u||(u=new Ft),o=2&e,f=Je(t),i=f.length,c=Je(n).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in n:xn(n,l))){n=false;break n}}if(c=u.get(t))n=c==n;else{c=true,u.set(t,n);for(var s=o;++ae?c*("desc"==r[e]?-1:1):c;break t}}e=t.b-n.b}return e})}function zn(t,n){return t=Object(t),s(n,function(n,r){return r in t&&(n[r]=t[r]),n},{})}function Un(t,n){for(var r=-1,e=bn(t,Ye,yo),u=e.length,o={};++rn||n>9007199254740991)return r;do n%2&&(r+=t),(n=Mu(n/2))&&(t+=t);while(n);return r}function Pn(t,n,r,e){n=Zr(n,t)?[n]:un(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++un&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Array(u);++e=u){for(;u>e;){var o=e+u>>>1,i=t[o];(r?n>=i:n>i)&&null!==i?e=o+1:u=o}return u}return Vn(t,n,uu,r)}function Vn(t,n,r,e){ +n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=n===T;o>u;){var a=Mu((u+o)/2),l=r(t[a]),s=l!==T,h=l===l;(i?h||e:f?h&&s&&(e||null!=l):c?h&&(e||s):null==l?0:e?n>=l:n>l)?u=a+1:o=a}return Pu(o,4294967294)}function Kn(t,n){for(var r=0,e=t.length,u=t[0],o=n?n(u):u,i=o,f=1,c=[u];++re?n[e]:T);return i}function Xn(t,n){if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function tr(t){var n=new t.constructor(t.byteLength);return new Au(n).set(new Au(t)),n}function nr(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=Du(o-i,0),l=Array(c+a);for(e=!e;++fu)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function rr(t,n,r,e){ -var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=Du(o-f,0),s=Array(l+a);for(e=!e;++uu)&&(s[l+r[i]]=t[u++]);return s}function er(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r1?r[u-1]:T,i=u>2?r[2]:T,o=typeof o=="function"?(u--,o):T;for(i&&Fr(r[0],r[1],i)&&(o=3>u?T:o,u=1),n=Object(n);++ei&&f[0]!==a&&f[i-1]!==a?[]:F(f,a),i-=c.length,e>i?wr(t,n,dr,u.placeholder,T,f,c,T,T,e-i):r(this&&this!==Jt&&this instanceof u?o:t,this,f); -}var o=_r(t);return u}function gr(t){return de(function(n){n=_n(n,1);var r=n.length,e=r,u=Ot.prototype.thru;for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new su("Expected a function");if(u&&!i&&"wrapper"==Ir(o))var i=new Ot([],true)}for(e=i?e:r;++e=200)return i.plant(e).value(); -for(var u=0,t=r?n[u].apply(this,t):e;++ud)return j=F(b,j),wr(t,n,dr,l.placeholder,r,b,j,f,c,a-d);if(j=h?r:this,y=p?j[t]:t,d=b.length,f){x=b.length;for(var m=Fu(f.length,x),w=er(b);m--;){var A=f[m];b[m]=L(A,x)?w[A]:T}}else v&&d>1&&b.reverse();return s&&d>c&&(b.length=c), -this&&this!==Jt&&this instanceof l&&(y=g||_r(y)),y.apply(j,b)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?T:_r(t);return l}function yr(t,n){return function(r,e){return wn(r,t,n(e))}}function br(t){return de(function(n){return n=a(_n(n,1),Sr()),de(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function xr(t,n){n=n===T?" ":n+"";var r=n.length;return 2>r?r?Nn(n,t):n:(r=Nn(n,Cu(t/P(n))),St.test(n)?r.match(It).slice(0,t).join(""):r.slice(0,t))}function jr(t,n,e,u){function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Jt&&this instanceof o?f:t;++an?1:-1:Ne(e)||0;var u=-1;r=Du(Cu((r-n)/(e||1)),0);for(var o=Array(r);r--;)o[t?r:++u]=n,n+=e;return o}}function wr(t,n,r,e,u,o,i,f,c,a){var l=8&n;f=f?er(f):T;var s=l?i:T;i=l?T:i;var h=l?o:T;return o=l?T:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),n=[t,n,u,h,s,o,i,f,c,a],r=r.apply(T,n), -Zr(t)&&go(r,n),r.placeholder=e,r}function Ar(t){var n=au[t];return function(t,r){if(t=Ne(t),r=De(r)){var e=(Ze(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(Ze(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function Or(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new su("Expected a function");var a=e?e.length:0;if(a||(n&=-97,e=u=T),i=i===T?i:Du(De(i),0),f=f===T?f:De(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=T}var h=c?T:po(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1], -n=r|t,e=128==t&&8==r||128==t&&256==r&&h[8]>=o[7].length||384==t&&h[8]>=h[7].length&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?nr(e,r,h[4]):er(r),o[4]=e?F(o[3],"__lodash_placeholder__"):er(h[4])),(r=h[5])&&(e=o[5],o[5]=e?rr(e,r,h[6]):er(r),o[6]=e?F(o[5],"__lodash_placeholder__"):er(h[6])),(r=h[7])&&(o[7]=er(r)),128&t&&(o[8]=null==o[8]?h[8]:Fu(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:Du(o[9]-a,0), -!f&&24&n&&(n&=-25),(h?so:go)(n&&1!=n?8==n||16==n?vr(t,n,f):32!=n&&33!=n||u.length?dr.apply(T,o):jr(t,n,r,e):sr(t,n,r),o)}function kr(t,n,r,e,u,o){var i=-1,f=2&u,c=1&u,a=t.length,l=n.length;if(!(a==l||f&&l>a))return false;if(l=o.get(t))return l==n;for(l=true,o.set(t,n);++in?0:n,e)):[]}function Hr(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:De(n),n=e-n,Zn(t,0,0>n?0:n)):[]}function Qr(t){return t?t[0]:T}function Xr(t){var n=t?t.length:0;return n?t[n-1]:T}function te(t,n){return t&&t.length&&n&&n.length?$n(t,n):t}function ne(t){return t?Zu.call(t):t}function re(t){if(!t||!t.length)return[];var n=0;return t=i(t,function(t){return we(t)?(n=Du(t.length,n), -!0):void 0}),w(n,function(n){return a(t,Mn(n))})}function ee(t,n){if(!t||!t.length)return[];var e=re(t);return null==n?e:a(e,function(t){return r(n,T,t)})}function ue(t){return t=xt(t),t.__chain__=true,t}function oe(t,n){return n(t)}function ie(){return this}function fe(t,n){return typeof n=="function"&&Qo(t)?u(t,n):fo(t,Sr(n))}function ce(t,n){var r;if(typeof n=="function"&&Qo(t)){for(r=t.length;r--&&false!==n(t[r],r,t););r=t}else r=co(t,Sr(n));return r}function ae(t,n){return(Qo(t)?a:Sn)(t,Sr(n,3))}function le(t,n,r){ -var e=-1,u=$e(t),o=u.length,i=o-1;for(n=(r?Fr(t,n,r):n===T)?1:on(De(n),0,o);++e=t&&(n=T),r}}function pe(t,n,r){return n=r?T:n,t=Or(t,8,T,T,T,T,T,n),t.placeholder=pe.placeholder,t}function _e(t,n,r){return n=r?T:n, -t=Or(t,16,T,T,T,T,T,n),t.placeholder=_e.placeholder,t}function ve(t,n,r){function e(n){var r=c,e=a;return c=a=T,p=n,l=t.apply(e,r)}function u(t){var r=t-h;return t-=p,!h||r>=n||0>r||false!==v&&t>=v}function o(){var t=Zo();if(u(t))return i(t);var r;r=t-p,t=n-(t-h),r=false===v?t:Fu(t,v-r),s=Wu(o,r)}function i(t){return Ou(s),s=T,g&&c?e(t):(c=a=T,l)}function f(){var t=Zo(),r=u(t);return c=arguments,a=this,h=t,r?s===T?(p=t=h,s=Wu(o,n),_?e(t):l):(Ou(s),s=Wu(o,n),e(h)):l}var c,a,l,s,h=0,p=0,_=false,v=false,g=true;if(typeof t!="function")throw new su("Expected a function"); -return n=Ne(n)||0,Ie(r)&&(_=!!r.leading,v="maxWait"in r&&Du(Ne(r.maxWait)||0,n),g="trailing"in r?!!r.trailing:g),f.cancel=function(){s!==T&&Ou(s),h=p=0,c=a=s=T},f.flush=function(){return s===T?l:i(Zo())},f}function ge(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e),r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new su("Expected a function");return r.cache=new(ge.Cache||Lt),r}function de(t,n){if(typeof t!="function")throw new su("Expected a function"); -return n=Du(n===T?t.length-1:De(n),0),function(){for(var e=arguments,u=-1,o=Du(e.length-n,0),i=Array(o);++un}function je(t){return we(t)&&vu.call(t,"callee")&&(!Ru.call(t,"callee")||"[object Arguments]"==yu.call(t)); -}function me(t){return null!=t&&Ee(_o(t))&&!Oe(t)}function we(t){return Se(t)&&me(t)}function Ae(t){return Se(t)?"[object Error]"==yu.call(t)||typeof t.message=="string"&&typeof t.name=="string":false}function Oe(t){return t=Ie(t)?yu.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function ke(t){return typeof t=="number"&&t==De(t)}function Ee(t){return typeof t=="number"&&t>-1&&0==t%1&&9007199254740991>=t}function Ie(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Se(t){ -return!!t&&typeof t=="object"}function Re(t){return Ie(t)?(Oe(t)||M(t)?xu:yt).test(Gr(t)):false}function We(t){return typeof t=="number"||Se(t)&&"[object Number]"==yu.call(t)}function Be(t){return!Se(t)||"[object Object]"!=yu.call(t)||M(t)?false:(t=Uu(Object(t)),null===t?true:(t=vu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&_u.call(t)==du))}function Ce(t){return Ie(t)&&"[object RegExp]"==yu.call(t)}function ze(t){return typeof t=="string"||!Qo(t)&&Se(t)&&"[object String]"==yu.call(t); -}function Ue(t){return typeof t=="symbol"||Se(t)&&"[object Symbol]"==yu.call(t)}function Me(t){return Se(t)&&Ee(t.length)&&!!zt[yu.call(t)]}function Le(t,n){return n>t}function $e(t){if(!t)return[];if(me(t))return ze(t)?t.match(It):er(t);if(Iu&&t[Iu])return $(t[Iu]());var n=zr(t);return("[object Map]"==n?D:"[object Set]"==n?N:He)(t)}function De(t){if(!t)return 0===t?t:0;if(t=Ne(t),t===V||t===-V)return 1.7976931348623157e308*(0>t?-1:1);var n=t%1;return t===t?n?t-n:t:0}function Fe(t){return t?on(De(t),0,4294967295):0; -}function Ne(t){if(typeof t=="number")return t;if(Ue(t))return K;if(Ie(t)&&(t=Oe(t.valueOf)?t.valueOf():t,t=Ie(t)?t+"":t),typeof t!="string")return 0===t?t:+t;t=t.replace(at,"");var n=dt.test(t);return n||bt.test(t)?Pt(t.slice(2),n?2:8):gt.test(t)?K:+t}function Pe(t){return ur(t,Ge(t))}function Ze(t){if(typeof t=="string")return t;if(null==t)return"";if(Ue(t))return io?io.call(t):"";var n=t+"";return"0"==n&&1/t==-V?"-0":n}function qe(t,n,r){return t=null==t?T:yn(t,n),t===T?r:t}function Te(t,n){return null!=t&&Ur(t,n,xn); -}function Ve(t,n){return null!=t&&Ur(t,n,jn)}function Ke(t){var n=qr(t);if(!n&&!me(t))return $u(Object(t));var r,e=Dr(t),u=!!e,e=e||[],o=e.length;for(r in t)!xn(t,r)||u&&("length"==r||L(r,o))||n&&"constructor"==r||e.push(r);return e}function Ge(t){for(var n=-1,r=qr(t),e=In(t),u=e.length,o=Dr(t),i=!!o,o=o||[],f=o.length;++ne.length?Kt(e,t,n):(r.array=null,r.map=new Lt(e))),(r=r.map)&&r.set(t,n),this};var fo=ar(vn),co=ar(gn,true),ao=lr(),lo=lr(true);ku&&!Ru.call({valueOf:1},"valueOf")&&(In=function(t){return $(ku(t))});var so=Yu?function(t,n){return Yu.set(t,n),t}:ru,ho=Ku&&2===new Ku([1,2]).size?function(t){ -return new Ku(t)}:ou,po=Yu?function(t){return Yu.get(t)}:ou,_o=Mn("length");Eu||(Cr=function(){return[]});var vo=Eu?function(t){for(var n=[];t;)l(n,Cr(t)),t=Uu(Object(t));return n}:Cr;(qu&&"[object DataView]"!=zr(new qu(new ArrayBuffer(1)))||Tu&&"[object Map]"!=zr(new Tu)||Vu&&"[object Promise]"!=zr(Vu.resolve())||Ku&&"[object Set]"!=zr(new Ku)||Gu&&"[object WeakMap]"!=zr(new Gu))&&(zr=function(t){var n=yu.call(t);if(t=Gr("[object Object]"==n?t.constructor:null))switch(t){case Xu:return"[object DataView]"; -case to:return"[object Map]";case no:return"[object Promise]";case ro:return"[object Set]";case eo:return"[object WeakMap]"}return n});var go=function(){var t=0,n=0;return function(r,e){var u=Zo(),o=16-(u-n);if(n=u,o>0){if(150<=++t)return r}else t=0;return so(r,e)}}(),yo=ge(function(t){var n=[];return Ze(t).replace(it,function(t,r,e,u){n.push(e?u.replace(ht,"$1"):r||t)}),n}),bo=de(function(t,n){return we(t)?sn(t,_n(n,1,true)):[]}),xo=de(function(t,n){var r=Xr(n);return we(r)&&(r=T),we(t)?sn(t,_n(n,1,true),Sr(r)):[]; -}),jo=de(function(t,n){var r=Xr(n);return we(r)&&(r=T),we(t)?sn(t,_n(n,1,true),T,r):[]}),mo=de(function(t){var n=a(t,rn);return n.length&&n[0]===t[0]?mn(n):[]}),wo=de(function(t){var n=Xr(t),r=a(t,rn);return n===Xr(r)?n=T:r.pop(),r.length&&r[0]===t[0]?mn(r,Sr(n)):[]}),Ao=de(function(t){var n=Xr(t),r=a(t,rn);return n===Xr(r)?n=T:r.pop(),r.length&&r[0]===t[0]?mn(r,T,n):[]}),Oo=de(te),ko=de(function(t,n){n=a(_n(n,1),String);var r=nn(t,n);return Dn(t,n.sort(R)),r}),Eo=de(function(t){return Gn(_n(t,1,true)); -}),Io=de(function(t){var n=Xr(t);return we(n)&&(n=T),Gn(_n(t,1,true),Sr(n))}),So=de(function(t){var n=Xr(t);return we(n)&&(n=T),Gn(_n(t,1,true),T,n)}),Ro=de(function(t,n){return we(t)?sn(t,n):[]}),Wo=de(function(t){return Hn(i(t,we))}),Bo=de(function(t){var n=Xr(t);return we(n)&&(n=T),Hn(i(t,we),Sr(n))}),Co=de(function(t){var n=Xr(t);return we(n)&&(n=T),Hn(i(t,we),T,n)}),zo=de(re),Uo=de(function(t){var n=t.length,n=n>1?t[n-1]:T,n=typeof n=="function"?(t.pop(),n):T;return ee(t,n)}),Mo=de(function(t){function n(n){ -return nn(n,t)}t=_n(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return 1>=r&&!this.__actions__.length&&u instanceof kt&&L(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:oe,args:[n],thisArg:T}),new Ot(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(T),t})):this.thru(n)}),Lo=fr(function(t,n,r){vu.call(t,r)?++t[r]:t[r]=1}),$o=fr(function(t,n,r){vu.call(t,r)?t[r].push(n):t[r]=[n]}),Do=de(function(t,n,e){var u=-1,o=typeof n=="function",i=Nr(n),f=me(t)?Array(t.length):[];return fo(t,function(t){ -var c=o?n:i&&null!=t?t[n]:T;f[++u]=c?r(c,t,e):An(t,n,e)}),f}),Fo=fr(function(t,n,r){t[r]=n}),No=fr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),Po=de(function(t,n){if(null==t)return[];var r=n.length;return r>1&&Fr(t,n[0],n[1])?n=[]:r>2&&Fr(n[0],n[1],n[2])&&(n.length=1),Cn(t,_n(n,1),[])}),Zo=fu.now,qo=de(function(t,n,r){var e=1;if(r.length)var u=F(r,Br(qo)),e=32|e;return Or(t,e,n,r,u)}),To=de(function(t,n,r){var e=3;if(r.length)var u=F(r,Br(To)),e=32|e;return Or(n,e,t,r,u)}),Vo=de(function(t,n){ -return ln(t,1,n)}),Ko=de(function(t,n,r){return ln(t,Ne(n)||0,r)});ge.Cache=Lt;var Go=de(function(t,n){n=a(_n(n,1),Sr());var e=n.length;return de(function(u){for(var o=-1,i=Fu(u.length,e);++o--t?n.apply(this,arguments):void 0}},xt.ary=se,xt.assign=ti,xt.assignIn=ni,xt.assignInWith=ri,xt.assignWith=ei,xt.at=ui,xt.before=he,xt.bind=qo,xt.bindAll=wi,xt.bindKey=To,xt.castArray=ye,xt.chain=ue,xt.chunk=function(t,n,r){if(n=(r?Fr(t,n,r):n===T)?1:Du(De(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,o=Array(Cu(r/n));r>e;)o[u++]=Zn(t,e,e+=n); -return o},xt.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++nt)return t?er(n):[];for(var r=Array(t-1);t--;)r[t-1]=arguments[t];for(var t=_n(r,1),r=-1,e=n.length,u=-1,o=t.length,i=Array(e+o);++rr&&(r=-r>u?0:u+r),e=e===T||e>u?u:De(e),0>e&&(e+=u),e=r>e?0:Fe(e);e>r;)t[r++]=n;return t},xt.filter=function(t,n){return(Qo(t)?i:pn)(t,Sr(n,3))},xt.flatMap=function(t,n){return _n(ae(t,n),1)},xt.flatMapDeep=function(t,n){return _n(ae(t,n),V)},xt.flatMapDepth=function(t,n,r){return r=r===T?1:De(r),_n(ae(t,n),r)},xt.flatten=function(t){ -return t&&t.length?_n(t,1):[]},xt.flattenDeep=function(t){return t&&t.length?_n(t,V):[]},xt.flattenDepth=function(t,n){return t&&t.length?(n=n===T?1:De(n),_n(t,n)):[]},xt.flip=function(t){return Or(t,512)},xt.flow=Ai,xt.flowRight=Oi,xt.fromPairs=function(t){for(var n=-1,r=t?t.length:0,e={};++nn?0:n)):[]},xt.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:De(n),n=e-n,Zn(t,0>n?0:n,e)):[]},xt.takeRightWhile=function(t,n){return t&&t.length?Jn(t,Sr(n,3),false,true):[]},xt.takeWhile=function(t,n){return t&&t.length?Jn(t,Sr(n,3)):[]},xt.tap=function(t,n){return n(t),t},xt.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new su("Expected a function");return Ie(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),ve(t,n,{leading:e,maxWait:n, -trailing:u})},xt.thru=oe,xt.toArray=$e,xt.toPairs=Je,xt.toPairsIn=Ye,xt.toPath=function(t){return Qo(t)?a(t,en):Ue(t)?[t]:er(yo(t))},xt.toPlainObject=Pe,xt.transform=function(t,n,r){var e=Qo(t)||Me(t);if(n=Sr(n,4),null==r)if(e||Ie(t)){var o=t.constructor;r=e?Qo(t)?new o:[]:Oe(o)?an(Uu(Object(t))):{}}else r={};return(e?u:vn)(t,function(t,e,u){return n(r,t,e,u)}),r},xt.unary=function(t){return se(t,1)},xt.union=Eo,xt.unionBy=Io,xt.unionWith=So,xt.uniq=function(t){return t&&t.length?Gn(t):[]},xt.uniqBy=function(t,n){ -return t&&t.length?Gn(t,Sr(n)):[]},xt.uniqWith=function(t,n){return t&&t.length?Gn(t,T,n):[]},xt.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=Nr(e,r)?[e]:un(e);r=Kr(r,e),e=Xr(e),r=null!=r&&Te(r,e)?delete r[e]:true}return r},xt.unzip=re,xt.unzipWith=ee,xt.update=function(t,n,r){return null==t?t:Pn(t,n,(typeof r=="function"?r:ru)(yn(t,n)),void 0)},xt.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null!=t&&(t=Pn(t,n,(typeof r=="function"?r:ru)(yn(t,n)),e)),t},xt.values=He, -xt.valuesIn=function(t){return null==t?[]:k(t,Ge(t))},xt.without=Ro,xt.words=tu,xt.wrap=function(t,n){return n=null==n?ru:n,Jo(n,t)},xt.xor=Wo,xt.xorBy=Bo,xt.xorWith=Co,xt.zip=zo,xt.zipObject=function(t,n){return Qn(t||[],n||[],Qt)},xt.zipObjectDeep=function(t,n){return Qn(t||[],n||[],Pn)},xt.zipWith=Uo,xt.entries=Je,xt.entriesIn=Ye,xt.extend=ni,xt.extendWith=ri,uu(xt,xt),xt.add=Ci,xt.attempt=mi,xt.camelCase=_i,xt.capitalize=Qe,xt.ceil=zi,xt.clamp=function(t,n,r){return r===T&&(r=n,n=T),r!==T&&(r=Ne(r), -r=r===r?r:0),n!==T&&(n=Ne(n),n=n===n?n:0),on(Ne(t),n,r)},xt.clone=function(t){return fn(t,false,true)},xt.cloneDeep=function(t){return fn(t,true,true)},xt.cloneDeepWith=function(t,n){return fn(t,true,true,n)},xt.cloneWith=function(t,n){return fn(t,false,true,n)},xt.deburr=Xe,xt.divide=Ui,xt.endsWith=function(t,n,r){t=Ze(t),n=typeof n=="string"?n:n+"";var e=t.length;return r=r===T?e:on(De(r),0,e),r-=n.length,r>=0&&t.indexOf(n,r)==r},xt.eq=be,xt.escape=function(t){return(t=Ze(t))&&tt.test(t)?t.replace(Q,C):t},xt.escapeRegExp=function(t){ -return(t=Ze(t))&&ct.test(t)?t.replace(ft,"\\$&"):t},xt.every=function(t,n,r){var e=Qo(t)?o:hn;return r&&Fr(t,n,r)&&(n=T),e(t,Sr(n,3))},xt.find=function(t,n){if(n=Sr(n,3),Qo(t)){var r=g(t,n);return r>-1?t[r]:T}return v(t,n,fo)},xt.findIndex=function(t,n){return t&&t.length?g(t,Sr(n,3)):-1},xt.findKey=function(t,n){return v(t,Sr(n,3),vn,true)},xt.findLast=function(t,n){if(n=Sr(n,3),Qo(t)){var r=g(t,n,true);return r>-1?t[r]:T}return v(t,n,co)},xt.findLastIndex=function(t,n){return t&&t.length?g(t,Sr(n,3),true):-1; -},xt.findLastKey=function(t,n){return v(t,Sr(n,3),gn,true)},xt.floor=Mi,xt.forEach=fe,xt.forEachRight=ce,xt.forIn=function(t,n){return null==t?t:ao(t,Sr(n),Ge)},xt.forInRight=function(t,n){return null==t?t:lo(t,Sr(n),Ge)},xt.forOwn=function(t,n){return t&&vn(t,Sr(n))},xt.forOwnRight=function(t,n){return t&&gn(t,Sr(n))},xt.get=qe,xt.gt=xe,xt.gte=function(t,n){return t>=n},xt.has=Te,xt.hasIn=Ve,xt.head=Qr,xt.identity=ru,xt.includes=function(t,n,r,e){return t=me(t)?t:He(t),r=r&&!e?De(r):0,e=t.length,0>r&&(r=Du(e+r,0)), -ze(t)?e>=r&&-1r&&(r=Du(e+r,0)),d(t,n,r)):-1},xt.inRange=function(t,n,r){return n=Ne(n)||0,r===T?(r=n,n=0):r=Ne(r)||0,t=Ne(t),t>=Fu(n,r)&&t=-9007199254740991&&9007199254740991>=t},xt.isSet=function(t){return Se(t)&&"[object Set]"==zr(t)},xt.isString=ze,xt.isSymbol=Ue,xt.isTypedArray=Me,xt.isUndefined=function(t){return t===T},xt.isWeakMap=function(t){return Se(t)&&"[object WeakMap]"==zr(t)},xt.isWeakSet=function(t){return Se(t)&&"[object WeakSet]"==yu.call(t)},xt.join=function(t,n){return t?Lu.call(t,n):""},xt.kebabCase=vi,xt.last=Xr,xt.lastIndexOf=function(t,n,r){var e=t?t.length:0; -if(!e)return-1;var u=e;if(r!==T&&(u=De(r),u=(0>u?Du(e+u,0):Fu(u,e-1))+1),n!==n)return U(t,u,true);for(;u--;)if(t[u]===n)return u;return-1},xt.lowerCase=gi,xt.lowerFirst=di,xt.lt=Le,xt.lte=function(t,n){return n>=t},xt.max=function(t){return t&&t.length?_(t,ru,xe):T},xt.maxBy=function(t,n){return t&&t.length?_(t,Sr(n),xe):T},xt.mean=function(t){return b(t,ru)},xt.meanBy=function(t,n){return b(t,Sr(n))},xt.min=function(t){return t&&t.length?_(t,ru,Le):T},xt.minBy=function(t,n){return t&&t.length?_(t,Sr(n),Le):T; -},xt.multiply=Li,xt.noConflict=function(){return Jt._===this&&(Jt._=bu),this},xt.noop=ou,xt.now=Zo,xt.pad=function(t,n,r){t=Ze(t);var e=(n=De(n))?P(t):0;return n&&n>e?(n=(n-e)/2,xr(zu(n),r)+t+xr(Cu(n),r)):t},xt.padEnd=function(t,n,r){t=Ze(t);var e=(n=De(n))?P(t):0;return n&&n>e?t+xr(n-e,r):t},xt.padStart=function(t,n,r){t=Ze(t);var e=(n=De(n))?P(t):0;return n&&n>e?xr(n-e,r)+t:t},xt.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),t=Ze(t).replace(at,""),Nu(t,n||(vt.test(t)?16:10))},xt.random=function(t,n,r){ -if(r&&typeof r!="boolean"&&Fr(t,n,r)&&(n=r=T),r===T&&(typeof n=="boolean"?(r=n,n=T):typeof t=="boolean"&&(r=t,t=T)),t===T&&n===T?(t=0,n=1):(t=Ne(t)||0,n===T?(n=t,t=0):n=Ne(n)||0),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=Pu(),Fu(t+r*(n-t+Nt("1e-"+((r+"").length-1))),n)):Fn(t,n)},xt.reduce=function(t,n,r){var e=Qo(t)?s:x,u=3>arguments.length;return e(t,Sr(n,4),r,u,fo)},xt.reduceRight=function(t,n,r){var e=Qo(t)?h:x,u=3>arguments.length;return e(t,Sr(n,4),r,u,co)},xt.repeat=function(t,n,r){return n=(r?Fr(t,n,r):n===T)?1:De(n), -Nn(Ze(t),n)},xt.replace=function(){var t=arguments,n=Ze(t[0]);return 3>t.length?n:n.replace(t[1],t[2])},xt.result=function(t,n,r){n=Nr(n,t)?[n]:un(n);var e=-1,u=n.length;for(u||(t=T,u=1);++e0?t[Fn(0,n-1)]:T},xt.size=function(t){if(null==t)return 0;if(me(t)){var n=t.length;return n&&ze(t)?P(t):n}return Se(t)&&(n=zr(t),"[object Map]"==n||"[object Set]"==n)?t.size:Ke(t).length; -},xt.snakeCase=yi,xt.some=function(t,n,r){var e=Qo(t)?p:qn;return r&&Fr(t,n,r)&&(n=T),e(t,Sr(n,3))},xt.sortedIndex=function(t,n){return Tn(t,n)},xt.sortedIndexBy=function(t,n,r){return Vn(t,n,Sr(r))},xt.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=Tn(t,n);if(r>e&&be(t[e],n))return e}return-1},xt.sortedLastIndex=function(t,n){return Tn(t,n,true)},xt.sortedLastIndexBy=function(t,n,r){return Vn(t,n,Sr(r),true)},xt.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=Tn(t,n,true)-1;if(be(t[r],n))return r; -}return-1},xt.startCase=bi,xt.startsWith=function(t,n,r){return t=Ze(t),r=on(De(r),0,t.length),t.lastIndexOf(n,r)==r},xt.subtract=Di,xt.sum=function(t){return t&&t.length?m(t,ru):0},xt.sumBy=function(t,n){return t&&t.length?m(t,Sr(n)):0},xt.template=function(t,n,r){var e=xt.templateSettings;r&&Fr(t,n,r)&&(n=T),t=Ze(t),n=ri({},n,e,Gt),r=ri({},n.imports,e.imports,Gt);var u,o,i=Ke(r),f=k(r,i),c=0;r=n.interpolate||mt;var a="__p+='";r=lu((n.escape||mt).source+"|"+r.source+"|"+(r===et?pt:mt).source+"|"+(n.evaluate||mt).source+"|$","g"); -var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,i,f,l){return e||(e=i),a+=t.slice(c,l).replace(wt,z),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(G,""):a).replace(J,"$1").replace(Y,"$1;"),a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}", -n=mi(function(){return Function(i,l+"return "+a).apply(T,f)}),n.source=a,Ae(n))throw n;return n},xt.times=function(t,n){if(t=De(t),1>t||t>9007199254740991)return[];var r=4294967295,e=Fu(t,4294967295);for(n=Sr(n),t-=4294967295,e=w(e,n);++r=o)return t;if(o=r-P(e),1>o)return e;if(r=i?i.slice(0,o).join(""):t.slice(0,o),u===T)return r+e;if(i&&(o+=r.length-o),Ce(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=lu(u.source,Ze(_t.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===T?o:c)}}else t.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},xt.unescape=function(t){return(t=Ze(t))&&X.test(t)?t.replace(H,Z):t},xt.uniqueId=function(t){ -var n=++gu;return Ze(t)+n},xt.upperCase=xi,xt.upperFirst=ji,xt.each=fe,xt.eachRight=ce,xt.first=Qr,uu(xt,function(){var t={};return vn(xt,function(n,r){vu.call(xt.prototype,r)||(t[r]=n)}),t}(),{chain:false}),xt.VERSION="4.8.2",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){xt[t].placeholder=xt}),u(["drop","take"],function(t,n){kt.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new kt(this);r=r===T?1:Du(De(r),0);var u=this.clone();return e?u.__takeCount__=Fu(r,u.__takeCount__):u.__views__.push({ -size:Fu(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},kt.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;kt.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:Sr(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");kt.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right"); -kt.prototype[t]=function(){return this.__filtered__?new kt(this):this[r](1)}}),kt.prototype.compact=function(){return this.filter(ru)},kt.prototype.find=function(t){return this.filter(t).head()},kt.prototype.findLast=function(t){return this.reverse().find(t)},kt.prototype.invokeMap=de(function(t,n){return typeof t=="function"?new kt(this):this.map(function(r){return An(r,t,n)})}),kt.prototype.reject=function(t){return t=Sr(t,3),this.filter(function(n){return!t(n)})},kt.prototype.slice=function(t,n){ -t=De(t);var r=this;return r.__filtered__&&(t>0||0>n)?new kt(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==T&&(n=De(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},kt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},kt.prototype.toArray=function(){return this.take(4294967295)},vn(kt.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=xt[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(xt.prototype[n]=function(){ -function n(t){return t=u.apply(xt,l([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof kt,a=f[0],s=c||Qo(i);s&&r&&typeof a=="function"&&1!=a.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&s?(i=c?i:new kt(this),i=t.apply(i,f),i.__actions__.push({func:oe,args:[n],thisArg:T}),new Ot(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=hu[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t); -xt.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(Qo(u)?u:[],t)}return this[r](function(r){return n.apply(Qo(r)?r:[],t)})}}),vn(kt.prototype,function(t,n){var r=xt[n];if(r){var e=r.name+"";(Qu[e]||(Qu[e]=[])).push({name:n,func:r})}}),Qu[dr(T,2).name]=[{name:"wrapper",func:T}],kt.prototype.clone=function(){var t=new kt(this.__wrapped__);return t.__actions__=er(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=er(this.__iteratees__), -t.__takeCount__=this.__takeCount__,t.__views__=er(this.__views__),t},kt.prototype.reverse=function(){if(this.__filtered__){var t=new kt(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t},kt.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=Qo(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++co||o==t&&a==t)return Yn(n,this.__actions__);e=[];t:for(;t--&&a>c;){for(u+=r,o=-1,l=n[u];++o=this.__values__.length,n=t?T:this.__values__[this.__index__++];return{done:t,value:n}},xt.prototype.plant=function(t){for(var n,r=this;r instanceof At;){var e=Jr(r);e.__index__=0,e.__values__=T,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},xt.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof kt?(this.__actions__.length&&(t=new kt(this)),t=t.reverse(),t.__actions__.push({func:oe, -args:[ne],thisArg:T}),new Ot(t,this.__chain__)):this.thru(ne)},xt.prototype.toJSON=xt.prototype.valueOf=xt.prototype.value=function(){return Yn(this.__wrapped__,this.__actions__)},Iu&&(xt.prototype[Iu]=ie),xt}var T,V=1/0,K=NaN,G=/\b__p\+='';/g,J=/\b(__p\+=)''\+/g,Y=/(__e\(.*?\)|\b__t\))\+'';/g,H=/&(?:amp|lt|gt|quot|#39|#96);/g,Q=/[&<>"'`]/g,X=RegExp(H.source),tt=RegExp(Q.source),nt=/<%-([\s\S]+?)%>/g,rt=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,ut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ot=/^\w*$/,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,ft=/[\\^$.*+?()[\]{}|]/g,ct=RegExp(ft.source),at=/^\s+|\s+$/g,lt=/^\s+/,st=/\s+$/,ht=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_t=/\w*$/,vt=/^0x/i,gt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,xt=/^(?:0|[1-9]\d*)$/,jt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,mt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,At="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",Ot="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+At,kt="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",Et=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),It=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+kt+At,"g"),St=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Rt=/[a-zA-Z0-9]+/g,Wt=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|\\d+",Ot].join("|"),"g"),Bt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ct="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),zt={}; +return o&&o.length?Gn(o,n,r):[]}function Qn(t,n,r){for(var e=-1,u=t.length,o=n.length,i={};++ee?n[e]:T);return i}function Xn(t,n){if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function tr(t){var n=new t.constructor(t.byteLength);return new ku(n).set(new ku(t)),n}function nr(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=Nu(o-i,0),l=Array(c+a);for(e=!e;++fu)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function rr(t,n,r,e){ +var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=Nu(o-f,0),s=Array(l+a);for(e=!e;++uu)&&(s[l+r[i]]=t[u++]);return s}function er(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r1?r[u-1]:T,i=u>2?r[2]:T,o=typeof o=="function"?(u--,o):T;for(i&&Pr(r[0],r[1],i)&&(o=3>u?T:o,u=1),n=Object(n);++ei&&f[0]!==a&&f[i-1]!==a?[]:F(f,a),i-=c.length,e>i?wr(t,n,dr,u.placeholder,T,f,c,T,T,e-i):r(this&&this!==Jt&&this instanceof u?o:t,this,f); +}var o=_r(t);return u}function gr(t){return be(function(n){n=_n(n,1);var r=n.length,e=r,u=Ot.prototype.thru;for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new pu("Expected a function");if(u&&!i&&"wrapper"==Ir(o))var i=new Ot([],true)}for(e=i?e:r;++e=200)return i.plant(e).value(); +for(var u=0,t=r?n[u].apply(this,t):e;++ud)return j=F(b,j),wr(t,n,dr,l.placeholder,r,b,j,f,c,a-d);if(j=h?r:this,y=p?j[t]:t,d=b.length,f){x=b.length;for(var m=Pu(f.length,x),w=er(b);m--;){var A=f[m];b[m]=L(A,x)?w[A]:T}}else v&&d>1&&b.reverse();return s&&d>c&&(b.length=c), +this&&this!==Jt&&this instanceof l&&(y=g||_r(y)),y.apply(j,b)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?T:_r(t);return l}function yr(t,n){return function(r,e){return wn(r,t,n(e))}}function br(t){return be(function(n){return n=a(_n(n,1,Nr),Sr()),be(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function xr(t,n){n=n===T?" ":n+"";var r=n.length;return 2>r?r?Nn(n,t):n:(r=Nn(n,Uu(t/P(n))),St.test(n)?r.match(It).slice(0,t).join(""):r.slice(0,t))}function jr(t,n,e,u){function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Jt&&this instanceof o?f:t;++an?1:-1:Ze(e)||0;var u=-1;r=Nu(Uu((r-n)/(e||1)),0);for(var o=Array(r);r--;)o[t?r:++u]=n,n+=e;return o}}function wr(t,n,r,e,u,o,i,f,c,a){var l=8&n;f=f?er(f):T;var s=l?i:T;i=l?T:i;var h=l?o:T;return o=l?T:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),n=[t,n,u,h,s,o,i,f,c,a],r=r.apply(T,n), +Tr(t)&&bo(r,n),r.placeholder=e,r}function Ar(t){var n=su[t];return function(t,r){if(t=Ze(t),r=Ne(r)){var e=(Te(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(Te(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function Or(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new pu("Expected a function");var a=e?e.length:0;if(a||(n&=-97,e=u=T),i=i===T?i:Nu(Ne(i),0),f=f===T?f:Ne(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=T}var h=c?T:vo(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1], +n=r|t,e=128==t&&8==r||128==t&&256==r&&h[8]>=o[7].length||384==t&&h[8]>=h[7].length&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?nr(e,r,h[4]):er(r),o[4]=e?F(o[3],"__lodash_placeholder__"):er(h[4])),(r=h[5])&&(e=o[5],o[5]=e?rr(e,r,h[6]):er(r),o[6]=e?F(o[5],"__lodash_placeholder__"):er(h[6])),(r=h[7])&&(o[7]=er(r)),128&t&&(o[8]=null==o[8]?h[8]:Pu(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:Nu(o[9]-a,0), +!f&&24&n&&(n&=-25),(h?po:bo)(n&&1!=n?8==n||16==n?vr(t,n,f):32!=n&&33!=n||u.length?dr.apply(T,o):jr(t,n,r,e):sr(t,n,r),o)}function kr(t,n,r,e,u,o){var i=-1,f=2&u,c=1&u,a=t.length,l=n.length;if(!(a==l||f&&l>a))return false;if(l=o.get(t))return l==n;for(l=true,o.set(t,n);++in?0:n,e)):[]}function Xr(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Ne(n),n=e-n,Zn(t,0,0>n?0:n)):[]}function te(t){return t?t[0]:T}function ne(t){var n=t?t.length:0;return n?t[n-1]:T}function re(t,n){return t&&t.length&&n&&n.length?$n(t,n):t; +}function ee(t){return t?Tu.call(t):t}function ue(t){if(!t||!t.length)return[];var n=0;return t=i(t,function(t){return Oe(t)?(n=Nu(t.length,n),true):void 0}),w(n,function(n){return a(t,Mn(n))})}function oe(t,n){if(!t||!t.length)return[];var e=ue(t);return null==n?e:a(e,function(t){return r(n,T,t)})}function ie(t){return t=xt(t),t.__chain__=true,t}function fe(t,n){return n(t)}function ce(){return this}function ae(t,n){return typeof n=="function"&&ti(t)?u(t,n):ao(t,Sr(n))}function le(t,n){var r;if(typeof n=="function"&&ti(t)){ +for(r=t.length;r--&&false!==n(t[r],r,t););r=t}else r=lo(t,Sr(n));return r}function se(t,n){return(ti(t)?a:Sn)(t,Sr(n,3))}function he(t,n,r){var e=-1,u=Fe(t),o=u.length,i=o-1;for(n=(r?Pr(t,n,r):n===T)?1:on(Ne(n),0,o);++e=t&&(n=T),r}}function ve(t,n,r){return n=r?T:n,t=Or(t,8,T,T,T,T,T,n),t.placeholder=ve.placeholder,t}function ge(t,n,r){return n=r?T:n,t=Or(t,16,T,T,T,T,T,n),t.placeholder=ge.placeholder,t}function de(t,n,r){function e(n){var r=c,e=a;return c=a=T,p=n,l=t.apply(e,r)}function u(t){var r=t-h;return t-=p,!h||r>=n||0>r||false!==v&&t>=v}function o(){var t=To();if(u(t))return i(t);var r;r=t-p,t=n-(t-h),r=false===v?t:Pu(t,v-r),s=Cu(o,r)}function i(t){return Eu(s),s=T,g&&c?e(t):(c=a=T,l)}function f(){var t=To(),r=u(t); +return c=arguments,a=this,h=t,r?s===T?(p=t=h,s=Cu(o,n),_?e(t):l):(Eu(s),s=Cu(o,n),e(h)):l}var c,a,l,s,h=0,p=0,_=false,v=false,g=true;if(typeof t!="function")throw new pu("Expected a function");return n=Ze(n)||0,Re(r)&&(_=!!r.leading,v="maxWait"in r&&Nu(Ze(r.maxWait)||0,n),g="trailing"in r?!!r.trailing:g),f.cancel=function(){s!==T&&Eu(s),h=p=0,c=a=s=T},f.flush=function(){return s===T?l:i(To())},f}function ye(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e), +r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new pu("Expected a function");return r.cache=new(ye.Cache||Lt),r}function be(t,n){if(typeof t!="function")throw new pu("Expected a function");return n=Nu(n===T?t.length-1:Ne(n),0),function(){for(var e=arguments,u=-1,o=Nu(e.length-n,0),i=Array(o);++un}function we(t){return Oe(t)&&du.call(t,"callee")&&(!Bu.call(t,"callee")||"[object Arguments]"==xu.call(t))}function Ae(t){return null!=t&&Se(go(t))&&!Ee(t)}function Oe(t){return We(t)&&Ae(t)}function ke(t){return We(t)?"[object Error]"==xu.call(t)||typeof t.message=="string"&&typeof t.name=="string":false}function Ee(t){return t=Re(t)?xu.call(t):"", +"[object Function]"==t||"[object GeneratorFunction]"==t}function Ie(t){return typeof t=="number"&&t==Ne(t)}function Se(t){return typeof t=="number"&&t>-1&&0==t%1&&9007199254740991>=t}function Re(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function We(t){return!!t&&typeof t=="object"}function Be(t){return Re(t)?(Ee(t)||M(t)?mu:yt).test(Yr(t)):false}function Ce(t){return typeof t=="number"||We(t)&&"[object Number]"==xu.call(t)}function ze(t){return!We(t)||"[object Object]"!=xu.call(t)||M(t)?false:(t=Lu(Object(t)), +null===t?true:(t=du.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&gu.call(t)==bu))}function Ue(t){return Re(t)&&"[object RegExp]"==xu.call(t)}function Me(t){return typeof t=="string"||!ti(t)&&We(t)&&"[object String]"==xu.call(t)}function Le(t){return typeof t=="symbol"||We(t)&&"[object Symbol]"==xu.call(t)}function $e(t){return We(t)&&Se(t.length)&&!!zt[xu.call(t)]}function De(t,n){return n>t}function Fe(t){if(!t)return[];if(Ae(t))return Me(t)?t.match(It):er(t);if(Ru&&t[Ru])return $(t[Ru]()); +var n=zr(t);return("[object Map]"==n?D:"[object Set]"==n?N:Xe)(t)}function Ne(t){if(!t)return 0===t?t:0;if(t=Ze(t),t===V||t===-V)return 1.7976931348623157e308*(0>t?-1:1);var n=t%1;return t===t?n?t-n:t:0}function Pe(t){return t?on(Ne(t),0,4294967295):0}function Ze(t){if(typeof t=="number")return t;if(Le(t))return K;if(Re(t)&&(t=Ee(t.valueOf)?t.valueOf():t,t=Re(t)?t+"":t),typeof t!="string")return 0===t?t:+t;t=t.replace(at,"");var n=dt.test(t);return n||bt.test(t)?Pt(t.slice(2),n?2:8):gt.test(t)?K:+t; +}function qe(t){return ur(t,Ye(t))}function Te(t){if(typeof t=="string")return t;if(null==t)return"";if(Le(t))return co?co.call(t):"";var n=t+"";return"0"==n&&1/t==-V?"-0":n}function Ve(t,n,r){return t=null==t?T:yn(t,n),t===T?r:t}function Ke(t,n){return null!=t&&Ur(t,n,xn)}function Ge(t,n){return null!=t&&Ur(t,n,jn)}function Je(t){var n=Vr(t);if(!n&&!Ae(t))return Fu(Object(t));var r,e=Dr(t),u=!!e,e=e||[],o=e.length;for(r in t)!xn(t,r)||u&&("length"==r||L(r,o))||n&&"constructor"==r||e.push(r);return e; +}function Ye(t){for(var n=-1,r=Vr(t),e=In(t),u=e.length,o=Dr(t),i=!!o,o=o||[],f=o.length;++ne.length?Kt(e,t,n):(r.array=null,r.map=new Lt(e))),(r=r.map)&&r.set(t,n),this};var ao=ar(vn),lo=ar(gn,true),so=lr(),ho=lr(true);Iu&&!Bu.call({valueOf:1},"valueOf")&&(In=function(t){return $(Iu(t))});var po=Qu?function(t,n){return Qu.set(t,n),t}:uu,_o=Ju&&2===new Ju([1,2]).size?function(t){ +return new Ju(t)}:fu,vo=Qu?function(t){return Qu.get(t)}:fu,go=Mn("length");Su||(Cr=function(){return[]});var yo=Su?function(t){for(var n=[];t;)l(n,Cr(t)),t=Lu(Object(t));return n}:Cr;(Vu&&"[object DataView]"!=zr(new Vu(new ArrayBuffer(1)))||Ku&&"[object Map]"!=zr(new Ku)||Gu&&"[object Promise]"!=zr(Gu.resolve())||Ju&&"[object Set]"!=zr(new Ju)||Yu&&"[object WeakMap]"!=zr(new Yu))&&(zr=function(t){var n=xu.call(t);if(t=(t="[object Object]"==n?t.constructor:T)?Yr(t):T)switch(t){case no:return"[object DataView]"; +case ro:return"[object Map]";case eo:return"[object Promise]";case uo:return"[object Set]";case oo:return"[object WeakMap]"}return n});var bo=function(){var t=0,n=0;return function(r,e){var u=To(),o=16-(u-n);if(n=u,o>0){if(150<=++t)return r}else t=0;return po(r,e)}}(),xo=ye(function(t){var n=[];return Te(t).replace(it,function(t,r,e,u){n.push(e?u.replace(ht,"$1"):r||t)}),n}),jo=be(function(t,n){return Oe(t)?sn(t,_n(n,1,Oe,true)):[]}),mo=be(function(t,n){var r=ne(n);return Oe(r)&&(r=T),Oe(t)?sn(t,_n(n,1,Oe,true),Sr(r)):[]; +}),wo=be(function(t,n){var r=ne(n);return Oe(r)&&(r=T),Oe(t)?sn(t,_n(n,1,Oe,true),T,r):[]}),Ao=be(function(t){var n=a(t,rn);return n.length&&n[0]===t[0]?mn(n):[]}),Oo=be(function(t){var n=ne(t),r=a(t,rn);return n===ne(r)?n=T:r.pop(),r.length&&r[0]===t[0]?mn(r,Sr(n)):[]}),ko=be(function(t){var n=ne(t),r=a(t,rn);return n===ne(r)?n=T:r.pop(),r.length&&r[0]===t[0]?mn(r,T,n):[]}),Eo=be(re),Io=be(function(t,n){n=a(_n(n,1),String);var r=nn(t,n);return Dn(t,n.sort(R)),r}),So=be(function(t){return Gn(_n(t,1,Oe,true)); +}),Ro=be(function(t){var n=ne(t);return Oe(n)&&(n=T),Gn(_n(t,1,Oe,true),Sr(n))}),Wo=be(function(t){var n=ne(t);return Oe(n)&&(n=T),Gn(_n(t,1,Oe,true),T,n)}),Bo=be(function(t,n){return Oe(t)?sn(t,n):[]}),Co=be(function(t){return Hn(i(t,Oe))}),zo=be(function(t){var n=ne(t);return Oe(n)&&(n=T),Hn(i(t,Oe),Sr(n))}),Uo=be(function(t){var n=ne(t);return Oe(n)&&(n=T),Hn(i(t,Oe),T,n)}),Mo=be(ue),Lo=be(function(t){var n=t.length,n=n>1?t[n-1]:T,n=typeof n=="function"?(t.pop(),n):T;return oe(t,n)}),$o=be(function(t){ +function n(n){return nn(n,t)}t=_n(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return 1>=r&&!this.__actions__.length&&u instanceof kt&&L(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:fe,args:[n],thisArg:T}),new Ot(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(T),t})):this.thru(n)}),Do=fr(function(t,n,r){du.call(t,r)?++t[r]:t[r]=1}),Fo=fr(function(t,n,r){du.call(t,r)?t[r].push(n):t[r]=[n]}),No=be(function(t,n,e){var u=-1,o=typeof n=="function",i=Zr(n),f=Ae(t)?Array(t.length):[]; +return ao(t,function(t){var c=o?n:i&&null!=t?t[n]:T;f[++u]=c?r(c,t,e):An(t,n,e)}),f}),Po=fr(function(t,n,r){t[r]=n}),Zo=fr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),qo=be(function(t,n){if(null==t)return[];var r=n.length;return r>1&&Pr(t,n[0],n[1])?n=[]:r>2&&Pr(n[0],n[1],n[2])&&(n.length=1),Cn(t,_n(n,1),[])}),To=au.now,Vo=be(function(t,n,r){var e=1;if(r.length)var u=F(r,Br(Vo)),e=32|e;return Or(t,e,n,r,u)}),Ko=be(function(t,n,r){var e=3;if(r.length)var u=F(r,Br(Ko)),e=32|e;return Or(n,e,t,r,u); +}),Go=be(function(t,n){return ln(t,1,n)}),Jo=be(function(t,n,r){return ln(t,Ze(n)||0,r)});ye.Cache=Lt;var Yo=be(function(t,n){n=a(_n(n,1,Nr),Sr());var e=n.length;return be(function(u){for(var o=-1,i=Pu(u.length,e);++o--t?n.apply(this,arguments):void 0}},xt.ary=pe,xt.assign=ri,xt.assignIn=ei,xt.assignInWith=ui,xt.assignWith=oi,xt.at=ii,xt.before=_e,xt.bind=Vo,xt.bindAll=Oi,xt.bindKey=Ko,xt.castArray=xe,xt.chain=ie,xt.chunk=function(t,n,r){if(n=(r?Pr(t,n,r):n===T)?1:Nu(Ne(n),0),r=t?t.length:0, +!r||1>n)return[];for(var e=0,u=0,o=Array(Uu(r/n));r>e;)o[u++]=Zn(t,e,e+=n);return o},xt.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++nt)return t?er(n):[];for(var r=Array(t-1);t--;)r[t-1]=arguments[t];for(var t=_n(r,1),r=-1,e=n.length,u=-1,o=t.length,i=Array(e+o);++rr&&(r=-r>u?0:u+r),e=e===T||e>u?u:Ne(e),0>e&&(e+=u),e=r>e?0:Pe(e);e>r;)t[r++]=n;return t},xt.filter=function(t,n){return(ti(t)?i:pn)(t,Sr(n,3))},xt.flatMap=function(t,n){return _n(se(t,n),1)},xt.flatMapDeep=function(t,n){return _n(se(t,n),V)},xt.flatMapDepth=function(t,n,r){ +return r=r===T?1:Ne(r),_n(se(t,n),r)},xt.flatten=function(t){return t&&t.length?_n(t,1):[]},xt.flattenDeep=function(t){return t&&t.length?_n(t,V):[]},xt.flattenDepth=function(t,n){return t&&t.length?(n=n===T?1:Ne(n),_n(t,n)):[]},xt.flip=function(t){return Or(t,512)},xt.flow=ki,xt.flowRight=Ei,xt.fromPairs=function(t){for(var n=-1,r=t?t.length:0,e={};++nr?0:r)):t.split(n,r)},xt.spread=function(t,n){if(typeof t!="function")throw new pu("Expected a function"); +return n=n===T?0:Nu(Ne(n),0),be(function(e){var u=e[n];return e=e.slice(0,n),u&&l(e,u),r(t,this,e)})},xt.tail=function(t){return Qr(t,1)},xt.take=function(t,n,r){return t&&t.length?(n=r||n===T?1:Ne(n),Zn(t,0,0>n?0:n)):[]},xt.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Ne(n),n=e-n,Zn(t,0>n?0:n,e)):[]},xt.takeRightWhile=function(t,n){return t&&t.length?Jn(t,Sr(n,3),false,true):[]},xt.takeWhile=function(t,n){return t&&t.length?Jn(t,Sr(n,3)):[]},xt.tap=function(t,n){return n(t),t}, +xt.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new pu("Expected a function");return Re(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),de(t,n,{leading:e,maxWait:n,trailing:u})},xt.thru=fe,xt.toArray=Fe,xt.toPairs=He,xt.toPairsIn=Qe,xt.toPath=function(t){return ti(t)?a(t,en):Le(t)?[t]:er(xo(t))},xt.toPlainObject=qe,xt.transform=function(t,n,r){var e=ti(t)||$e(t);if(n=Sr(n,4),null==r)if(e||Re(t)){var o=t.constructor;r=e?ti(t)?new o:[]:Ee(o)?an(Lu(Object(t))):{}; +}else r={};return(e?u:vn)(t,function(t,e,u){return n(r,t,e,u)}),r},xt.unary=function(t){return pe(t,1)},xt.union=So,xt.unionBy=Ro,xt.unionWith=Wo,xt.uniq=function(t){return t&&t.length?Gn(t):[]},xt.uniqBy=function(t,n){return t&&t.length?Gn(t,Sr(n)):[]},xt.uniqWith=function(t,n){return t&&t.length?Gn(t,T,n):[]},xt.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=Zr(e,r)?[e]:un(e);r=Jr(r,e),e=ne(e),r=null!=r&&Ke(r,e)?delete r[e]:true}return r},xt.unzip=ue,xt.unzipWith=oe,xt.update=function(t,n,r){ +return null==t?t:Pn(t,n,(typeof r=="function"?r:uu)(yn(t,n)),void 0)},xt.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null!=t&&(t=Pn(t,n,(typeof r=="function"?r:uu)(yn(t,n)),e)),t},xt.values=Xe,xt.valuesIn=function(t){return null==t?[]:k(t,Ye(t))},xt.without=Bo,xt.words=ru,xt.wrap=function(t,n){return n=null==n?uu:n,Ho(n,t)},xt.xor=Co,xt.xorBy=zo,xt.xorWith=Uo,xt.zip=Mo,xt.zipObject=function(t,n){return Qn(t||[],n||[],Qt)},xt.zipObjectDeep=function(t,n){return Qn(t||[],n||[],Pn); +},xt.zipWith=Lo,xt.entries=He,xt.entriesIn=Qe,xt.extend=ei,xt.extendWith=ui,iu(xt,xt),xt.add=Ui,xt.attempt=Ai,xt.camelCase=gi,xt.capitalize=tu,xt.ceil=Mi,xt.clamp=function(t,n,r){return r===T&&(r=n,n=T),r!==T&&(r=Ze(r),r=r===r?r:0),n!==T&&(n=Ze(n),n=n===n?n:0),on(Ze(t),n,r)},xt.clone=function(t){return fn(t,false,true)},xt.cloneDeep=function(t){return fn(t,true,true)},xt.cloneDeepWith=function(t,n){return fn(t,true,true,n)},xt.cloneWith=function(t,n){return fn(t,false,true,n)},xt.deburr=nu,xt.divide=Li,xt.endsWith=function(t,n,r){ +t=Te(t),n=typeof n=="string"?n:n+"";var e=t.length;return r=r===T?e:on(Ne(r),0,e),r-=n.length,r>=0&&t.indexOf(n,r)==r},xt.eq=je,xt.escape=function(t){return(t=Te(t))&&tt.test(t)?t.replace(Q,C):t},xt.escapeRegExp=function(t){return(t=Te(t))&&ct.test(t)?t.replace(ft,"\\$&"):t},xt.every=function(t,n,r){var e=ti(t)?o:hn;return r&&Pr(t,n,r)&&(n=T),e(t,Sr(n,3))},xt.find=function(t,n){if(n=Sr(n,3),ti(t)){var r=g(t,n);return r>-1?t[r]:T}return v(t,n,ao)},xt.findIndex=function(t,n){return t&&t.length?g(t,Sr(n,3)):-1; +},xt.findKey=function(t,n){return v(t,Sr(n,3),vn,true)},xt.findLast=function(t,n){if(n=Sr(n,3),ti(t)){var r=g(t,n,true);return r>-1?t[r]:T}return v(t,n,lo)},xt.findLastIndex=function(t,n){return t&&t.length?g(t,Sr(n,3),true):-1},xt.findLastKey=function(t,n){return v(t,Sr(n,3),gn,true)},xt.floor=$i,xt.forEach=ae,xt.forEachRight=le,xt.forIn=function(t,n){return null==t?t:so(t,Sr(n),Ye)},xt.forInRight=function(t,n){return null==t?t:ho(t,Sr(n),Ye)},xt.forOwn=function(t,n){return t&&vn(t,Sr(n))},xt.forOwnRight=function(t,n){ +return t&&gn(t,Sr(n))},xt.get=Ve,xt.gt=me,xt.gte=function(t,n){return t>=n},xt.has=Ke,xt.hasIn=Ge,xt.head=te,xt.identity=uu,xt.includes=function(t,n,r,e){return t=Ae(t)?t:Xe(t),r=r&&!e?Ne(r):0,e=t.length,0>r&&(r=Nu(e+r,0)),Me(t)?e>=r&&-1r&&(r=Nu(e+r,0)),d(t,n,r)):-1},xt.inRange=function(t,n,r){return n=Ze(n)||0,r===T?(r=n,n=0):r=Ze(r)||0,t=Ze(t),t>=Pu(n,r)&&t=-9007199254740991&&9007199254740991>=t},xt.isSet=function(t){return We(t)&&"[object Set]"==zr(t)},xt.isString=Me,xt.isSymbol=Le,xt.isTypedArray=$e,xt.isUndefined=function(t){return t===T},xt.isWeakMap=function(t){return We(t)&&"[object WeakMap]"==zr(t); +},xt.isWeakSet=function(t){return We(t)&&"[object WeakSet]"==xu.call(t)},xt.join=function(t,n){return t?Du.call(t,n):""},xt.kebabCase=di,xt.last=ne,xt.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==T&&(u=Ne(r),u=(0>u?Nu(e+u,0):Pu(u,e-1))+1),n!==n)return U(t,u,true);for(;u--;)if(t[u]===n)return u;return-1},xt.lowerCase=yi,xt.lowerFirst=bi,xt.lt=De,xt.lte=function(t,n){return n>=t},xt.max=function(t){return t&&t.length?_(t,uu,me):T},xt.maxBy=function(t,n){return t&&t.length?_(t,Sr(n),me):T; +},xt.mean=function(t){return b(t,uu)},xt.meanBy=function(t,n){return b(t,Sr(n))},xt.min=function(t){return t&&t.length?_(t,uu,De):T},xt.minBy=function(t,n){return t&&t.length?_(t,Sr(n),De):T},xt.multiply=Di,xt.noConflict=function(){return Jt._===this&&(Jt._=ju),this},xt.noop=fu,xt.now=To,xt.pad=function(t,n,r){t=Te(t);var e=(n=Ne(n))?P(t):0;return n&&n>e?(n=(n-e)/2,xr(Mu(n),r)+t+xr(Uu(n),r)):t},xt.padEnd=function(t,n,r){t=Te(t);var e=(n=Ne(n))?P(t):0;return n&&n>e?t+xr(n-e,r):t},xt.padStart=function(t,n,r){ +t=Te(t);var e=(n=Ne(n))?P(t):0;return n&&n>e?xr(n-e,r)+t:t},xt.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),t=Te(t).replace(at,""),Zu(t,n||(vt.test(t)?16:10))},xt.random=function(t,n,r){if(r&&typeof r!="boolean"&&Pr(t,n,r)&&(n=r=T),r===T&&(typeof n=="boolean"?(r=n,n=T):typeof t=="boolean"&&(r=t,t=T)),t===T&&n===T?(t=0,n=1):(t=Ze(t)||0,n===T?(n=t,t=0):n=Ze(n)||0),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=qu(),Pu(t+r*(n-t+Nt("1e-"+((r+"").length-1))),n)):Fn(t,n)},xt.reduce=function(t,n,r){ +var e=ti(t)?s:x,u=3>arguments.length;return e(t,Sr(n,4),r,u,ao)},xt.reduceRight=function(t,n,r){var e=ti(t)?h:x,u=3>arguments.length;return e(t,Sr(n,4),r,u,lo)},xt.repeat=function(t,n,r){return n=(r?Pr(t,n,r):n===T)?1:Ne(n),Nn(Te(t),n)},xt.replace=function(){var t=arguments,n=Te(t[0]);return 3>t.length?n:n.replace(t[1],t[2])},xt.result=function(t,n,r){n=Zr(n,t)?[n]:un(n);var e=-1,u=n.length;for(u||(t=T,u=1);++e0?t[Fn(0,n-1)]:T},xt.size=function(t){if(null==t)return 0;if(Ae(t)){var n=t.length;return n&&Me(t)?P(t):n}return We(t)&&(n=zr(t),"[object Map]"==n||"[object Set]"==n)?t.size:Je(t).length},xt.snakeCase=xi,xt.some=function(t,n,r){var e=ti(t)?p:qn;return r&&Pr(t,n,r)&&(n=T),e(t,Sr(n,3))},xt.sortedIndex=function(t,n){return Tn(t,n)},xt.sortedIndexBy=function(t,n,r){return Vn(t,n,Sr(r))},xt.sortedIndexOf=function(t,n){var r=t?t.length:0; +if(r){var e=Tn(t,n);if(r>e&&je(t[e],n))return e}return-1},xt.sortedLastIndex=function(t,n){return Tn(t,n,true)},xt.sortedLastIndexBy=function(t,n,r){return Vn(t,n,Sr(r),true)},xt.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=Tn(t,n,true)-1;if(je(t[r],n))return r}return-1},xt.startCase=ji,xt.startsWith=function(t,n,r){return t=Te(t),r=on(Ne(r),0,t.length),t.lastIndexOf(n,r)==r},xt.subtract=Ni,xt.sum=function(t){return t&&t.length?m(t,uu):0},xt.sumBy=function(t,n){return t&&t.length?m(t,Sr(n)):0}, +xt.template=function(t,n,r){var e=xt.templateSettings;r&&Pr(t,n,r)&&(n=T),t=Te(t),n=ui({},n,e,Gt),r=ui({},n.imports,e.imports,Gt);var u,o,i=Je(r),f=k(r,i),c=0;r=n.interpolate||mt;var a="__p+='";r=hu((n.escape||mt).source+"|"+r.source+"|"+(r===et?pt:mt).source+"|"+(n.evaluate||mt).source+"|$","g");var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,i,f,l){return e||(e=i),a+=t.slice(c,l).replace(wt,z),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"), +e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(G,""):a).replace(J,"$1").replace(Y,"$1;"),a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",n=Ai(function(){return Function(i,l+"return "+a).apply(T,f)}),n.source=a,ke(n))throw n;return n},xt.times=function(t,n){if(t=Ne(t),1>t||t>9007199254740991)return[]; +var r=4294967295,e=Pu(t,4294967295);for(n=Sr(n),t-=4294967295,e=w(e,n);++r=o)return t;if(o=r-P(e),1>o)return e; +if(r=i?i.slice(0,o).join(""):t.slice(0,o),u===T)return r+e;if(i&&(o+=r.length-o),Ue(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=hu(u.source,Te(_t.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===T?o:c)}}else t.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},xt.unescape=function(t){return(t=Te(t))&&X.test(t)?t.replace(H,Z):t},xt.uniqueId=function(t){var n=++yu;return Te(t)+n},xt.upperCase=mi,xt.upperFirst=wi,xt.each=ae,xt.eachRight=le,xt.first=te, +iu(xt,function(){var t={};return vn(xt,function(n,r){du.call(xt.prototype,r)||(t[r]=n)}),t}(),{chain:false}),xt.VERSION="4.9.0",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){xt[t].placeholder=xt}),u(["drop","take"],function(t,n){kt.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new kt(this);r=r===T?1:Nu(Ne(r),0);var u=this.clone();return e?u.__takeCount__=Pu(r,u.__takeCount__):u.__views__.push({size:Pu(r,4294967295),type:t+(0>u.__dir__?"Right":"")}), +u},kt.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;kt.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:Sr(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");kt.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");kt.prototype[t]=function(){return this.__filtered__?new kt(this):this[r](1); +}}),kt.prototype.compact=function(){return this.filter(uu)},kt.prototype.find=function(t){return this.filter(t).head()},kt.prototype.findLast=function(t){return this.reverse().find(t)},kt.prototype.invokeMap=be(function(t,n){return typeof t=="function"?new kt(this):this.map(function(r){return An(r,t,n)})}),kt.prototype.reject=function(t){return t=Sr(t,3),this.filter(function(n){return!t(n)})},kt.prototype.slice=function(t,n){t=Ne(t);var r=this;return r.__filtered__&&(t>0||0>n)?new kt(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)), +n!==T&&(n=Ne(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},kt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},kt.prototype.toArray=function(){return this.take(4294967295)},vn(kt.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=xt[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(xt.prototype[n]=function(){function n(t){return t=u.apply(xt,l([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof kt,a=f[0],s=c||ti(i); +s&&r&&typeof a=="function"&&1!=a.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&s?(i=c?i:new kt(this),i=t.apply(i,f),i.__actions__.push({func:fe,args:[n],thisArg:T}),new Ot(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=_u[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);xt.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){ +var u=this.value();return n.apply(ti(u)?u:[],t)}return this[r](function(r){return n.apply(ti(r)?r:[],t)})}}),vn(kt.prototype,function(t,n){var r=xt[n];if(r){var e=r.name+"";(to[e]||(to[e]=[])).push({name:n,func:r})}}),to[dr(T,2).name]=[{name:"wrapper",func:T}],kt.prototype.clone=function(){var t=new kt(this.__wrapped__);return t.__actions__=er(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=er(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=er(this.__views__), +t},kt.prototype.reverse=function(){if(this.__filtered__){var t=new kt(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t},kt.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=ti(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++co||o==t&&a==t)return Yn(n,this.__actions__);e=[];t:for(;t--&&a>c;){for(u+=r,o=-1,l=n[u];++o=this.__values__.length,n=t?T:this.__values__[this.__index__++];return{done:t,value:n}},xt.prototype.plant=function(t){for(var n,r=this;r instanceof At;){var e=Hr(r);e.__index__=0,e.__values__=T,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},xt.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof kt?(this.__actions__.length&&(t=new kt(this)),t=t.reverse(),t.__actions__.push({func:fe,args:[ee],thisArg:T}),new Ot(t,this.__chain__)):this.thru(ee); +},xt.prototype.toJSON=xt.prototype.valueOf=xt.prototype.value=function(){return Yn(this.__wrapped__,this.__actions__)},Ru&&(xt.prototype[Ru]=ce),xt}var T,V=1/0,K=NaN,G=/\b__p\+='';/g,J=/\b(__p\+=)''\+/g,Y=/(__e\(.*?\)|\b__t\))\+'';/g,H=/&(?:amp|lt|gt|quot|#39|#96);/g,Q=/[&<>"'`]/g,X=RegExp(H.source),tt=RegExp(Q.source),nt=/<%-([\s\S]+?)%>/g,rt=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,ut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ot=/^\w*$/,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,ft=/[\\^$.*+?()[\]{}|]/g,ct=RegExp(ft.source),at=/^\s+|\s+$/g,lt=/^\s+/,st=/\s+$/,ht=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_t=/\w*$/,vt=/^0x/i,gt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,xt=/^(?:0|[1-9]\d*)$/,jt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,mt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,At="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",Ot="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+At,kt="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",Et=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),It=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+kt+At,"g"),St=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Rt=/[a-zA-Z0-9]+/g,Wt=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|\\d+",Ot].join("|"),"g"),Bt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ct="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),zt={}; zt["[object Float32Array]"]=zt["[object Float64Array]"]=zt["[object Int8Array]"]=zt["[object Int16Array]"]=zt["[object Int32Array]"]=zt["[object Uint8Array]"]=zt["[object Uint8ClampedArray]"]=zt["[object Uint16Array]"]=zt["[object Uint32Array]"]=true,zt["[object Arguments]"]=zt["[object Array]"]=zt["[object ArrayBuffer]"]=zt["[object Boolean]"]=zt["[object DataView]"]=zt["[object Date]"]=zt["[object Error]"]=zt["[object Function]"]=zt["[object Map]"]=zt["[object Number]"]=zt["[object Object]"]=zt["[object RegExp]"]=zt["[object Set]"]=zt["[object String]"]=zt["[object WeakMap]"]=false; var Ut={};Ut["[object Arguments]"]=Ut["[object Array]"]=Ut["[object ArrayBuffer]"]=Ut["[object DataView]"]=Ut["[object Boolean]"]=Ut["[object Date]"]=Ut["[object Float32Array]"]=Ut["[object Float64Array]"]=Ut["[object Int8Array]"]=Ut["[object Int16Array]"]=Ut["[object Int32Array]"]=Ut["[object Map]"]=Ut["[object Number]"]=Ut["[object Object]"]=Ut["[object RegExp]"]=Ut["[object Set]"]=Ut["[object String]"]=Ut["[object Symbol]"]=Ut["[object Uint8Array]"]=Ut["[object Uint8ClampedArray]"]=Ut["[object Uint16Array]"]=Ut["[object Uint32Array]"]=true, Ut["[object Error]"]=Ut["[object Function]"]=Ut["[object WeakMap]"]=false;var Mt={"\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", diff --git a/doc/README.md b/doc/README.md index a879df1c83..5bc9f70973 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,4 @@ -# lodash v4.8.2 +# lodash v4.9.0 @@ -301,6 +301,7 @@ * `_.prototype.reverse` * `_.prototype.toJSON` -> `value` * `_.prototype.value` +* `_.prototype.valueOf` -> `value` @@ -405,7 +406,7 @@ ### `_.chunk(array, [size=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L5819 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L5846 "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 `array` can't be split evenly, the final chunk will be the remaining @@ -435,7 +436,7 @@ _.chunk(['a', 'b', 'c', 'd'], 3); ### `_.compact(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L5854 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L5881 "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. @@ -460,7 +461,7 @@ _.compact([0, 1, false, 2, '', 3]); ### `_.concat(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L5891 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.concat "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L5918 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.concat "See the npm package") Creates a new array concatenating `array` with any additional arrays and/or values. @@ -492,7 +493,7 @@ console.log(array); ### `_.difference(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L5923 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L5950 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package") Creates an array of unique `array` values not included in the other given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) @@ -520,7 +521,7 @@ _.difference([3, 2, 1], [4, 2]); ### `_.differenceBy(array, [values], [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L5953 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.differenceby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L5980 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.differenceby "See the npm package") This method is like `_.difference` except that it accepts `iteratee` which is invoked for each element of `array` and `values` to generate the criterion @@ -553,7 +554,7 @@ _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); ### `_.differenceWith(array, [values], [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L5984 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.differencewith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6011 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.differencewith "See the npm package") This method is like `_.difference` except that it accepts `comparator` which is invoked to compare elements of `array` to `values`. Result values @@ -584,7 +585,7 @@ _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); ### `_.drop(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6019 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6046 "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. @@ -618,7 +619,7 @@ _.drop([1, 2, 3], 0); ### `_.dropRight(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6053 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6080 "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. @@ -652,7 +653,7 @@ _.dropRight([1, 2, 3], 0); ### `_.dropRightWhile(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6099 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6126 "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 @@ -697,7 +698,7 @@ _.dropRightWhile(users, 'active'); ### `_.dropWhile(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6141 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6168 "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 @@ -742,7 +743,7 @@ _.dropWhile(users, 'active'); ### `_.fill(array, value, [start=0], [end=array.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6176 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6203 "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`. @@ -782,7 +783,7 @@ _.fill([4, 6, 8, 10], '*', 1, 3); ### `_.findIndex(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6223 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6250 "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. @@ -826,7 +827,7 @@ _.findIndex(users, 'active'); ### `_.findLastIndex(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6264 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6291 "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. @@ -870,7 +871,7 @@ _.findLastIndex(users, 'active'); ### `_.flatten(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6284 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6311 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package") Flattens `array` a single level deep. @@ -894,7 +895,7 @@ _.flatten([1, [2, [3, [4]], 5]]); ### `_.flattenDeep(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6303 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6330 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") Recursively flattens `array`. @@ -918,7 +919,7 @@ _.flattenDeep([1, [2, [3, [4]], 5]]); ### `_.flattenDepth(array, [depth=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6328 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6355 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") Recursively flatten `array` up to `depth` times. @@ -948,7 +949,7 @@ _.flattenDepth(array, 2); ### `_.fromPairs(pairs)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6352 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.frompairs "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6379 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.frompairs "See the npm package") The inverse of `_.toPairs`; this method returns an object composed from key-value `pairs`. @@ -973,7 +974,7 @@ _.fromPairs([['fred', 30], ['barney', 40]]); ### `_.head(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6382 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6409 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package") Gets the first element of `array`. @@ -1003,12 +1004,12 @@ _.head([]); ### `_.indexOf(array, value, [fromIndex=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6409 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6436 "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`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) -for equality comparisons. If `fromIndex` is negative, it's used as the offset -from the end of `array`. +for equality comparisons. If `fromIndex` is negative, it's used as the +offset from the end of `array`. #### Since 0.1.0 @@ -1036,7 +1037,7 @@ _.indexOf([1, 2, 1, 2], 2, 2); ### `_.initial(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6435 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6462 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package") Gets all but the last element of `array`. @@ -1060,7 +1061,7 @@ _.initial([1, 2, 3]); ### `_.intersection([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6456 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6483 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package") Creates an array of unique values that are included in all given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) @@ -1087,7 +1088,7 @@ _.intersection([2, 1], [4, 2], [1, 2]); ### `_.intersectionBy([arrays], [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6486 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersectionby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6513 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersectionby "See the npm package") This method is like `_.intersection` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion @@ -1119,7 +1120,7 @@ _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); ### `_.intersectionWith([arrays], [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6521 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6548 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package") This method is like `_.intersection` except that it accepts `comparator` which is invoked to compare elements of `arrays`. Result values are chosen @@ -1150,7 +1151,7 @@ _.intersectionWith(objects, others, _.isEqual); ### `_.join(array, [separator=','])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6550 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.join "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6577 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.join "See the npm package") Converts all elements in `array` into a string separated by `separator`. @@ -1175,7 +1176,7 @@ _.join(['a', 'b', 'c'], '~'); ### `_.last(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6568 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6595 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") Gets the last element of `array`. @@ -1199,7 +1200,7 @@ _.last([1, 2, 3]); ### `_.lastIndexOf(array, value, [fromIndex=array.length-1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6594 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6621 "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. @@ -1230,7 +1231,7 @@ _.lastIndexOf([1, 2, 1, 2], 2, 2); ### `_.pull(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6642 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6669 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package") Removes all given values from `array` using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) @@ -1264,7 +1265,7 @@ console.log(array); ### `_.pullAll(array, values)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6664 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullall "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6691 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullall "See the npm package") This method is like `_.pull` except that it accepts an array of values to remove.
@@ -1295,7 +1296,7 @@ console.log(array); ### `_.pullAllBy(array, values, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6694 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullallby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6721 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullallby "See the npm package") This method is like `_.pullAll` except that it accepts `iteratee` which is invoked for each element of `array` and `values` to generate the criterion @@ -1329,7 +1330,7 @@ console.log(array); ### `_.pullAllWith(array, values, [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6723 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullallwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6750 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullallwith "See the npm package") This method is like `_.pullAll` except that it accepts `comparator` which is invoked to compare elements of `array` to `values`. The comparator is @@ -1363,7 +1364,7 @@ console.log(array); ### `_.pullAt(array, [indexes])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6754 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6781 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package") Removes elements from `array` corresponding to `indexes` and returns an array of removed elements. @@ -1398,7 +1399,7 @@ console.log(evens); ### `_.remove(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6791 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6818 "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 invoked @@ -1437,7 +1438,7 @@ console.log(evens); ### `_.reverse(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6835 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reverse "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6862 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reverse "See the npm package") Reverses `array` so that the first element becomes the last, the second element becomes the second to last, and so on. @@ -1471,7 +1472,7 @@ console.log(array); ### `_.slice(array, [start=0], [end=array.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6855 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6882 "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`.
@@ -1497,7 +1498,7 @@ returned. ### `_.sortedIndex(array, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6891 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6918 "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. @@ -1526,7 +1527,7 @@ _.sortedIndex([4, 5], 4); ### `_.sortedIndexBy(array, value, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6921 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6948 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package") This method is like `_.sortedIndex` except that it accepts `iteratee` which is invoked for `value` and each element of `array` to compute their @@ -1560,7 +1561,7 @@ _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); ### `_.sortedIndexOf(array, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6941 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6968 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package") This method is like `_.indexOf` except that it performs a binary search on a sorted `array`. @@ -1586,7 +1587,7 @@ _.sortedIndexOf([1, 1, 2, 2], 2); ### `_.sortedLastIndex(array, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6970 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L6997 "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 @@ -1613,7 +1614,7 @@ _.sortedLastIndex([4, 5], 4); ### `_.sortedLastIndexBy(array, value, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L6995 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7022 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package") This method is like `_.sortedLastIndex` except that it accepts `iteratee` which is invoked for `value` and each element of `array` to compute their @@ -1642,7 +1643,7 @@ _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); ### `_.sortedLastIndexOf(array, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7015 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7042 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package") This method is like `_.lastIndexOf` except that it performs a binary search on a sorted `array`. @@ -1668,7 +1669,7 @@ _.sortedLastIndexOf([1, 1, 2, 2], 2); ### `_.sortedUniq(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7041 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7068 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package") This method is like `_.uniq` except that it's designed and optimized for sorted arrays. @@ -1693,7 +1694,7 @@ _.sortedUniq([1, 1, 2]); ### `_.sortedUniqBy(array, [iteratee])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7063 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7090 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package") This method is like `_.uniqBy` except that it's designed and optimized for sorted arrays. @@ -1719,7 +1720,7 @@ _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); ### `_.tail(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7083 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tail "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7110 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tail "See the npm package") Gets all but the first element of `array`. @@ -1743,7 +1744,7 @@ _.tail([1, 2, 3]); ### `_.take(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7112 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7139 "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. @@ -1777,7 +1778,7 @@ _.take([1, 2, 3], 0); ### `_.takeRight(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7145 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7172 "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. @@ -1811,7 +1812,7 @@ _.takeRight([1, 2, 3], 0); ### `_.takeRightWhile(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7191 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7218 "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 invoked with @@ -1856,7 +1857,7 @@ _.takeRightWhile(users, 'active'); ### `_.takeWhile(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7233 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7260 "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 invoked with @@ -1901,7 +1902,7 @@ _.takeWhile(users, 'active'); ### `_.union([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7255 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7282 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package") Creates an array of unique values, in order, from all given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) @@ -1927,7 +1928,7 @@ _.union([2, 1], [4, 2], [1, 2]); ### `_.unionBy([arrays], [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7282 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unionby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7309 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unionby "See the npm package") This method is like `_.union` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion by @@ -1959,7 +1960,7 @@ _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); ### `_.unionWith([arrays], [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7310 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unionwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7337 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unionwith "See the npm package") This method is like `_.union` except that it accepts `comparator` which is invoked to compare elements of `arrays`. The comparator is invoked @@ -1989,7 +1990,7 @@ _.unionWith(objects, others, _.isEqual); ### `_.uniq(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7335 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7362 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package") Creates a duplicate-free version of an array, using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) @@ -2016,7 +2017,7 @@ _.uniq([2, 1, 2]); ### `_.uniqBy(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7363 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7390 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqby "See the npm package") This method is like `_.uniq` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -2047,7 +2048,7 @@ _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); ### `_.uniqWith(array, [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7388 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7415 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqwith "See the npm package") This method is like `_.uniq` except that it accepts `comparator` which is invoked to compare elements of `array`. The comparator is invoked with @@ -2076,7 +2077,7 @@ _.uniqWith(objects, _.isEqual); ### `_.unzip(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7413 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7440 "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 @@ -2105,7 +2106,7 @@ _.unzip(zipped); ### `_.unzipWith(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7450 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzipwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7477 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzipwith "See the npm package") This method is like `_.unzip` except that it accepts `iteratee` to specify how regrouped values should be combined. The iteratee is invoked with the @@ -2135,7 +2136,7 @@ _.unzipWith(zipped, _.add); ### `_.without(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7480 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7507 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package") Creates an array excluding all given values using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) @@ -2162,7 +2163,7 @@ _.without([1, 2, 1, 3], 1, 2); ### `_.xor([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7503 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7530 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package") Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) @@ -2189,7 +2190,7 @@ _.xor([2, 1], [4, 2]); ### `_.xorBy([arrays], [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7530 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xorby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7557 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xorby "See the npm package") This method is like `_.xor` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion by @@ -2221,7 +2222,7 @@ _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); ### `_.xorWith([arrays], [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7558 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xorwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7585 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xorwith "See the npm package") This method is like `_.xor` except that it accepts `comparator` which is invoked to compare elements of `arrays`. The comparator is invoked with @@ -2251,7 +2252,7 @@ _.xorWith(objects, others, _.isEqual); ### `_.zip([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7582 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7609 "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 @@ -2277,7 +2278,7 @@ _.zip(['fred', 'barney'], [30, 40], [true, false]); ### `_.zipObject([props=[]], [values=[]])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7600 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7627 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package") This method is like `_.fromPairs` except that it accepts two arrays, one of property identifiers and one of corresponding values. @@ -2303,7 +2304,7 @@ _.zipObject(['a', 'b'], [1, 2]); ### `_.zipObjectDeep([props=[]], [values=[]])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7619 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7646 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package") This method is like `_.zipObject` except that it supports property paths. @@ -2328,7 +2329,7 @@ _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); ### `_.zipWith([arrays], [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7642 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7669 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipwith "See the npm package") This method is like `_.zip` except that it accepts `iteratee` to specify how grouped values should be combined. The iteratee is invoked with the @@ -2363,7 +2364,7 @@ _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { ### `_.countBy(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8026 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8053 "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` thru `iteratee`. The corresponding value of @@ -2394,7 +2395,7 @@ _.countBy(['one', 'two', 'three'], 'length'); ### `_.every(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8067 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8094 "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`. Iteration is stopped once `predicate` returns falsey. The predicate is @@ -2438,7 +2439,7 @@ _.every(users, 'active'); ### `_.filter(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8110 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8137 "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 invoked with three @@ -2482,7 +2483,7 @@ _.filter(users, 'active'); ### `_.find(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8151 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8178 "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 invoked with three @@ -2527,7 +2528,7 @@ _.find(users, 'active'); ### `_.findLast(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8179 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8206 "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. @@ -2555,7 +2556,7 @@ _.findLast([1, 2, 3, 4], function(n) { ### `_.flatMap(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8210 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8237 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmap "See the npm package") Creates a flattened array of values by running each element in `collection` thru `iteratee` and flattening the mapped results. The iteratee is invoked @@ -2586,7 +2587,7 @@ _.flatMap([1, 2], duplicate); ### `_.flatMapDeep(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8235 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8262 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package") This method is like `_.flatMap` except that it recursively flattens the mapped results. @@ -2616,7 +2617,7 @@ _.flatMapDeep([1, 2], duplicate); ### `_.flatMapDepth(collection, [iteratee=_.identity], [depth=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8261 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8288 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package") This method is like `_.flatMap` except that it recursively flattens the mapped results up to `depth` times. @@ -2647,7 +2648,7 @@ _.flatMapDepth([1, 2], duplicate, 2); ### `_.forEach(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8295 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8322 "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 invoked with three arguments: *(value, index|key, collection)*. @@ -2689,7 +2690,7 @@ _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { ### `_.forEachRight(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8320 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8347 "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. @@ -2720,12 +2721,13 @@ _.forEachRight([1, 2], function(value) { ### `_.groupBy(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8349 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8377 "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` thru `iteratee`. The corresponding value of -each key is an array of elements responsible for generating the key. The -iteratee is invoked with one argument: *(value)*. +each element of `collection` thru `iteratee`. The order of grouped values +is determined by the order they occur in `collection`. The corresponding +value of each key is an array of elements responsible for generating the +key. The iteratee is invoked with one argument: *(value)*. #### Since 0.1.0 @@ -2752,9 +2754,9 @@ _.groupBy(['one', 'two', 'three'], 'length'); ### `_.includes(collection, value, [fromIndex=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8387 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8415 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package") -Checks if `value` is in `collection`. If `collection` is a string it's +Checks if `value` is in `collection`. If `collection` is a string, it's checked for a substring of `value`, otherwise [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) is used for equality comparisons. If `fromIndex` is negative, it's used as @@ -2791,12 +2793,12 @@ _.includes('pebbles', 'eb'); ### `_.invokeMap(collection, path, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8423 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invokemap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8451 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invokemap "See the npm package") Invokes the method at `path` of each element in `collection`, returning an array of the results of each invoked method. Any additional arguments -are provided to each invoked method. If `methodName` is a function it's -invoked for, and `this` bound to, each element in `collection`. +are provided to each invoked method. If `methodName` is a function, it's +invoked for and `this` bound to, each element in `collection`. #### Since 4.0.0 @@ -2823,7 +2825,7 @@ _.invokeMap([123, 456], String.prototype.split, ''); ### `_.keyBy(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8465 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keyby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8493 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keyby "See the npm package") Creates an object composed of keys generated from the results of running each element of `collection` thru `iteratee`. The corresponding value of @@ -2861,7 +2863,7 @@ _.keyBy(array, 'dir'); ### `_.map(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8512 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8540 "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` thru `iteratee`. The iteratee is invoked with three arguments:
@@ -2915,7 +2917,7 @@ _.map(users, 'user'); ### `_.orderBy(collection, [iteratees=[_.identity]], [orders])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8546 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.orderby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8574 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.orderby "See the npm package") This method is like `_.sortBy` except that it allows specifying the sort orders of the iteratees to sort by. If `orders` is unspecified, all values @@ -2952,7 +2954,7 @@ _.orderBy(users, ['user', 'age'], ['asc', 'desc']); ### `_.partition(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8597 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8625 "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, the second of which @@ -2998,12 +3000,12 @@ _.partition(users, 'active'); ### `_.reduce(collection, [iteratee=_.identity], [accumulator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8637 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8665 "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` thru `iteratee`, where each successive invocation is supplied the return value of the previous. If `accumulator` -is not given the first element of `collection` is used as the initial +is not given, the first element of `collection` is used as the initial value. The iteratee is invoked with four arguments:
*(accumulator, value, index|key, collection)*.
@@ -3046,7 +3048,7 @@ _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { ### `_.reduceRight(collection, [iteratee=_.identity], [accumulator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8665 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8693 "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. @@ -3077,7 +3079,7 @@ _.reduceRight(array, function(flattened, other) { ### `_.reject(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8706 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8734 "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. @@ -3120,7 +3122,7 @@ _.reject(users, 'active'); ### `_.sample(collection)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8728 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8756 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package") Gets a random element from `collection`. @@ -3144,7 +3146,7 @@ _.sample([1, 2, 3, 4]); ### `_.sampleSize(collection, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8755 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.samplesize "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8783 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.samplesize "See the npm package") Gets `n` random elements at unique keys from `collection` up to the size of `collection`. @@ -3173,7 +3175,7 @@ _.sampleSize([1, 2, 3], 4); ### `_.shuffle(collection)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8792 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8820 "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](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). @@ -3198,7 +3200,7 @@ _.shuffle([1, 2, 3, 4]); ### `_.size(collection)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8817 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8845 "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 string keyed properties for objects. @@ -3229,7 +3231,7 @@ _.size('pebbles'); ### `_.some(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8871 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8899 "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`. Iteration is stopped once `predicate` returns truthy. The predicate is @@ -3273,7 +3275,7 @@ _.some(users, 'active'); ### `_.sortBy(collection, [iteratees=[_.identity]])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8914 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8942 "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 thru each iteratee. This method @@ -3322,7 +3324,7 @@ _.sortBy(users, 'user', function(o) { ### `_.now()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8946 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8974 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package") Gets the timestamp of the number of milliseconds that have elapsed since the Unix epoch *(1 January `1970 00`:00:00 UTC)*. @@ -3352,7 +3354,7 @@ _.defer(function(stamp) { ### `_.after(n, func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L8974 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9002 "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's called `n` or more times. @@ -3386,7 +3388,7 @@ _.forEach(saves, function(type) { ### `_.ary(func, [n=func.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9003 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9031 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package") Creates a function that invokes `func`, with up to `n` arguments, ignoring any additional arguments. @@ -3412,7 +3414,7 @@ _.map(['6', '8', '10'], _.ary(parseInt, 1)); ### `_.before(n, func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9026 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9054 "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's called less than `n` times. Subsequent @@ -3439,7 +3441,7 @@ jQuery(element).on('click', _.before(5, addContactToList)); ### `_.bind(func, thisArg, [partials])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9078 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9106 "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 `partials` prepended to the arguments it receives. @@ -3486,7 +3488,7 @@ bound('hi'); ### `_.bindKey(object, key, [partials])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9132 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9160 "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]` with `partials` prepended to the arguments it receives. @@ -3543,7 +3545,7 @@ bound('hi'); ### `_.curry(func, [arity=func.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9182 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9210 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package") Creates a function that accepts arguments of `func` and either invokes `func` returning its result, if at least `arity` number of arguments have @@ -3595,7 +3597,7 @@ curried(1)(_, 3)(2); ### `_.curryRight(func, [arity=func.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9227 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9255 "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`. @@ -3644,7 +3646,7 @@ curried(3)(1, _)(2); ### `_.debounce(func, [wait=0], [options={}], [options.leading=false], [options.maxWait], [options.trailing=true])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9284 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9312 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package") Creates a debounced function that delays invoking `func` until after `wait` milliseconds have elapsed since the last time the debounced function was @@ -3661,7 +3663,7 @@ on the trailing edge of the timeout only if the debounced function is invoked more than once during the `wait` timeout.

-See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) +See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) for details over the differences between `_.debounce` and `_.throttle`. #### Since @@ -3703,7 +3705,7 @@ jQuery(window).on('popstate', debounced.cancel); ### `_.defer(func, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9419 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9447 "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's invoked. @@ -3731,7 +3733,7 @@ _.defer(function(text) { ### `_.delay(func, wait, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9442 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9470 "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's invoked. @@ -3760,7 +3762,7 @@ _.delay(function(text) { ### `_.flip(func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9464 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9492 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package") Creates a function that invokes `func` with arguments reversed. @@ -3788,10 +3790,10 @@ flipped('a', 'b', 'c', 'd'); ### `_.memoize(func, [resolver])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9512 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9540 "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 +provided, it determines the cache key for storing the result based on the arguments provided to the memoized function. By default, the first argument provided to the memoized function is used as the map cache key. The `func` is invoked with the `this` binding of the memoized function. @@ -3843,7 +3845,7 @@ _.memoize.Cache = WeakMap; ### `_.negate(predicate)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9555 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9583 "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 @@ -3873,7 +3875,7 @@ _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); ### `_.once(func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9582 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9610 "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 invocation. The `func` is @@ -3901,7 +3903,7 @@ initialize(); ### `_.overArgs(func, [transforms])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9618 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.overargs "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9646 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.overargs "See the npm package") Creates a function that invokes `func` with arguments transformed by corresponding `transforms`. @@ -3943,7 +3945,7 @@ func(10, 5); ### `_.partial(func, [partials])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9666 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9693 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package") Creates a function that invokes `func` with `partials` prepended to the arguments it receives. This method is like `_.bind` except it does **not** @@ -3988,7 +3990,7 @@ greetFred('hi'); ### `_.partialRight(func, [partials])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9703 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9730 "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 the arguments it receives. @@ -4032,7 +4034,7 @@ sayHelloTo('fred'); ### `_.rearg(func, indexes)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9731 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9758 "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 @@ -4064,7 +4066,7 @@ rearged('b', 'c', 'a') ### `_.rest(func, [start=func.length-1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9760 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9787 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package") Creates a function that invokes `func` with the `this` binding of the created function and arguments from `start` and beyond provided as @@ -4100,7 +4102,7 @@ say('hello', 'fred', 'barney', 'pebbles'); ### `_.spread(func, [start=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9823 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9850 "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 create function and an array of arguments much like @@ -4145,7 +4147,7 @@ numbers.then(_.spread(function(x, y) { ### `_.throttle(func, [wait=0], [options={}], [options.leading=true], [options.trailing=true])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9880 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9907 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package") Creates a throttled function that only invokes `func` at most once per every `wait` milliseconds. The throttled function comes with a `cancel` @@ -4162,7 +4164,7 @@ invoked on the trailing edge of the timeout only if the throttled function is invoked more than once during the `wait` timeout.

-See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) +See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) for details over the differences between `_.throttle` and `_.debounce`. #### Since @@ -4196,7 +4198,7 @@ jQuery(window).on('popstate', throttled.cancel); ### `_.unary(func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9913 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unary "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9940 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unary "See the npm package") Creates a function that accepts up to one argument, ignoring any additional arguments. @@ -4221,7 +4223,7 @@ _.map(['6', '8', '10'], _.unary(parseInt)); ### `_.wrap(value, [wrapper=identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9939 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L9966 "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 @@ -4259,7 +4261,7 @@ p('fred, barney, & pebbles'); ### `_.castArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L9979 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.castarray "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10006 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.castarray "See the npm package") Casts `value` as an array if it's not one. @@ -4302,7 +4304,7 @@ console.log(_.castArray(array) === array); ### `_.clone(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10012 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10039 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package") Creates a shallow clone of `value`.
@@ -4338,7 +4340,7 @@ console.log(shallow[0] === objects[0]); ### `_.cloneDeep(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10067 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10094 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package") This method is like `_.clone` except that it recursively clones `value`. @@ -4365,7 +4367,7 @@ console.log(deep[0] === objects[0]); ### `_.cloneDeepWith(value, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10098 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10125 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package") This method is like `_.cloneWith` except that it recursively clones `value`. @@ -4402,10 +4404,10 @@ console.log(el.childNodes.length); ### `_.cloneWith(value, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10046 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonewith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10073 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonewith "See the npm package") This method is like `_.clone` except that it accepts `customizer` which -is invoked to produce the cloned value. If `customizer` returns `undefined` +is invoked to produce the cloned value. If `customizer` returns `undefined`, cloning is handled by the method instead. The `customizer` is invoked with up to four arguments; *(value [, index|key, object, stack])*. @@ -4442,7 +4444,7 @@ console.log(el.childNodes.length); ### `_.eq(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10134 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.eq "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10161 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.eq "See the npm package") Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) @@ -4484,7 +4486,7 @@ _.eq(NaN, NaN); ### `_.gt(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10160 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10187 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package") Checks if `value` is greater than `other`. @@ -4515,7 +4517,7 @@ _.gt(1, 3); ### `_.gte(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10186 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.gte "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10213 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.gte "See the npm package") Checks if `value` is greater than or equal to `other`. @@ -4546,7 +4548,7 @@ _.gte(1, 3); ### `_.isArguments(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10208 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10235 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") Checks if `value` is likely an `arguments` object. @@ -4573,7 +4575,7 @@ _.isArguments([1, 2, 3]); ### `_.isArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10239 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10266 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") Checks if `value` is classified as an `Array` object. @@ -4606,7 +4608,7 @@ _.isArray(_.noop); ### `_.isArrayBuffer(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10259 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10286 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package") Checks if `value` is classified as an `ArrayBuffer` object. @@ -4633,7 +4635,7 @@ _.isArrayBuffer(new Array(2)); ### `_.isArrayLike(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10288 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraylike "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10315 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraylike "See the npm package") Checks if `value` is array-like. A value is considered array-like if it's not a function and has a `value.length` that's an integer greater than or @@ -4668,7 +4670,7 @@ _.isArrayLike(_.noop); ### `_.isArrayLikeObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10317 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10344 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package") This method is like `_.isArrayLike` except that it also checks if `value` is an object. @@ -4702,7 +4704,7 @@ _.isArrayLikeObject(_.noop); ### `_.isBoolean(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10339 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10366 "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. @@ -4729,7 +4731,7 @@ _.isBoolean(null); ### `_.isBuffer(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10361 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10388 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package") Checks if `value` is a buffer. @@ -4756,7 +4758,7 @@ _.isBuffer(new Uint8Array(2)); ### `_.isDate(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10383 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10410 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") Checks if `value` is classified as a `Date` object. @@ -4783,7 +4785,7 @@ _.isDate('Mon April 23 2012'); ### `_.isElement(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10405 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10432 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") Checks if `value` is likely a DOM element. @@ -4810,7 +4812,7 @@ _.isElement(''); ### `_.isEmpty(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10442 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10469 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package") Checks if `value` is an empty object, collection, map, or set.
@@ -4855,7 +4857,7 @@ _.isEmpty({ 'a': 1 }); ### `_.isEqual(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10491 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10518 "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. @@ -4894,10 +4896,10 @@ object === other; ### `_.isEqualWith(value, other, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10528 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequalwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10555 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequalwith "See the npm package") This method is like `_.isEqual` except that it accepts `customizer` which -is invoked to compare values. If `customizer` returns `undefined` comparisons +is invoked to compare values. If `customizer` returns `undefined`, comparisons are handled by the method instead. The `customizer` is invoked with up to six arguments: *(objValue, othValue [, index|key, object, other, stack])*. @@ -4936,7 +4938,7 @@ _.isEqualWith(array, other, customizer); ### `_.isError(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10553 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10580 "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. @@ -4964,7 +4966,7 @@ _.isError(Error); ### `_.isFinite(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10588 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10615 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") Checks if `value` is a finite primitive number.
@@ -5001,7 +5003,7 @@ _.isFinite(Infinity); ### `_.isFunction(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10610 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10637 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") Checks if `value` is classified as a `Function` object. @@ -5028,7 +5030,7 @@ _.isFunction(/abc/); ### `_.isInteger(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10644 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10671 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package") Checks if `value` is an integer.
@@ -5065,7 +5067,7 @@ _.isInteger('3'); ### `_.isLength(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10675 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10702 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package") Checks if `value` is a valid array-like length.
@@ -5102,7 +5104,7 @@ _.isLength('3'); ### `_.isMap(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10756 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10783 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package") Checks if `value` is classified as a `Map` object. @@ -5129,7 +5131,7 @@ _.isMap(new WeakMap); ### `_.isMatch(object, source)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10784 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10811 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package") Performs a partial deep comparison between `object` and `source` to determine if `object` contains equivalent property values. This method is @@ -5164,10 +5166,10 @@ _.isMatch(object, { 'age': 36 }); ### `_.isMatchWith(object, source, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10820 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10847 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package") This method is like `_.isMatch` except that it accepts `customizer` which -is invoked to compare values. If `customizer` returns `undefined` comparisons +is invoked to compare values. If `customizer` returns `undefined`, comparisons are handled by the method instead. The `customizer` is invoked with five arguments: *(objValue, srcValue, index|key, object, source)*. @@ -5206,7 +5208,7 @@ _.isMatchWith(object, source, customizer); ### `_.isNaN(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10853 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10880 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") Checks if `value` is `NaN`.
@@ -5245,7 +5247,7 @@ _.isNaN(undefined); ### `_.isNative(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10878 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10905 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") Checks if `value` is a native function. @@ -5272,7 +5274,7 @@ _.isNative(_); ### `_.isNil(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10927 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10954 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package") Checks if `value` is `null` or `undefined`. @@ -5302,7 +5304,7 @@ _.isNil(NaN); ### `_.isNull(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10903 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10930 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") Checks if `value` is `null`. @@ -5329,7 +5331,7 @@ _.isNull(void 0); ### `_.isNumber(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10958 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10985 "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.
@@ -5366,7 +5368,7 @@ _.isNumber('3'); ### `_.isObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10705 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10732 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") Checks if `value` is the [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) @@ -5401,7 +5403,7 @@ _.isObject(null); ### `_.isObjectLike(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10734 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L10761 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package") Checks if `value` is object-like. A value is object-like if it's not `null` and has a `typeof` result of "object". @@ -5435,7 +5437,7 @@ _.isObjectLike(null); ### `_.isPlainObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L10992 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11019 "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`. @@ -5473,7 +5475,7 @@ _.isPlainObject(Object.create(null)); ### `_.isRegExp(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11024 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11051 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") Checks if `value` is classified as a `RegExp` object. @@ -5500,7 +5502,7 @@ _.isRegExp('/abc/'); ### `_.isSafeInteger(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11056 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11083 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package") Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 double precision number which isn't the result of a rounded unsafe integer. @@ -5538,7 +5540,7 @@ _.isSafeInteger('3'); ### `_.isSet(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11078 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11105 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package") Checks if `value` is classified as a `Set` object. @@ -5565,7 +5567,7 @@ _.isSet(new WeakSet); ### `_.isString(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11100 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11127 "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. @@ -5592,7 +5594,7 @@ _.isString(1); ### `_.isSymbol(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11123 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.issymbol "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11150 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.issymbol "See the npm package") Checks if `value` is classified as a `Symbol` primitive or object. @@ -5619,7 +5621,7 @@ _.isSymbol('abc'); ### `_.isTypedArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11146 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11173 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") Checks if `value` is classified as a typed array. @@ -5646,7 +5648,7 @@ _.isTypedArray([]); ### `_.isUndefined(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11168 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11195 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") Checks if `value` is `undefined`. @@ -5673,7 +5675,7 @@ _.isUndefined(null); ### `_.isWeakMap(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11190 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11217 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package") Checks if `value` is classified as a `WeakMap` object. @@ -5700,7 +5702,7 @@ _.isWeakMap(new Map); ### `_.isWeakSet(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11212 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11239 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package") Checks if `value` is classified as a `WeakSet` object. @@ -5727,7 +5729,7 @@ _.isWeakSet(new Set); ### `_.lt(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11238 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11265 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package") Checks if `value` is less than `other`. @@ -5758,7 +5760,7 @@ _.lt(3, 1); ### `_.lte(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11264 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lte "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11291 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lte "See the npm package") Checks if `value` is less than or equal to `other`. @@ -5789,7 +5791,7 @@ _.lte(3, 1); ### `_.toArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11291 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11318 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") Converts `value` to an array. @@ -5822,7 +5824,7 @@ _.toArray(null); ### `_.toInteger(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11333 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11360 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package") Converts `value` to an integer.
@@ -5859,7 +5861,7 @@ _.toInteger('3'); ### `_.toLength(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11373 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tolength "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11400 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tolength "See the npm package") Converts `value` to an integer suitable for use as the length of an array-like object. @@ -5897,7 +5899,7 @@ _.toLength('3'); ### `_.toNumber(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11400 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11427 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package") Converts `value` to a number. @@ -5930,7 +5932,7 @@ _.toNumber('3'); ### `_.toPlainObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11445 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11472 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package") Converts `value` to a plain object flattening inherited enumerable string keyed properties of `value` to own properties of the plain object. @@ -5964,7 +5966,7 @@ _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); ### `_.toSafeInteger(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11473 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11500 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package") Converts `value` to a safe integer. A safe integer can be compared and represented correctly. @@ -5998,7 +6000,7 @@ _.toSafeInteger('3'); ### `_.toString(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11498 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tostring "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11525 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tostring "See the npm package") Converts `value` to a string if it's not one. An empty string is returned for `null` and `undefined` values. The sign of `-0` is preserved. @@ -6035,7 +6037,7 @@ _.toString([1, 2, 3]); ### `_.add(augend, addend)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14996 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15034 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") Adds two numbers. @@ -6060,7 +6062,7 @@ _.add(6, 4); ### `_.ceil(number, [precision=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L15021 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15059 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package") Computes `number` rounded up to `precision`. @@ -6091,7 +6093,7 @@ _.ceil(6040, -2); ### `_.divide(dividend, divisor)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L15038 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.divide "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15076 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.divide "See the npm package") Divide two numbers. @@ -6116,7 +6118,7 @@ _.divide(6, 4); ### `_.floor(number, [precision=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L15063 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15101 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package") Computes `number` rounded down to `precision`. @@ -6147,9 +6149,9 @@ _.floor(4060, -2); ### `_.max(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L15083 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15121 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package") -Computes the maximum value of `array`. If `array` is empty or falsey +Computes the maximum value of `array`. If `array` is empty or falsey, `undefined` is returned. #### Since @@ -6175,7 +6177,7 @@ _.max([]); ### `_.maxBy(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L15113 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.maxby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15151 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.maxby "See the npm package") This method is like `_.max` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -6208,7 +6210,7 @@ _.maxBy(objects, 'n'); ### `_.mean(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L15133 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15171 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package") Computes the mean of the values in `array`. @@ -6232,7 +6234,7 @@ _.mean([4, 2, 8, 6]); ### `_.meanBy(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L15161 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.meanby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15199 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.meanby "See the npm package") This method is like `_.mean` except that it accepts `iteratee` which is invoked for each element in `array` to generate the value to be averaged. @@ -6265,9 +6267,9 @@ _.meanBy(objects, 'n'); ### `_.min(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L15183 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15221 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package") -Computes the minimum value of `array`. If `array` is empty or falsey +Computes the minimum value of `array`. If `array` is empty or falsey, `undefined` is returned. #### Since @@ -6293,7 +6295,7 @@ _.min([]); ### `_.minBy(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L15213 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.minby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15251 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.minby "See the npm package") This method is like `_.min` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -6326,7 +6328,7 @@ _.minBy(objects, 'n'); ### `_.multiply(multiplier, multiplicand)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L15234 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.multiply "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15272 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.multiply "See the npm package") Multiply two numbers. @@ -6351,7 +6353,7 @@ _.multiply(6, 4); ### `_.round(number, [precision=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L15259 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15297 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package") Computes `number` rounded to `precision`. @@ -6382,7 +6384,7 @@ _.round(4060, -2); ### `_.subtract(minuend, subtrahend)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L15276 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15314 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package") Subtract two numbers. @@ -6407,7 +6409,7 @@ _.subtract(6, 4); ### `_.sum(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L15294 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15332 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") Computes the sum of the values in `array`. @@ -6431,7 +6433,7 @@ _.sum([4, 2, 8, 6]); ### `_.sumBy(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L15324 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sumby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15362 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sumby "See the npm package") This method is like `_.sum` except that it accepts `iteratee` which is invoked for each element in `array` to generate the value to be summed. @@ -6470,7 +6472,7 @@ _.sumBy(objects, 'n'); ### `_.clamp(number, [lower], upper)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12923 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12950 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package") Clamps `number` within the inclusive `lower` and `upper` bounds. @@ -6499,10 +6501,10 @@ _.clamp(10, -5, 5); ### `_.inRange(number, [start=0], end)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12976 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13003 "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's set to `start` with `start` then set to `0`. +`end` is not specified, it's set to `start` with `start` then set to `0`. If `start` is greater than `end` the params are swapped to support negative ranges. @@ -6546,7 +6548,7 @@ _.inRange(-3, -2, -6); ### `_.random([lower=0], [upper=1], [floating])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13019 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13046 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package") Produces a random number between the inclusive `lower` and `upper` bounds. If only one argument is provided a number between `0` and the given number @@ -6594,7 +6596,7 @@ _.random(1.2, 5.2); ### `_.assign(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11546 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11573 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package") Assigns own enumerable string keyed properties of source objects to the destination object. Source objects are applied from left to right. @@ -6636,7 +6638,7 @@ _.assign({ 'a': 1 }, new Foo, new Bar); ### `_.assignIn(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11588 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assignin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11615 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assignin "See the npm package") This method is like `_.assign` except that it iterates over own and inherited source properties. @@ -6679,11 +6681,11 @@ _.assignIn({ 'a': 1 }, new Foo, new Bar); ### `_.assignInWith(object, sources, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11626 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assigninwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11653 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assigninwith "See the npm package") This method is like `_.assignIn` except that it accepts `customizer` which is invoked to produce the assigned values. If `customizer` returns -`undefined` assignment is handled by the method instead. The `customizer` +`undefined`, assignment is handled by the method instead. The `customizer` is invoked with five arguments: *(objValue, srcValue, key, object, source)*.

@@ -6720,11 +6722,11 @@ defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); ### `_.assignWith(object, sources, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11657 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assignwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11684 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assignwith "See the npm package") This method is like `_.assign` except that it accepts `customizer` which is invoked to produce the assigned values. If `customizer` returns -`undefined` assignment is handled by the method instead. The `customizer` +`undefined`, assignment is handled by the method instead. The `customizer` is invoked with five arguments: *(objValue, srcValue, key, object, source)*.

@@ -6758,7 +6760,7 @@ defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); ### `_.at(object, [paths])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11682 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11709 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package") Creates an array of values corresponding to `paths` of `object`. @@ -6788,10 +6790,10 @@ _.at(['a', 'b', 'c'], 0, 2); ### `_.create(prototype, [properties])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11720 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11747 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package") Creates an object that inherits from the `prototype` object. If a -`properties` object is given its own enumerable string keyed properties +`properties` object is given, its own enumerable string keyed properties are assigned to the created object. #### Since @@ -6832,7 +6834,7 @@ circle instanceof Shape; ### `_.defaults(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11745 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11772 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package") Assigns own and inherited enumerable string keyed properties of source objects to the destination object for all destination properties that @@ -6863,7 +6865,7 @@ _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); ### `_.defaultsDeep(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11769 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11796 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package") This method is like `_.defaults` except that it recursively assigns default properties. @@ -6892,7 +6894,7 @@ _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'ag ### `_.findKey(object, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11810 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11837 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package") This method is like `_.find` except that it returns the key of the first element `predicate` returns truthy for instead of the element itself. @@ -6936,7 +6938,7 @@ _.findKey(users, 'active'); ### `_.findLastKey(object, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11850 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11877 "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. @@ -6980,7 +6982,7 @@ _.findLastKey(users, 'active'); ### `_.forIn(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11881 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11908 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package") Iterates over own and inherited enumerable string keyed properties of an object invoking `iteratee` for each property. The iteratee is invoked with @@ -7017,7 +7019,7 @@ _.forIn(new Foo, function(value, key) { ### `_.forInRight(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11912 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11939 "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. @@ -7052,7 +7054,7 @@ _.forInRight(new Foo, function(value, key) { ### `_.forOwn(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11945 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L11972 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package") Iterates over own enumerable string keyed properties of an object invoking `iteratee` for each property. The iteratee is invoked with three arguments:
@@ -7089,7 +7091,7 @@ _.forOwn(new Foo, function(value, key) { ### `_.forOwnRight(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L11974 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12001 "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. @@ -7124,7 +7126,7 @@ _.forOwnRight(new Foo, function(value, key) { ### `_.functions(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12000 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12027 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package") Creates an array of function property names from own enumerable properties of `object`. @@ -7156,7 +7158,7 @@ _.functions(new Foo); ### `_.functionsIn(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12026 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functionsin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12053 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functionsin "See the npm package") Creates an array of function property names from own and inherited enumerable properties of `object`. @@ -7188,10 +7190,10 @@ _.functionsIn(new Foo); ### `_.get(object, path, [defaultValue])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12055 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12082 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package") Gets the value at `path` of `object`. If the resolved value is -`undefined` the `defaultValue` is used in its place. +`undefined`, the `defaultValue` is used in its place. #### Since 3.7.0 @@ -7223,7 +7225,7 @@ _.get(object, 'a.b.c', 'default'); ### `_.has(object, path)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12087 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12114 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") Checks if `path` is a direct property of `object`. @@ -7238,16 +7240,16 @@ Checks if `path` is a direct property of `object`. #### Example ```js -var object = { 'a': { 'b': { 'c': 3 } } }; -var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); +var object = { 'a': { 'b': 2 } }; +var other = _.create({ 'a': _.create({ 'b': 2 }) }); _.has(object, 'a'); // => true -_.has(object, 'a.b.c'); +_.has(object, 'a.b'); // => true -_.has(object, ['a', 'b', 'c']); +_.has(object, ['a', 'b']); // => true _.has(other, 'a'); @@ -7260,7 +7262,7 @@ _.has(other, 'a'); ### `_.hasIn(object, path)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12117 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.hasin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12144 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.hasin "See the npm package") Checks if `path` is a direct or inherited property of `object`. @@ -7275,15 +7277,15 @@ Checks if `path` is a direct or inherited property of `object`. #### Example ```js -var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); +var object = _.create({ 'a': _.create({ 'b': 2 }) }); _.hasIn(object, 'a'); // => true -_.hasIn(object, 'a.b.c'); +_.hasIn(object, 'a.b'); // => true -_.hasIn(object, ['a', 'b', 'c']); +_.hasIn(object, ['a', 'b']); // => true _.hasIn(object, 'b'); @@ -7296,7 +7298,7 @@ _.hasIn(object, 'b'); ### `_.invert(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12139 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12166 "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 @@ -7324,7 +7326,7 @@ _.invert(object); ### `_.invertBy(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12170 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invertby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12197 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invertby "See the npm package") This method is like `_.invert` except that the inverted object is generated from the results of running each element of `object` thru `iteratee`. The @@ -7360,7 +7362,7 @@ _.invertBy(object, function(value) { ### `_.invoke(object, path, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12196 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12223 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package") Invokes the method at `path` of `object`. @@ -7388,7 +7390,7 @@ _.invoke(object, 'a[0].b.c.slice', 1, 3); ### `_.keys(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12226 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12253 "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`.
@@ -7427,7 +7429,7 @@ _.keys('hi'); ### `_.keysIn(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12269 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12296 "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`.
@@ -7461,7 +7463,7 @@ _.keysIn(new Foo); ### `_.mapKeys(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12310 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapkeys "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12337 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapkeys "See the npm package") The opposite of `_.mapValues`; this method creates an object with the same values as `object` and keys generated by running each own enumerable @@ -7491,7 +7493,7 @@ _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { ### `_.mapValues(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12348 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12375 "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 string keyed property of `object` thru @@ -7528,7 +7530,7 @@ _.mapValues(users, 'age'); ### `_.merge(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12389 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12416 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package") This method is like `_.assign` except that it recursively merges own and inherited enumerable string keyed properties of source objects into the @@ -7570,11 +7572,11 @@ _.merge(users, ages); ### `_.mergeWith(object, sources, customizer)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12431 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mergewith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12458 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mergewith "See the npm package") This method is like `_.merge` except that it accepts `customizer` which is invoked to produce the merged values of the destination and source -properties. If `customizer` returns `undefined` merging is handled by the +properties. If `customizer` returns `undefined`, merging is handled by the method instead. The `customizer` is invoked with seven arguments:
*(objValue, srcValue, key, object, source, stack)*.
@@ -7619,7 +7621,7 @@ _.mergeWith(object, other, customizer); ### `_.omit(object, [props])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12455 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12482 "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 string keyed properties of `object` that are @@ -7648,7 +7650,7 @@ _.omit(object, ['a', 'c']); ### `_.omitBy(object, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12484 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omitby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12511 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omitby "See the npm package") The opposite of `_.pickBy`; this method creates an object composed of the own and inherited enumerable string keyed properties of `object` that @@ -7678,7 +7680,7 @@ _.omitBy(object, _.isNumber); ### `_.pick(object, [props])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12509 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12536 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package") Creates an object composed of the picked `object` properties. @@ -7705,7 +7707,7 @@ _.pick(object, ['a', 'c']); ### `_.pickBy(object, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12532 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pickby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12559 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pickby "See the npm package") Creates an object composed of the `object` properties `predicate` returns truthy for. The predicate is invoked with two arguments: *(value, key)*. @@ -7733,7 +7735,7 @@ _.pickBy(object, _.isNumber); ### `_.result(object, path, [defaultValue])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12565 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12592 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package") This method is like `_.get` except that if the resolved value is a function it's invoked with the `this` binding of its parent object and @@ -7772,9 +7774,9 @@ _.result(object, 'a[0].b.c3', _.constant('default')); ### `_.set(object, path, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12615 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12642 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package") -Sets the value at `path` of `object`. If a portion of `path` doesn't exist +Sets the value at `path` of `object`. If a portion of `path` doesn't exist, it's created. Arrays are created for missing index properties while objects are created for all other missing properties. Use `_.setWith` to customize `path` creation. @@ -7811,7 +7813,7 @@ console.log(object.x[0].y.z); ### `_.setWith(object, path, value, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12643 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.setwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12670 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.setwith "See the npm package") This method is like `_.set` except that it accepts `customizer` which is invoked to produce the objects of `path`. If `customizer` returns `undefined` @@ -7846,7 +7848,7 @@ _.setWith(object, '[0][1]', 'a', Object); ### `_.toPairs(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12671 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topairs "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12698 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topairs "See the npm package") Creates an array of own enumerable string keyed-value pairs for `object` which can be consumed by `_.fromPairs`. @@ -7881,7 +7883,7 @@ _.toPairs(new Foo); ### `_.toPairsIn(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12698 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topairsin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12725 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topairsin "See the npm package") Creates an array of own and inherited enumerable string keyed-value pairs for `object` which can be consumed by `_.fromPairs`. @@ -7916,7 +7918,7 @@ _.toPairsIn(new Foo); ### `_.transform(object, [iteratee=_.identity], [accumulator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12731 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12758 "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 @@ -7955,7 +7957,7 @@ _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { ### `_.unset(object, path)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12780 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12807 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package") Removes the property at `path` of `object`.
@@ -7993,7 +7995,7 @@ console.log(object); ### `_.update(object, path, updater)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12811 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.update "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12838 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.update "See the npm package") This method is like `_.set` except that accepts `updater` to produce the value to set. Use `_.updateWith` to customize `path` creation. The `updater` @@ -8031,7 +8033,7 @@ console.log(object.x[0].y.z); ### `_.updateWith(object, path, updater, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12839 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.updatewith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12866 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.updatewith "See the npm package") This method is like `_.update` except that it accepts `customizer` which is invoked to produce the objects of `path`. If `customizer` returns `undefined` @@ -8066,7 +8068,7 @@ _.updateWith(object, '[0][1]', _.constant('a'), Object); ### `_.values(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12870 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12897 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package") Creates an array of the own enumerable string keyed property values of `object`.
@@ -8103,7 +8105,7 @@ _.values('hi'); ### `_.valuesIn(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L12898 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L12925 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package") Creates an array of the own and inherited enumerable string keyed property values of `object`. @@ -8144,7 +8146,7 @@ _.valuesIn(new Foo); ### `_(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L1587 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L1587 "View in source") [Ⓣ][1] Creates a `lodash` object which wraps `value` to enable implicit method chain sequences. Methods that operate on and return arrays, collections, @@ -8166,9 +8168,9 @@ Lazy evaluation allows several methods to support shortcut fusion. Shortcut fusion is an optimization to merge iteratee calls; this avoids the creation of intermediate arrays and can greatly reduce the number of iteratee executions. Sections of a chain sequence qualify for shortcut -fusion if the section is applied to an array of at least two hundred -elements and any iteratees accept only one argument. The heuristic for -whether a section qualifies for shortcut fusion is subject to change. +fusion if the section is applied to an array of at least `200` elements +and any iteratees accept only one argument. The heuristic for whether a +section qualifies for shortcut fusion is subject to change.

Chaining is supported in custom builds as long as the `_#value` method is @@ -8278,7 +8280,7 @@ _.isArray(squares.value()); ### `_.chain(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7681 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7708 "View in source") [Ⓣ][1] Creates a `lodash` wrapper instance that wraps `value` with explicit method chain sequences enabled. The result of such sequences must be unwrapped @@ -8317,7 +8319,7 @@ var youngest = _ ### `_.tap(value, interceptor)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7710 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7737 "View in source") [Ⓣ][1] This method invokes `interceptor` and returns `value`. The interceptor is invoked with one argument; *(value)*. The purpose of this method is to @@ -8350,7 +8352,7 @@ _([1, 2, 3]) ### `_.thru(value, interceptor)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7738 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7765 "View in source") [Ⓣ][1] This method is like `_.tap` except that it returns the result of `interceptor`. The purpose of this method is to "pass thru" values replacing intermediate @@ -8383,7 +8385,7 @@ _(' abc ') ### `_.prototype[Symbol.iterator]()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7898 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7925 "View in source") [Ⓣ][1] Enables the wrapper to be iterable. @@ -8409,7 +8411,7 @@ Array.from(wrapped); ### `_.prototype.at([paths])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7762 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7789 "View in source") [Ⓣ][1] This method is the wrapper version of `_.at`. @@ -8438,7 +8440,7 @@ _(['a', 'b', 'c']).at(0, 2).value(); ### `_.prototype.chain()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7814 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7841 "View in source") [Ⓣ][1] Creates a `lodash` wrapper instance with explicit method chain sequences enabled. @@ -8473,7 +8475,7 @@ _(users) ### `_.prototype.commit()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7844 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7871 "View in source") [Ⓣ][1] Executes the chain sequence and returns the wrapped result. @@ -8507,7 +8509,7 @@ console.log(array); ### `_.prototype.next()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7870 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7897 "View in source") [Ⓣ][1] Gets the next value on a wrapped object following the [iterator protocol](https://mdn.io/iteration_protocols#iterator). @@ -8537,7 +8539,7 @@ wrapped.next(); ### `_.prototype.plant(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7926 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7953 "View in source") [Ⓣ][1] Creates a clone of the chain sequence planting `value` as the wrapped value. @@ -8571,7 +8573,7 @@ wrapped.value(); ### `_.prototype.reverse()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7966 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L7993 "View in source") [Ⓣ][1] This method is the wrapper version of `_.reverse`.
@@ -8600,14 +8602,14 @@ console.log(array); ### `_.prototype.value()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L7998 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L8025 "View in source") [Ⓣ][1] Executes the chain sequence to resolve the unwrapped value. #### Since 0.1.0 #### Aliases -*_.prototype.toJSON* +*_.prototype.toJSON, _.prototype.valueOf* #### Returns *(*)*: Returns the resolved unwrapped value. @@ -8630,7 +8632,7 @@ _([1, 2, 3]).value(); ### `_.camelCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13080 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13107 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package") Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). @@ -8660,7 +8662,7 @@ _.camelCase('__FOO_BAR__'); ### `_.capitalize([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13100 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13127 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package") Converts the first character of `string` to upper case and the remaining to lower case. @@ -8685,7 +8687,7 @@ _.capitalize('FRED'); ### `_.deburr([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13121 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13148 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package") Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) @@ -8712,7 +8714,7 @@ _.deburr('déjà vu'); ### `_.endsWith([string=''], [target], [position=string.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13149 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13176 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") Checks if `string` ends with the given target string. @@ -8744,7 +8746,7 @@ _.endsWith('abc', 'b', 2); ### `_.escape([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13196 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13223 "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. @@ -8792,7 +8794,7 @@ _.escape('fred, barney, & pebbles'); ### `_.escapeRegExp([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13218 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13245 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. @@ -8817,7 +8819,7 @@ _.escapeRegExp('[lodash](https://lodash.com/)'); ### `_.kebabCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13246 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13273 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package") Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). @@ -8848,7 +8850,7 @@ _.kebabCase('__FOO_BAR__'); ### `_.lowerCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13270 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13297 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package") Converts `string`, as space separated words, to lower case. @@ -8878,7 +8880,7 @@ _.lowerCase('__FOO_BAR__'); ### `_.lowerFirst([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13291 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13318 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") Converts the first character of `string` to lower case. @@ -8905,7 +8907,7 @@ _.lowerFirst('FRED'); ### `_.pad([string=''], [length=0], [chars=' '])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13316 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13343 "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's shorter than `length`. Padding characters are truncated if they can't be evenly divided by `length`. @@ -8938,7 +8940,7 @@ _.pad('abc', 3); ### `_.padEnd([string=''], [length=0], [chars=' '])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13355 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padend "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13382 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padend "See the npm package") Pads `string` on the right side if it's shorter than `length`. Padding characters are truncated if they exceed `length`. @@ -8971,7 +8973,7 @@ _.padEnd('abc', 3); ### `_.padStart([string=''], [length=0], [chars=' '])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13388 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padstart "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13415 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padstart "See the npm package") Pads `string` on the left side if it's shorter than `length`. Padding characters are truncated if they exceed `length`. @@ -9004,7 +9006,7 @@ _.padStart('abc', 3); ### `_.parseInt(string, [radix=10])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13422 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13449 "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 @@ -9038,7 +9040,7 @@ _.map(['6', '08', '10'], _.parseInt); ### `_.repeat([string=''], [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13456 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13483 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") Repeats the given string `n` times. @@ -9069,7 +9071,7 @@ _.repeat('abc', 0); ### `_.replace([string=''], pattern, replacement)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13484 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13511 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package") Replaces matches for `pattern` in `string` with `replacement`.
@@ -9099,7 +9101,7 @@ _.replace('Hi Fred', 'Fred', 'Barney'); ### `_.snakeCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13512 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13539 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package") Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case). @@ -9130,7 +9132,7 @@ _.snakeCase('--FOO-BAR--'); ### `_.split([string=''], separator, [limit])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13535 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13562 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package") Splits `string` by `separator`.
@@ -9160,7 +9162,7 @@ _.split('a-b-c', '-', 2); ### `_.startCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13560 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13598 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package") Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). @@ -9191,7 +9193,7 @@ _.startCase('__FOO_BAR__'); ### `_.startsWith([string=''], [target], [position=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13587 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13625 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") Checks if `string` starts with the given target string. @@ -9223,13 +9225,13 @@ _.startsWith('abc', 'b', 1); ### `_.template([string=''], [options={}], [options.escape=_.templateSettings.escape], [options.evaluate=_.templateSettings.evaluate], [options.imports=_.templateSettings.imports], [options.interpolate=_.templateSettings.interpolate], [options.sourceURL='lodash.templateSources[n]'], [options.variable='obj'])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13696 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13734 "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 "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data properties may be accessed as free variables in the template. If a setting -object is given it takes precedence over `_.templateSettings` values. +object is given, it takes precedence over `_.templateSettings` values.

**Note:** In the development build `_.template` utilizes @@ -9332,7 +9334,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\ ### `_.toLower([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13825 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tolower "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13863 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tolower "See the npm package") Converts `string`, as a whole, to lower case just like [String#toLowerCase](https://mdn.io/toLowerCase). @@ -9363,7 +9365,7 @@ _.toLower('__FOO_BAR__'); ### `_.toUpper([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13850 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toupper "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13888 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toupper "See the npm package") Converts `string`, as a whole, to upper case just like [String#toUpperCase](https://mdn.io/toUpperCase). @@ -9394,7 +9396,7 @@ _.toUpper('__foo_bar__'); ### `_.trim([string=''], [chars=whitespace])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13876 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13914 "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`. @@ -9425,7 +9427,7 @@ _.map([' foo ', ' bar '], _.trim); ### `_.trimEnd([string=''], [chars=whitespace])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13915 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13953 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package") Removes trailing whitespace or specified characters from `string`. @@ -9453,7 +9455,7 @@ _.trimEnd('-_-abc-_-', '_-'); ### `_.trimStart([string=''], [chars=whitespace])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L13952 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L13990 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package") Removes leading whitespace or specified characters from `string`. @@ -9481,7 +9483,7 @@ _.trimStart('-_-abc-_-', '_-'); ### `_.truncate([string=''], [options={}], [options.length=30], [options.omission='...'], [options.separator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14007 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.truncate "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14045 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.truncate "See the npm package") Truncates `string` if it's longer than the given maximum string length. The last characters of the truncated string are replaced with the omission @@ -9528,7 +9530,7 @@ _.truncate('hi-diddly-ho there, neighborino', { ### `_.unescape([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14082 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14120 "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 @@ -9558,7 +9560,7 @@ _.unescape('fred, barney, & pebbles'); ### `_.upperCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14109 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14147 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package") Converts `string`, as space separated words, to upper case. @@ -9588,7 +9590,7 @@ _.upperCase('__foo_bar__'); ### `_.upperFirst([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14130 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14168 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") Converts the first character of `string` to upper case. @@ -9615,7 +9617,7 @@ _.upperFirst('FRED'); ### `_.words([string=''], [pattern])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14151 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14189 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") Splits `string` into an array of its words. @@ -9649,7 +9651,7 @@ _.words('fred, barney, & pebbles', /[^, ]+/g); ### `_.attempt(func, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14185 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14223 "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's invoked. @@ -9681,7 +9683,7 @@ if (_.isError(elements)) { ### `_.bindAll(object, methodNames)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14220 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14258 "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. @@ -9718,7 +9720,7 @@ jQuery(element).on('click', view.onClick); ### `_.cond(pairs)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14256 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.cond "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14294 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.cond "See the npm package") Creates a function that iterates over `pairs` invoking the corresponding function of the first predicate to return truthy. The predicate-function @@ -9757,7 +9759,7 @@ func({ 'a': '1', 'b': '2' }); ### `_.conforms(source)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14299 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.conforms "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14337 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.conforms "See the npm package") Creates a function that invokes the predicate properties of `source` with the corresponding property values of a given object, returning `true` if @@ -9788,7 +9790,7 @@ _.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) })); ### `_.constant(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14320 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14358 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") Creates a function that returns `value`. @@ -9815,7 +9817,7 @@ getter() === object; ### `_.flow([funcs])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14347 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14385 "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 given functions with the `this` binding of the created function, where each successive @@ -9846,7 +9848,7 @@ addSquare(1, 2); ### `_.flowRight([funcs])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14369 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14407 "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 given functions from right to left. @@ -9876,7 +9878,7 @@ addSquare(1, 2); ### `_.identity(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14387 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14425 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") This method returns the first argument given to it. @@ -9902,11 +9904,11 @@ _.identity(object) === object; ### `_.iteratee([func=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14433 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iteratee "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14471 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iteratee "See the npm package") Creates a function that invokes `func` with the arguments of the created -function. If `func` is a property name the created function returns the -property value for a given element. If `func` is an array or object the +function. If `func` is a property name, the created function returns the +property value for a given element. If `func` is an array or object, the created function returns `true` for elements that contain the equivalent source properties, otherwise it returns `false`. @@ -9954,7 +9956,7 @@ _.filter(['abc', 'def'], /ef/); ### `_.matches(source)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14461 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14499 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package") Creates a function that performs a partial deep comparison between a given object and `source`, returning `true` if the given object has equivalent @@ -9989,7 +9991,7 @@ _.filter(users, _.matches({ 'age': 40, 'active': false })); ### `_.matchesProperty(path, srcValue)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14489 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14527 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") Creates a function that performs a partial deep comparison between the value at `path` of a given object to `srcValue`, returning `true` if the @@ -10024,7 +10026,7 @@ _.find(users, _.matchesProperty('user', 'fred')); ### `_.method(path, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14517 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14555 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package") Creates a function that invokes the method at `path` of a given object. Any additional arguments are provided to the invoked method. @@ -10041,14 +10043,14 @@ Any additional arguments are provided to the invoked method. #### Example ```js var objects = [ - { 'a': { 'b': { 'c': _.constant(2) } } }, - { 'a': { 'b': { 'c': _.constant(1) } } } + { 'a': { 'b': _.constant(2) } }, + { 'a': { 'b': _.constant(1) } } ]; -_.map(objects, _.method('a.b.c')); +_.map(objects, _.method('a.b')); // => [2, 1] -_.map(objects, _.method(['a', 'b', 'c'])); +_.map(objects, _.method(['a', 'b'])); // => [2, 1] ``` * * * @@ -10058,7 +10060,7 @@ _.map(objects, _.method(['a', 'b', 'c'])); ### `_.methodOf(object, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14546 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14584 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package") The opposite of `_.method`; this method creates a function that invokes the method at a given path of `object`. Any additional arguments are @@ -10091,10 +10093,10 @@ _.map([['a', '2'], ['c', '0']], _.methodOf(object)); ### `_.mixin([object=lodash], source, [options={}], [options.chain=true])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14588 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14626 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package") Adds all own enumerable string keyed function properties of a source -object to the destination object. If `object` is a function then methods +object to the destination object. If `object` is a function, then methods are added to its prototype as well.

@@ -10138,7 +10140,7 @@ _('fred').vowels(); ### `_.noConflict()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14637 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14675 "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. @@ -10159,7 +10161,7 @@ var lodash = _.noConflict(); ### `_.noop()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14659 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14697 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package") A no-operation function that returns `undefined` regardless of the arguments it receives. @@ -10180,7 +10182,7 @@ _.noop(object) === undefined; ### `_.nthArg([n=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14679 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14717 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package") Creates a function that returns its nth argument. @@ -10206,7 +10208,7 @@ func('a', 'b', 'c'); ### `_.over(iteratees)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14703 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14741 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package") Creates a function that invokes `iteratees` with the arguments it receives and returns their results. @@ -10233,7 +10235,7 @@ func(1, 2, 3, 4); ### `_.overEvery(predicates)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14728 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.overevery "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14766 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.overevery "See the npm package") Creates a function that checks if **all** of the `predicates` return truthy when invoked with the arguments it receives. @@ -10266,7 +10268,7 @@ func(NaN); ### `_.overSome(predicates)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14753 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.oversome "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14791 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.oversome "See the npm package") Creates a function that checks if **any** of the `predicates` return truthy when invoked with the arguments it receives. @@ -10299,7 +10301,7 @@ func(NaN); ### `_.property(path)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14777 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14815 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package") Creates a function that returns the value at `path` of a given object. @@ -10314,14 +10316,14 @@ Creates a function that returns the value at `path` of a given object. #### Example ```js var objects = [ - { 'a': { 'b': { 'c': 2 } } }, - { 'a': { 'b': { 'c': 1 } } } + { 'a': { 'b': 2 } }, + { 'a': { 'b': 1 } } ]; -_.map(objects, _.property('a.b.c')); +_.map(objects, _.property('a.b')); // => [2, 1] -_.map(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); +_.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); // => [1, 2] ``` * * * @@ -10331,7 +10333,7 @@ _.map(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); ### `_.propertyOf(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14802 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14840 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package") The opposite of `_.property`; this method creates a function that returns the value at a given path of `object`. @@ -10362,11 +10364,11 @@ _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); ### `_.range([start=0], end, [step=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14848 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14886 "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`. A step of `-1` is used if a negative -`start` is specified without an `end` or `step`. If `end` is not specified +`start` is specified without an `end` or `step`. If `end` is not specified, it's set to `start` with `start` then set to `0`.

@@ -10413,7 +10415,7 @@ _.range(0); ### `_.rangeRight([start=0], end, [step=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14885 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rangeright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14923 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rangeright "See the npm package") This method is like `_.range` except that it populates values in descending order. @@ -10458,7 +10460,7 @@ _.rangeRight(0); ### `_.runInContext([context=root])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L1372 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L1372 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package") Create a new pristine `lodash` function using the `context` object. @@ -10504,7 +10506,7 @@ var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; ### `_.times(n, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14906 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14944 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package") Invokes the iteratee `n` times, returning an array of the results of each invocation. The iteratee is invoked with one argument; *(index)*. @@ -10533,7 +10535,7 @@ _.times(3, String); ### `_.toPath(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14950 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L14988 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package") Converts `value` to a property path array. @@ -10569,9 +10571,9 @@ console.log(path === newPath); ### `_.uniqueId([prefix=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L14974 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15012 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package") -Generates a unique ID. If `prefix` is given the ID is appended to it. +Generates a unique ID. If `prefix` is given, the ID is appended to it. #### Since 0.1.0 @@ -10602,7 +10604,7 @@ _.uniqueId(); ### `_.VERSION` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L15660 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L15698 "View in source") [Ⓣ][1] (string): The semantic version number. @@ -10613,7 +10615,7 @@ _.uniqueId(); ### `_.templateSettings` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L1632 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L1632 "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 @@ -10626,7 +10628,7 @@ alternative delimiters. ### `_.templateSettings.escape` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L1640 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L1640 "View in source") [Ⓣ][1] (RegExp): Used to detect `data` property values to be HTML-escaped. @@ -10637,7 +10639,7 @@ alternative delimiters. ### `_.templateSettings.evaluate` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L1648 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L1648 "View in source") [Ⓣ][1] (RegExp): Used to detect code to be evaluated. @@ -10648,7 +10650,7 @@ alternative delimiters. ### `_.templateSettings.imports` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L1672 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L1672 "View in source") [Ⓣ][1] (Object): Used to import variables into the compiled template. @@ -10659,7 +10661,7 @@ alternative delimiters. ### `_.templateSettings.interpolate` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L1656 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L1656 "View in source") [Ⓣ][1] (RegExp): Used to detect `data` property values to inject. @@ -10670,7 +10672,7 @@ alternative delimiters. ### `_.templateSettings.variable` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L1664 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L1664 "View in source") [Ⓣ][1] (string): Used to reference the data object in the template text. @@ -10687,7 +10689,7 @@ alternative delimiters. ### `_.templateSettings.imports._` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.2/lodash.js#L1680 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.9.0/lodash.js#L1680 "View in source") [Ⓣ][1] A reference to the `lodash` function. diff --git a/lodash.js b/lodash.js index 08693b1a7e..9e8012824c 100644 --- a/lodash.js +++ b/lodash.js @@ -1,6 +1,6 @@ /** * @license - * lodash 4.8.2 + * lodash 4.9.0 * Copyright jQuery Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 @@ -12,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.8.2'; + var VERSION = '4.9.0'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; diff --git a/package.json b/package.json index fd1f424a64..feb6aa44b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "4.8.2", + "version": "4.9.0", "license": "MIT", "private": true, "main": "lodash.js", @@ -19,7 +19,7 @@ "istanbul": "0.4.3", "jquery": "^2.2.3", "jscs": "^2.11.0", - "lodash": "4.7.0", + "lodash": "4.8.2", "platform": "^1.3.1", "qunit-extras": "^1.5.0", "qunitjs": "~1.23.0", From ee73c9b4369098ebfb530b5cb3a0d45b91ae3bb9 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 8 Apr 2016 01:26:29 -0700 Subject: [PATCH 28/28] Bump to v4.9.0. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ba39b374e4..da8e224c0f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v4.8.2 +# lodash v4.9.0 The [Lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module. @@ -20,11 +20,11 @@ $ lodash core -o ./dist/lodash.core.js ## Download -Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.8.2/LICENSE) & supports [modern environments](#support).
+Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.9.0/LICENSE) & supports [modern environments](#support).
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you. - * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.8.2/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.8.2/dist/lodash.core.min.js)) - * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.8.2/dist/lodash.js) ([~22 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.8.2/dist/lodash.min.js)) + * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.9.0/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.9.0/dist/lodash.core.min.js)) + * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.9.0/dist/lodash.js) ([~21 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.9.0/dist/lodash.min.js)) * [CDN copies](https://www.jsdelivr.com/projects/lodash) ## Why Lodash? @@ -43,10 +43,10 @@ Lodash is available in a [variety of builds](https://lodash.com/custom-builds) & * [lodash](https://www.npmjs.com/package/lodash) & [per method packages](https://www.npmjs.com/browse/keyword/lodash-modularized) * [lodash-amd](https://www.npmjs.com/package/lodash-amd) * [lodash-es](https://www.npmjs.com/package/lodash-es) & [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash) - * [lodash/fp](https://github.com/lodash/lodash/tree/4.8.2-npm/fp) + * [lodash/fp](https://github.com/lodash/lodash/tree/4.9.0-npm/fp) ## Further Reading - * [Contributing](https://github.com/lodash/lodash/blob/4.8.2/.github/CONTRIBUTING.md) + * [Contributing](https://github.com/lodash/lodash/blob/4.9.0/.github/CONTRIBUTING.md) * [Release Notes](https://github.com/lodash/lodash/releases/tag/4.0.0) * [Wiki (Changelog, Roadmap, etc.)](https://github.com/lodash/lodash/wiki)