From d9f93d089558225a2c966d08f147d88637a7bddf Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Apr 2016 00:51:53 -0700 Subject: [PATCH 01/42] Increment package version to enable ci tests. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index af14bfafd5..6d75877dbf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "4.7.0", + "version": "4.7.1-pre", "license": "MIT", "main": "lodash.js", "private": true, From 45953b2ac167492907fd73e5efa4e4e2b886ed92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Segersva=CC=88rd?= Date: Thu, 31 Mar 2016 18:12:50 +0200 Subject: [PATCH 02/42] Set the jsdoc type of `apply`'s `args` parameter to `Array`. [ci skip] --- lodash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lodash.js b/lodash.js index 2e45854139..d70f8bedf9 100644 --- a/lodash.js +++ b/lodash.js @@ -409,7 +409,7 @@ * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. - * @param {...*} args The arguments to invoke `func` with. + * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { From ec92292c38a92e6e7a793866c642d24c74a66ac6 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 31 Mar 2016 09:46:39 -0700 Subject: [PATCH 03/42] Wrap `funcToString` call in `_.isNative` in a try-catch. --- lodash.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lodash.js b/lodash.js index d70f8bedf9..b445b5913e 100644 --- a/lodash.js +++ b/lodash.js @@ -10838,7 +10838,9 @@ return false; } if (isFunction(value)) { - return reIsNative.test(funcToString.call(value)); + try { + return reIsNative.test(funcToString.call(value)); + } catch (e) {} } return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value); From 431e0fa2f649ea4a4e776ba5ae44bd72155bc4fd Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 31 Mar 2016 09:52:11 -0700 Subject: [PATCH 04/42] Add line number to error message in web worker. --- test/asset/worker.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/asset/worker.js b/test/asset/worker.js index 5ce98f6005..8ccffa873c 100644 --- a/test/asset/worker.js +++ b/test/asset/worker.js @@ -5,7 +5,10 @@ addEventListener('message', function(e) { try { importScripts('../' + e.data); } catch (e) { - self._ = { 'VERSION': e.message }; + var lineNumber = e.lineNumber, + message = (lineNumber == null ? '' : (lineNumber + ': ')) + e.message; + + self._ = { 'VERSION': message }; } postMessage(_.VERSION); } From 5bb899a700b9ab596f0d8fe5964c80bf3b9af6ef Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 31 Mar 2016 09:54:09 -0700 Subject: [PATCH 05/42] Add array path examples to `_.set` and `_.unset` docs. [ci skip] --- lodash.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lodash.js b/lodash.js index b445b5913e..32d3b4fff9 100644 --- a/lodash.js +++ b/lodash.js @@ -12571,7 +12571,7 @@ * console.log(object.a[0].b.c); * // => 4 * - * _.set(object, 'x[0].y.z', 5); + * _.set(object, ['x', '0', 'y', 'z'], 5); * console.log(object.x[0].y.z); * // => 5 */ @@ -12734,7 +12734,7 @@ * console.log(object); * // => { 'a': [{ 'b': {} }] }; * - * _.unset(object, 'a[0].b.c'); + * _.unset(object, ['a', '0', 'b', 'c']); * // => true * * console.log(object); From e96ee69f1c14aaf1b42c3f1a14538129f10f0218 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 31 Mar 2016 11:35:15 -0700 Subject: [PATCH 06/42] Remove rogue comment delimiter from fp wiki template. [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 4600ab6e0a..1e429c476f 100644 --- a/lib/fp/template/doc/wiki.jst +++ b/lib/fp/template/doc/wiki.jst @@ -166,7 +166,7 @@ mapValuesWithKey(function(value, key) { // => { 'a': -1, 'b': 1 } ``` -// Manual conversions are also possible with the `convert` module. +Manual conversions are also possible with the `convert` module. ```js var convert = require('lodash/fp/convert'); From 8bd9a4d2c3e780ac8f0d7d1be4e939671cfef86a Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 31 Mar 2016 15:55:05 -0700 Subject: [PATCH 07/42] Ensure `_.has` returns `false` for nullish objects. [closes #2190] --- lodash.js | 4 ++-- test/test.js | 21 ++++++++++++++++++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/lodash.js b/lodash.js index 32d3b4fff9..ff9d2603d4 100644 --- a/lodash.js +++ b/lodash.js @@ -5353,9 +5353,9 @@ var index = -1, length = path.length; - while (object != null && ++index < length) { + while (++index < length) { var key = path[index]; - if (!(result = hasFunc(object, key))) { + if (!(result = object != null && hasFunc(object, key))) { break; } object = object[key]; diff --git a/test/test.js b/test/test.js index 29442e928d..032699be49 100644 --- a/test/test.js +++ b/test/test.js @@ -7128,13 +7128,17 @@ }); QUnit.test('`_.' + methodName + '` should support deep paths', function(assert) { - assert.expect(2); + assert.expect(4); var object = { 'a': { 'b': { 'c': 3 } } }; lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { assert.strictEqual(func(object, path), true); }); + + lodashStable.each(['a.c.b', ['a', 'c', 'b']], function(path) { + assert.strictEqual(func(object, path), false); + }); }); QUnit.test('`_.' + methodName + '` should coerce `path` to a string', function(assert) { @@ -7271,6 +7275,21 @@ }); }); + QUnit.test('`_.' + methodName + '` should return `false` when nested `object` is nullish', function(assert) { + assert.expect(2); + + var values = [null, undefined], + expected = lodashStable.map(values, alwaysFalse); + + lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { + var actual = lodashStable.map(values, function(value) { + return func({ 'a': value }, path); + }); + + assert.deepEqual(actual, expected); + }); + }); + QUnit.test('`_.' + methodName + '` should return `false` with deep paths when `object` is nullish', function(assert) { assert.expect(2); From 642d248f997b6a3531fd436dd76b335f25639cd0 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 31 Mar 2016 19:08:43 -0700 Subject: [PATCH 08/42] Cleanup deep property tests of `has` methods. --- test/test.js | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/test/test.js b/test/test.js index 032699be49..c1c63bf4bc 100644 --- a/test/test.js +++ b/test/test.js @@ -7275,45 +7275,36 @@ }); }); - QUnit.test('`_.' + methodName + '` should return `false` when nested `object` is nullish', function(assert) { + QUnit.test('`_.' + methodName + '` should return `false` for deep paths when `object` is nullish', function(assert) { assert.expect(2); var values = [null, undefined], expected = lodashStable.map(values, alwaysFalse); - lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { + lodashStable.each(['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']], function(path) { var actual = lodashStable.map(values, function(value) { - return func({ 'a': value }, path); + return func(value, path); }); assert.deepEqual(actual, expected); }); }); - QUnit.test('`_.' + methodName + '` should return `false` with deep paths when `object` is nullish', function(assert) { + QUnit.test('`_.' + methodName + '` should return `false` for nested nullish values', function(assert) { assert.expect(2); - var values = [null, undefined], + var values = [, null, undefined], expected = lodashStable.map(values, alwaysFalse); - lodashStable.each(['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']], function(path) { - var actual = lodashStable.map(values, function(value) { - return func(value, path); + lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { + var actual = lodashStable.map(values, function(value, index) { + var object = index ? { 'a': value } : {}; + return func(object, path); }); assert.deepEqual(actual, expected); }); }); - - QUnit.test('`_.' + methodName + '` should return `false` if parts of `path` are missing', function(assert) { - assert.expect(4); - - var object = {}; - - lodashStable.each(['a', 'a[1].b.c', ['a'], ['a', '1', 'b', 'c']], function(path) { - assert.strictEqual(func(object, path), false); - }); - }); }); /*--------------------------------------------------------------------------*/ From 3902fd1a6740bba3141d0eb01d8914a96e918454 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 31 Mar 2016 19:25:40 -0700 Subject: [PATCH 09/42] Ensure has treats nested sparse arrays consistently. --- lodash.js | 37 ++++++++++++++++--------------------- test/test.js | 12 +++++++++++- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/lodash.js b/lodash.js index ff9d2603d4..da93138659 100644 --- a/lodash.js +++ b/lodash.js @@ -5343,29 +5343,24 @@ * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { - if (object == null) { - return false; - } - var result = hasFunc(object, path); - if (!result && !isKey(path)) { - path = baseCastPath(path); + path = isKey(path, object) ? [path] : baseCastPath(path); - var index = -1, - length = path.length; + var index = -1, + length = path.length; - while (++index < length) { - var key = path[index]; - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; + while (++index < length) { + var key = path[index]; + if (!(result = object != null && hasFunc(object, key))) { + break; } + object = object[key]; } - var length = object ? object.length : undefined; - return result || ( - !!length && isLength(length) && isIndex(path, length) && - (isArray(object) || isString(object) || isArguments(object)) - ); + if (result) { + return result; + } + var length = object ? object.length : 0; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isString(object) || isArguments(object)); } /** @@ -12048,7 +12043,7 @@ * // => false */ function has(object, path) { - return hasPath(object, path, baseHas); + return object != null && hasPath(object, path, baseHas); } /** @@ -12078,7 +12073,7 @@ * // => false */ function hasIn(object, path) { - return hasPath(object, path, baseHasIn); + return object != null && hasPath(object, path, baseHasIn); } /** diff --git a/test/test.js b/test/test.js index c1c63bf4bc..32901c175a 100644 --- a/test/test.js +++ b/test/test.js @@ -7243,7 +7243,7 @@ }); QUnit.test('`_.' + methodName + '` should return `true` for index values within bounds for arrays, `arguments` objects, and strings', function(assert) { - assert.expect(1); + assert.expect(2); var string = Object('abc'); delete args[0]; @@ -7256,6 +7256,16 @@ return func(value, 0); }); + assert.deepEqual(actual, expected); + + expected = lodashStable.map(values, lodashStable.constant([true, true])); + + actual = lodashStable.map(values, function(value) { + return lodashStable.map(['a[0]', ['a', '0']], function(path) { + return func({ 'a': value }, path); + }); + }); + assert.deepEqual(actual, expected); args[0] = 1; }); From 9dbd665d05bd3999e40b2d3fa17de238f34c6eac Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 31 Mar 2016 23:24:00 -0700 Subject: [PATCH 10/42] Space nit in `_.toNumber`. [ci skip] --- lodash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lodash.js b/lodash.js index da93138659..6584f54912 100644 --- a/lodash.js +++ b/lodash.js @@ -11367,7 +11367,7 @@ value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { - return value === 0 ? value : +value; + return value === 0 ? value : +value; } value = value.replace(reTrim, ''); var isBinary = reIsBinary.test(value); From 43d530ead908eb9beb4ac6a690d35e83a22248d3 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Fri, 1 Apr 2016 08:28:48 -0700 Subject: [PATCH 11/42] Update dojo to 1.11.1. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6d75877dbf..f15c260df8 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "coveralls": "^2.11.9", "curl-amd": "~0.8.12", "docdown": "~0.5.0", - "dojo": "^1.11.0", + "dojo": "^1.11.1", "ecstatic": "^1.4.0", "fs-extra": "~0.26.7", "glob": "^7.0.3", From b8096df6d88fdc7c3887db563810c685922afb6e Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Apr 2016 09:07:40 -0700 Subject: [PATCH 12/42] Fix leaked var. --- lodash.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lodash.js b/lodash.js index 6584f54912..54ddc96771 100644 --- a/lodash.js +++ b/lodash.js @@ -5345,7 +5345,8 @@ function hasPath(object, path, hasFunc) { path = isKey(path, object) ? [path] : baseCastPath(path); - var index = -1, + var result, + index = -1, length = path.length; while (++index < length) { From b257bb9c9e7346c8965849830ad8df4d5d8d191c Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Apr 2016 09:00:32 -0700 Subject: [PATCH 13/42] Allow `over`, `overEvery`, and `overSome` to accept `matchesProperty` shorthands. [closes #2193] --- fp/_mapping.js | 5 +++++ lodash.js | 12 ++++++------ test/test.js | 21 --------------------- 3 files changed, 11 insertions(+), 27 deletions(-) diff --git a/fp/_mapping.js b/fp/_mapping.js index 584ca2e781..920ac986bd 100644 --- a/fp/_mapping.js +++ b/fp/_mapping.js @@ -164,6 +164,10 @@ exports.methodRearg = { exports.methodSpread = { 'invokeArgs': 2, 'invokeArgsMap': 2, + 'over': 0, + 'overArgs': 1, + 'overEvery': 0, + 'overSome': 0, 'partial': 1, 'partialRight': 1, 'without': 1 @@ -263,6 +267,7 @@ exports.skipRearg = { 'matchesProperty': true, 'merge': true, 'multiply': true, + 'overArgs': true, 'partial': true, 'partialRight': true, 'random': true, diff --git a/lodash.js b/lodash.js index 54ddc96771..e812be46b5 100644 --- a/lodash.js +++ b/lodash.js @@ -4607,7 +4607,7 @@ */ function createOver(arrayFunc) { return rest(function(iteratees) { - iteratees = arrayMap(baseFlatten(iteratees, 1), getIteratee()); + iteratees = arrayMap(iteratees, getIteratee()); return rest(function(args) { var thisArg = this; return arrayFunc(iteratees, function(iteratee) { @@ -9548,7 +9548,7 @@ * @memberOf _ * @category Function * @param {Function} func The function to wrap. - * @param {...(Function|Function[])} [transforms] The functions to transform + * @param {...Function} [transforms] The functions to transform * arguments, specified individually or in arrays. * @returns {Function} Returns the new function. * @example @@ -9572,7 +9572,7 @@ * // => [100, 10] */ var overArgs = rest(function(func, transforms) { - transforms = arrayMap(baseFlatten(transforms, 1), getIteratee()); + transforms = arrayMap(transforms, getIteratee()); var funcsLength = transforms.length; return rest(function(args) { @@ -14644,7 +14644,7 @@ * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Function|Function[])} iteratees The iteratees to invoke. + * @param {...Function} iteratees The iteratees to invoke. * @returns {Function} Returns the new function. * @example * @@ -14663,7 +14663,7 @@ * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Function|Function[])} predicates The predicates to check. + * @param {...Function} predicates The predicates to check. * @returns {Function} Returns the new function. * @example * @@ -14688,7 +14688,7 @@ * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Function|Function[])} predicates The predicates to check. + * @param {...Function} predicates The predicates to check. * @returns {Function} Returns the new function. * @example * diff --git a/test/test.js b/test/test.js index 32901c175a..63ad2ce549 100644 --- a/test/test.js +++ b/test/test.js @@ -15564,13 +15564,6 @@ assert.deepEqual(over(5, 10), [10, 100]); }); - QUnit.test('should flatten `transforms`', function(assert) { - assert.expect(1); - - var over = _.overArgs(fn, [doubled, square], String); - assert.deepEqual(over(5, 10, 15), [10, 100, '15']); - }); - QUnit.test('should not transform any argument greater than the number of transforms', function(assert) { assert.expect(1); @@ -16097,13 +16090,6 @@ assert.strictEqual(over(object), false); }); - QUnit.test('should flatten `predicates`', function(assert) { - assert.expect(1); - - var over = _.overEvery(alwaysTrue, [alwaysFalse]); - assert.strictEqual(over(), false); - }); - QUnit.test('should provide arguments to predicates', function(assert) { assert.expect(1); @@ -16199,13 +16185,6 @@ assert.strictEqual(over(object), false); }); - QUnit.test('should flatten `predicates`', function(assert) { - assert.expect(1); - - var over = _.overSome(alwaysFalse, [alwaysTrue]); - assert.strictEqual(over(), true); - }); - QUnit.test('should provide arguments to predicates', function(assert) { assert.expect(1); From 669bc1520e038be537c62f1cd77d67f7c6d92ccc Mon Sep 17 00:00:00 2001 From: Craig Martin Date: Fri, 1 Apr 2016 16:29:59 -0400 Subject: [PATCH 14/42] Run scripts synchronous in foreground. --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f15c260df8..88d22857b3 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "webpack": "^1.12.14" }, "scripts": { - "build": "npm run build:main & npm run build:fp & wait", + "build": "npm run build:main && npm run build:fp", "build:fp": "node lib/fp/build-dist.js", "build:fp-modules": "node lib/fp/build-modules.js", "build:main": "node lib/main/build-dist.js", @@ -39,7 +39,7 @@ "doc:fp": "node lib/fp/build-doc", "doc:site": "node lib/main/build-doc site", "pretest": "npm run build", - "style": "npm run style:main & npm run style:fp & npm run style:perf & npm run style:test & wait", + "style": "npm run style:main && npm run style:fp && npm run style:perf && npm run style:test", "style:fp": "jscs fp/*.js lib/**/*.js", "style:main": "jscs lodash.js", "style:perf": "jscs perf/*.js perf/**/*.js", @@ -47,6 +47,6 @@ "test": "npm run test:main && npm run test:fp", "test:fp": "node test/test-fp", "test:main": "node test/test", - "validate": "npm run style & npm run test & wait" + "validate": "npm run style && npm run test" } } From e22be612e221bbbe9a928ddee582140506843a21 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Apr 2016 17:18:29 -0700 Subject: [PATCH 15/42] Remove `dataViewCtorString` branch of `getTag` for coverage tests. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 368c004d45..f70795f7d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,7 @@ before_install: PATTERN[1]="|\s*if\s*\(enumerate\b[\s\S]+?\};\s*\}|" PATTERN[2]="|\s*while\s*\([^)]+\)\s*\{\s*iteratee\(index\);\s*\}|" PATTERN[3]="|\s*else\s*\{\s*assocSet\(data\b[\s\S]+?\}|" - PATTERN[4]="|\bcase\s+(?:set|map|weakMap)CtorString:.+|g" + PATTERN[4]="|\bcase\s+(?:dataView|set|map|weakMap)CtorString:.+|g" PATTERN[5]="|\bindex,\s*iterable\)\s*===\s*false\)[^}]+?(break;)|" PATTERN[6]="|\s*if\s*\(\!lodashFunc\)\s*\{\s*return;\s*\}|" PATTERN[7]="|\s*define\([\s\S]+?\);|" From c21174f7f9586063ed67c9f58cad0bcd9bac5d43 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Apr 2016 17:19:16 -0700 Subject: [PATCH 16/42] Add bizarro test for `_.isEmpty`. --- test/test.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/test.js b/test/test.js index 63ad2ce549..107a8e75f8 100644 --- a/test/test.js +++ b/test/test.js @@ -786,7 +786,7 @@ }); QUnit.test('should avoid non-native built-ins', function(assert) { - assert.expect(6); + assert.expect(7); function message(lodashMethod, nativeMethod) { return '`' + lodashMethod + '` should avoid overwritten native `' + nativeMethod + '`'; @@ -810,6 +810,14 @@ var label = message('_.keysIn', 'Object#propertyIsEnumerable'); assert.deepEqual(actual, ['a', 'b'], label); + try { + var actual = lodashBizarro.isEmpty({}); + } catch (e) { + actual = null; + } + var label = message('_.isEmpty', 'Object#propertyIsEnumerable'); + assert.strictEqual(actual, true, label); + try { actual = [ lodashBizarro.difference([object, otherObject], largeArray), @@ -875,7 +883,7 @@ assert.deepEqual(actual, [], label); } else { - skipAssert(assert, 6); + skipAssert(assert, 7); } }); }()); From 930b034da5aa138cc9c83066bd28c14eca760899 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Apr 2016 17:20:32 -0700 Subject: [PATCH 17/42] Make `_.repeat` default `n` to `1` instead of `0`. --- lodash.js | 12 +++++++++--- test/test.js | 40 +++++++++++++++++++++++++++++++--------- 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/lodash.js b/lodash.js index e812be46b5..2dc0bf6ae3 100644 --- a/lodash.js +++ b/lodash.js @@ -13398,7 +13398,8 @@ * @since 3.0.0 * @category String * @param {string} [string=''] The string to repeat. - * @param {number} [n=0] The number of times to repeat the string. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {string} Returns the repeated string. * @example * @@ -13411,8 +13412,13 @@ * _.repeat('abc', 0); * // => '' */ - function repeat(string, n) { - return baseRepeat(toString(string), toInteger(n)); + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); } /** diff --git a/test/test.js b/test/test.js index 107a8e75f8..fc893a1714 100644 --- a/test/test.js +++ b/test/test.js @@ -18298,35 +18298,57 @@ QUnit.module('lodash.repeat'); (function() { + var string = 'abc'; + QUnit.test('should repeat a string `n` times', function(assert) { assert.expect(2); assert.strictEqual(_.repeat('*', 3), '***'); - assert.strictEqual(_.repeat('abc', 2), 'abcabc'); + assert.strictEqual(_.repeat(string, 2), 'abcabc'); + }); + + QUnit.test('should treat falsey `n` values, except `undefined`, as `0`', function(assert) { + assert.expect(1); + + var expected = lodashStable.map(falsey, function(value) { + return value === undefined ? string : ''; + }); + + var actual = lodashStable.map(falsey, function(n, index) { + return index ? _.repeat(string, n) : _.repeat(string); + }); + + assert.deepEqual(actual, expected); }); - QUnit.test('should return an empty string for negative `n` or `n` of `0`', function(assert) { + QUnit.test('should return an empty string if `n` is <= `0`', function(assert) { assert.expect(2); - assert.strictEqual(_.repeat('abc', 0), ''); - assert.strictEqual(_.repeat('abc', -2), ''); + assert.strictEqual(_.repeat(string, 0), ''); + assert.strictEqual(_.repeat(string, -2), ''); }); QUnit.test('should coerce `n` to an integer', function(assert) { - assert.expect(4); + assert.expect(3); - assert.strictEqual(_.repeat('abc'), ''); - assert.strictEqual(_.repeat('abc', '2'), 'abcabc'); - assert.strictEqual(_.repeat('abc', 2.6), 'abcabc'); + assert.strictEqual(_.repeat(string, '2'), 'abcabc'); + assert.strictEqual(_.repeat(string, 2.6), 'abcabc'); assert.strictEqual(_.repeat('*', { 'valueOf': alwaysThree }), '***'); }); QUnit.test('should coerce `string` to a string', function(assert) { assert.expect(2); - assert.strictEqual(_.repeat(Object('abc'), 2), 'abcabc'); + assert.strictEqual(_.repeat(Object(string), 2), 'abcabc'); assert.strictEqual(_.repeat({ 'toString': lodashStable.constant('*') }, 3), '***'); }); + + QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) { + assert.expect(1); + + var actual = lodashStable.map(['a', 'b', 'c'], _.repeat); + assert.deepEqual(actual, ['a', 'b', 'c']); + }); }()); /*--------------------------------------------------------------------------*/ From f599c4817aa9e799be9ef681092511c4186ced4a Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Apr 2016 17:21:16 -0700 Subject: [PATCH 18/42] Make `_.chunk` default `size` to `1` instead of `0`. --- lodash.js | 12 ++++++++---- test/test.js | 27 ++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/lodash.js b/lodash.js index 2dc0bf6ae3..bada755deb 100644 --- a/lodash.js +++ b/lodash.js @@ -5769,7 +5769,8 @@ * @since 3.0.0 * @category Array * @param {Array} array The array to process. - * @param {number} [size=0] The length of each chunk. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Array} Returns the new array containing chunks. * @example * @@ -5779,9 +5780,12 @@ * _.chunk(['a', 'b', 'c', 'd'], 3); * // => [['a', 'b', 'c'], ['d']] */ - function chunk(array, size) { - size = nativeMax(toInteger(size), 0); - + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } var length = array ? array.length : 0; if (!length || size < 1) { return []; diff --git a/test/test.js b/test/test.js index fc893a1714..6b7866f87d 100644 --- a/test/test.js +++ b/test/test.js @@ -2385,14 +2385,28 @@ assert.deepEqual(actual, [[0, 1, 2, 3], [4, 5]]); }); + QUnit.test('should treat falsey `size` values, except `undefined`, as `0`', function(assert) { + assert.expect(1); + + var expected = lodashStable.map(falsey, function(value) { + return value === undefined ? [[0], [1], [2], [3], [4], [5]] : []; + }); + + var actual = lodashStable.map(falsey, function(size, index) { + return index ? _.chunk(array, size) : _.chunk(array); + }); + + assert.deepEqual(actual, expected); + }); + QUnit.test('should ensure the minimum `size` is `0`', function(assert) { assert.expect(1); - var values = falsey.concat(-1, -Infinity), + var values = lodashStable.reject(falsey, lodashStable.isUndefined).concat(-1, -Infinity), expected = lodashStable.map(values, alwaysEmptyArray); - var actual = lodashStable.map(values, function(value, index) { - return index ? _.chunk(array, value) : _.chunk(array); + var actual = lodashStable.map(values, function(n) { + return _.chunk(array, n); }); assert.deepEqual(actual, expected); @@ -2403,6 +2417,13 @@ assert.deepEqual(_.chunk(array, array.length / 4), [[0], [1], [2], [3], [4], [5]]); }); + + QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) { + assert.expect(1); + + var actual = lodashStable.map([[1, 2], [3, 4]], _.chunk); + assert.deepEqual(actual, [[[1], [2]], [[3], [4]]]); + }); }()); /*--------------------------------------------------------------------------*/ From 58f93567fc923798ddbb449b9909f2e354a77323 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Apr 2016 18:03:53 -0700 Subject: [PATCH 19/42] Make `_.sampleSize` default `n` to `1` instead of `0`. --- lodash.js | 11 ++++++++--- test/test.js | 22 +++++++++++++++------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/lodash.js b/lodash.js index bada755deb..b13c80e42a 100644 --- a/lodash.js +++ b/lodash.js @@ -8705,7 +8705,8 @@ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to sample. - * @param {number} [n=0] The number of elements to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Array} Returns the random elements. * @example * @@ -8715,13 +8716,17 @@ * _.sampleSize([1, 2, 3], 4); * // => [2, 3, 1] */ - function sampleSize(collection, n) { + function sampleSize(collection, n, guard) { var index = -1, result = toArray(collection), length = result.length, lastIndex = length - 1; - n = baseClamp(toInteger(n), 0, length); + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = baseClamp(toInteger(n), 0, length); + } while (++index < n) { var rand = baseRandom(index, lastIndex), value = result[rand]; diff --git a/test/test.js b/test/test.js index 6b7866f87d..662d4bf965 100644 --- a/test/test.js +++ b/test/test.js @@ -18982,13 +18982,15 @@ assert.deepEqual(actual, array); }); - QUnit.test('should treat falsey `n` values as `0`', function(assert) { + QUnit.test('should treat falsey `size` values, except `undefined`, as `0`', function(assert) { assert.expect(1); - var expected = lodashStable.map(falsey, alwaysEmptyArray); + var expected = lodashStable.map(falsey, function(value) { + return value === undefined ? ['a'] : []; + }); - var actual = lodashStable.map(falsey, function(n, index) { - return index ? _.sampleSize([1], n) : _.sampleSize([1]); + var actual = lodashStable.map(falsey, function(size, index) { + return index ? _.sampleSize(['a'], size) : _.sampleSize(['a']); }); assert.deepEqual(actual, expected); @@ -19041,6 +19043,13 @@ assert.strictEqual(actual.length, 2); assert.deepEqual(lodashStable.difference(actual, lodashStable.values(object)), []); }); + + QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) { + assert.expect(1); + + var actual = lodashStable.map([['a']], _.sampleSize); + assert.deepEqual(actual, [['a']]); + }); }()); /*--------------------------------------------------------------------------*/ @@ -25377,7 +25386,6 @@ 'rangeRight', 'reject', 'remove', - 'sampleSize', 'shuffle', 'sortBy', 'tail', @@ -25397,7 +25405,7 @@ var acceptFalsey = lodashStable.difference(allMethods, rejectFalsey); QUnit.test('should accept falsey arguments', function(assert) { - assert.expect(308); + assert.expect(307); var emptyArrays = lodashStable.map(falsey, alwaysEmptyArray); @@ -25435,7 +25443,7 @@ }); QUnit.test('should return an array', function(assert) { - assert.expect(72); + assert.expect(70); var array = [1, 2, 3]; From 64652c263fd8866bedab2e08e264b237135922c5 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Apr 2016 17:21:50 -0700 Subject: [PATCH 20/42] Update `_.map` doc note on guarded methods. [ci skip] --- lodash.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lodash.js b/lodash.js index b13c80e42a..857d9233a2 100644 --- a/lodash.js +++ b/lodash.js @@ -8439,10 +8439,10 @@ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. * * The guarded methods are: - * `ary`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, `fill`, - * `invert`, `parseInt`, `random`, `range`, `rangeRight`, `slice`, `some`, - * `sortBy`, `take`, `takeRight`, `template`, `trim`, `trimEnd`, `trimStart`, - * and `words` + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `take`, `takeRight`, `template`, + * `trim`, `trimEnd`, `trimStart`, and `words` * * @static * @memberOf _ From ebf9904e8ad0293511776dc026f068acdebbcebc Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Apr 2016 17:22:11 -0700 Subject: [PATCH 21/42] Add `toSource` helper. --- lodash.js | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/lodash.js b/lodash.js index 857d9233a2..f54138d677 100644 --- a/lodash.js +++ b/lodash.js @@ -1449,11 +1449,11 @@ var realNames = {}; /** Used to detect maps, sets, and weakmaps. */ - var dataViewCtorString = DataView ? (DataView + '') : '', - mapCtorString = Map ? funcToString.call(Map) : '', - promiseCtorString = Promise ? funcToString.call(Promise) : '', - setCtorString = Set ? funcToString.call(Set) : '', - weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : ''; + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, @@ -5290,7 +5290,7 @@ getTag = function(value) { var result = objectToString.call(value), Ctor = result == objectTag ? value.constructor : null, - ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : ''; + ctorString = toSource(Ctor); if (ctorString) { switch (ctorString) { @@ -5739,6 +5739,22 @@ return result; }); + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (isFunction(func)) { + try { + return funcToString.call(func); + } catch (e) {} + } + return toString(func); + } + /** * Creates a clone of `wrapper`. * @@ -10842,13 +10858,10 @@ if (value == null) { return false; } - if (isFunction(value)) { - try { - return reIsNative.test(funcToString.call(value)); - } catch (e) {} + if (isObjectLike(value)) { + return (isHostObject(value) ? reIsNative : reIsHostCtor).test(value); } - return isObjectLike(value) && - (isHostObject(value) ? reIsNative : reIsHostCtor).test(value); + return reIsNative.test(toSource(value)); } /** From 972624297b234e0b032bfb5e3435ea6271f9f791 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Apr 2016 18:13:39 -0700 Subject: [PATCH 22/42] Add variation to falsey `_.slice` test. --- test/test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test.js b/test/test.js index 662d4bf965..395f6711fa 100644 --- a/test/test.js +++ b/test/test.js @@ -19513,8 +19513,8 @@ return value === undefined ? array : []; }); - var actual = lodashStable.map(falsey, function(end) { - return _.slice(array, 0, end); + var actual = lodashStable.map(falsey, function(end, index) { + return index ? _.slice(array, 0, end) : _.slice(array, 0); }); assert.deepEqual(actual, expected); From 4c8836a24ae7b6189810a0a2561ef2a78a6749ea Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Apr 2016 19:06:36 -0700 Subject: [PATCH 23/42] Cleanup `_.isNative`. --- lodash.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lodash.js b/lodash.js index f54138d677..33755f15f7 100644 --- a/lodash.js +++ b/lodash.js @@ -10855,13 +10855,11 @@ * // => false */ function isNative(value) { - if (value == null) { + if (!isObject(value)) { return false; } - if (isObjectLike(value)) { - return (isHostObject(value) ? reIsNative : reIsHostCtor).test(value); - } - return reIsNative.test(toSource(value)); + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); } /** From c4a78445b3e1f24c8a9bdc79c529793a68e6d9f8 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Apr 2016 19:17:52 -0700 Subject: [PATCH 24/42] Add `_.isNative` test for `Promise`. --- test/test.js | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/test/test.js b/test/test.js index 395f6711fa..328be4460e 100644 --- a/test/test.js +++ b/test/test.js @@ -10661,23 +10661,13 @@ var args = arguments; QUnit.test('should return `true` for native methods', function(assert) { - assert.expect(6); + assert.expect(1); - lodashStable.each([Array, create, root.encodeURI, slice, Uint8Array], function(func) { - if (func) { - assert.strictEqual(_.isNative(func), true); - } - else { - skipAssert(assert); - } - }); + var values = [Array, body && body.cloneNode, create, root.encodeURI, Promise, slice, Uint8Array], + expected = lodashStable.map(values, Boolean), + actual = lodashStable.map(values, _.isNative); - if (body) { - assert.strictEqual(_.isNative(body.cloneNode), true); - } - else { - skipAssert(assert); - } + assert.deepEqual(actual, expected); }); QUnit.test('should return `false` for non-native methods', function(assert) { From c267c4e06bb0d3ac9b89bf57d8c5b9d06f5d3906 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Apr 2016 20:56:19 -0700 Subject: [PATCH 25/42] Excuse Underscore `_.chunk` test. --- test/underscore.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/underscore.html b/test/underscore.html index cf3f4221e2..a3e56e8190 100644 --- a/test/underscore.html +++ b/test/underscore.html @@ -29,6 +29,9 @@ QUnit.config.hidepassed = true; QUnit.config.excused = { 'Arrays': { + 'chunk': [ + 'defaults to empty array (chunk size 0)' + ], 'difference': [ 'can perform an OO-style difference' ], From cfd25cec7563b72a75c57489eb77f054e7501c51 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 2 Apr 2016 08:01:35 -0700 Subject: [PATCH 26/42] Minor Lodash letter case nit in readme. [ci skip] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 61b4ed5f5c..4b8e396867 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # lodash v4.7.0 -The [lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module. +The [Lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module. Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli): ```bash From 579cf00d10ef67b5c56fa725ed949b90779da67f Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 2 Apr 2016 08:02:36 -0700 Subject: [PATCH 27/42] Update `_.isNaN` doc note with a reference to `Number.isNaN`. [ci skip] --- lodash.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lodash.js b/lodash.js index 33755f15f7..365ed0bf0d 100644 --- a/lodash.js +++ b/lodash.js @@ -10805,9 +10805,10 @@ /** * Checks if `value` is `NaN`. * - * **Note:** This method is not the same as - * [`isNaN`](https://es5.github.io/#x15.1.2.4) which returns `true` for - * `undefined` and other non-numeric values. + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. * * @static * @memberOf _ From 2b585258166c597884ea3a94118a3c5377d5b53b Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 2 Apr 2016 10:33:13 -0700 Subject: [PATCH 28/42] Update many es5 spec links to es6. [ci skip] --- lodash.js | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/lodash.js b/lodash.js index 365ed0bf0d..77f59d3c5f 100644 --- a/lodash.js +++ b/lodash.js @@ -118,7 +118,10 @@ reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g; - /** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */ + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source); @@ -130,7 +133,10 @@ /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; - /** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */ + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). + */ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; /** Used to match `RegExp` flags from their coerced string values. */ @@ -1390,7 +1396,8 @@ var objectCtorString = funcToString.call(Object); /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -4385,8 +4392,8 @@ */ function createCtorWrapper(Ctor) { return function() { - // Use a `switch` statement to work with class constructors. - // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { @@ -4985,7 +4992,8 @@ case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See https://es5.github.io/#x15.10.6.4 for more details. + // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring + // for more details. return object == (other + ''); case mapTag: @@ -9770,7 +9778,7 @@ /** * Creates a function that invokes `func` with the `this` binding of the * create function and an array of arguments much like - * [`Function#apply`](https://es5.github.io/#x15.3.4.3). + * [`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply). * * **Note:** This method is based on the * [spread operator](https://mdn.io/spread_operator). @@ -10659,8 +10667,9 @@ } /** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ From 012bff97e0aca3ecd22053de9b16ce2d5d8e8e03 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 2 Apr 2016 10:57:29 -0700 Subject: [PATCH 29/42] Add fp/placeholder module. --- fp/_baseConvert.js | 2 +- fp/placeholder.js | 6 ++++++ lib/fp/build-modules.js | 3 +-- lib/fp/template/modules/module.jst | 7 +++++-- 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 fp/placeholder.js diff --git a/fp/_baseConvert.js b/fp/_baseConvert.js index eea400d521..a9236f5184 100644 --- a/fp/_baseConvert.js +++ b/fp/_baseConvert.js @@ -1,6 +1,6 @@ var mapping = require('./_mapping'), mutateMap = mapping.mutate, - fallbackHolder = {}; + fallbackHolder = require('./placeholder'); /** * The base implementation of `convert` which accepts a `util` object of methods diff --git a/fp/placeholder.js b/fp/placeholder.js new file mode 100644 index 0000000000..1ce17393b9 --- /dev/null +++ b/fp/placeholder.js @@ -0,0 +1,6 @@ +/** + * The default argument placeholder value for methods. + * + * @type {Object} + */ +module.exports = {}; diff --git a/lib/fp/build-modules.js b/lib/fp/build-modules.js index 1704c13596..39894dd9ab 100644 --- a/lib/fp/build-modules.js +++ b/lib/fp/build-modules.js @@ -97,8 +97,7 @@ function build(target) { _.each([mapping.aliasToReal, mapping.remap], function(data) { _.forOwn(data, function(realName, alias) { var modulePath = path.join(target, alias + '.js'); - if (!_.startsWith(alias, '_') && - !_.includes(modulePaths, modulePath)) { + if (!_.includes(modulePaths, modulePath)) { modulePaths.push(modulePath); } }); diff --git a/lib/fp/template/modules/module.jst b/lib/fp/template/modules/module.jst index a1ff9f6620..289bd2b63c 100644 --- a/lib/fp/template/modules/module.jst +++ b/lib/fp/template/modules/module.jst @@ -1,2 +1,5 @@ -var convert = require('./convert'); -module.exports = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>')); +var convert = require('./convert'), + func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>')); + +func.placeholder = require('./placeholder'); +module.exports = func; From 0f75d967d02a97423cd193467d3a7673908c4156 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 2 Apr 2016 10:59:48 -0700 Subject: [PATCH 30/42] Add `convert` method to modules that pass thru. --- lib/fp/template/modules/thru.jst | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/fp/template/modules/thru.jst b/lib/fp/template/modules/thru.jst index de0b105e75..2fd000f832 100644 --- a/lib/fp/template/modules/thru.jst +++ b/lib/fp/template/modules/thru.jst @@ -1 +1,12 @@ -module.exports = require('../<%= name %>'); +var convert = require('./convert'); + +var func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'), { + 'cap': false, + 'curry': false, + 'fixed': false, + 'immutable': false, + 'rearg': false +}); + +func.placeholder = require('./placeholder'); +module.exports = func; From 68617340109ec448d9c28fa943eb7ef6f917a760 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 2 Apr 2016 14:34:48 -0700 Subject: [PATCH 31/42] Add `matchesStrictComparable` helper. --- lodash.js | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/lodash.js b/lodash.js index 77f59d3c5f..5716dfc8b4 100644 --- a/lodash.js +++ b/lodash.js @@ -3196,16 +3196,7 @@ function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { - var key = matchData[0][0], - value = matchData[0][1]; - - return function(object) { - if (object == null) { - return false; - } - return object[key] === value && - (value !== undefined || (key in Object(object))); - }; + return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || baseIsMatch(object, source, matchData); @@ -3221,6 +3212,9 @@ * @returns {Function} Returns the new function. */ function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(path, srcValue); + } return function(object) { var objValue = get(object, path); return (objValue === undefined && objValue === srcValue) @@ -5573,6 +5567,25 @@ return value === value && !isObject(value); } + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new function. + */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } + /** * Merges the function metadata of `source` into `data`. * From 69ce7cde7d68c5211649c8d19dc883402fe42b41 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 2 Apr 2016 22:49:17 -0700 Subject: [PATCH 32/42] Convert methods not found in `aryMethod` mapping. --- fp/_baseConvert.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/fp/_baseConvert.js b/fp/_baseConvert.js index a9236f5184..22d8416648 100644 --- a/fp/_baseConvert.js +++ b/fp/_baseConvert.js @@ -310,7 +310,7 @@ function baseConvert(util, name, func, options) { } var _ = func; - // Iterate over methods for the current ary cap. + // Convert methods by ary cap. var pairs = []; each(aryMethodKeys, function(aryKey) { each(mapping.aryMethod[aryKey], function(key) { @@ -321,6 +321,19 @@ function baseConvert(util, name, func, options) { }); }); + // Convert remaining methods. + each(keys(_), function(key) { + if (typeof _[key] == 'function') { + var length = pairs.length; + while (length--) { + if (pairs[length][0] == key) { + return; + } + } + pairs.push([key, wrap(key, _[key])]); + } + }); + // Assign to `_` leaving `_.prototype` unchanged to allow chaining. each(pairs, function(pair) { _[pair[0]] = pair[1]; @@ -330,7 +343,7 @@ function baseConvert(util, name, func, options) { if (setPlaceholder) { _.placeholder = placeholder; } - // Reassign aliases. + // Assign aliases. each(keys(_), function(key) { each(mapping.realToAlias[key] || [], function(alias) { _[alias] = _[key]; From 75d196b01bd0c1d4797f7386f7047ae28851186f Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 3 Apr 2016 10:14:19 -0700 Subject: [PATCH 33/42] Allow `convert` to work on methods that aren't converted by default. --- fp/_baseConvert.js | 47 ++++++++++++++++++++++++++-------------------- fp/_mapping.js | 19 +++++++++++++++---- 2 files changed, 42 insertions(+), 24 deletions(-) diff --git a/fp/_baseConvert.js b/fp/_baseConvert.js index 22d8416648..3f5c91cb0f 100644 --- a/fp/_baseConvert.js +++ b/fp/_baseConvert.js @@ -40,7 +40,9 @@ function baseConvert(util, name, func, options) { 'rearg': 'rearg' in options ? options.rearg : true }; - var forceRearg = ('rearg' in options) && options.rearg, + var forceCurry = ('curry' in options) && options.curry, + forceFixed = ('fixed' in options) && options.fixed, + forceRearg = ('rearg' in options) && options.rearg, placeholder = isLib ? func : fallbackHolder, pristine = isLib ? func.runInContext() : undefined; @@ -116,7 +118,7 @@ function baseConvert(util, name, func, options) { }; var convertLib = function(options) { - return _.runInContext.convert(options)(); + return _.runInContext.convert(options)(undefined); }; var createCloner = function(func) { @@ -125,6 +127,17 @@ function baseConvert(util, name, func, options) { }; }; + var createConverter = function(name, func) { + var oldOptions = options; + return function(options) { + var newUtil = isLib ? pristine : helpers, + newFunc = isLib ? pristine[name] : func, + newOptions = assign(assign({}, oldOptions), options); + + return baseConvert(newUtil, name, newFunc, newOptions); + }; + }; + var immutWrap = function(func, cloner) { return function() { var length = arguments.length; @@ -232,23 +245,15 @@ function baseConvert(util, name, func, options) { var wrap = function(name, func) { name = mapping.aliasToReal[name] || name; - var wrapper = wrappers[name]; - var convertMethod = function(options) { - var newUtil = isLib ? pristine : helpers, - newFunc = isLib ? pristine[name] : func, - newOptions = assign(assign({}, config), options); - - return baseConvert(newUtil, name, newFunc, newOptions); - }; + var result, + wrapped = func, + wrapper = wrappers[name]; if (wrapper) { - var result = wrapper(func); - result.convert = convertMethod; - return result; + wrapped = wrapper(func); } - var wrapped = func; - if (config.immutable) { + else if (config.immutable) { if (mutateMap.array[name]) { wrapped = immutWrap(func, cloneArray); } @@ -267,7 +272,7 @@ function baseConvert(util, name, func, options) { spreadStart = mapping.methodSpread[name]; result = wrapped; - if (config.fixed) { + if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { result = spreadStart === undefined ? ary(result, aryKey) : spread(result, spreadStart); @@ -282,7 +287,8 @@ function baseConvert(util, name, func, options) { result = iterateeAry(result, aryN); } } - if (config.curry && aryKey > 1) { + if (forceCurry || (config.curry && aryKey > 1)) { + forceCurry && console.log(forceCurry, name); result = curry(result, aryKey); } return false; @@ -293,11 +299,11 @@ function baseConvert(util, name, func, options) { result || (result = wrapped); if (result == func) { - result = function() { + result = forceCurry ? curry(result, 1) : function() { return func.apply(this, arguments); }; } - result.convert = convertMethod; + result.convert = createConverter(name, func); if (mapping.placeholder[name]) { setPlaceholder = true; result.placeholder = func.placeholder = placeholder; @@ -330,7 +336,8 @@ function baseConvert(util, name, func, options) { return; } } - pairs.push([key, wrap(key, _[key])]); + _[key].convert = createConverter(key, _[key]); + pairs.push([key, _[key]]); } }); diff --git a/fp/_mapping.js b/fp/_mapping.js index 920ac986bd..e897d751d8 100644 --- a/fp/_mapping.js +++ b/fp/_mapping.js @@ -52,9 +52,10 @@ exports.aliasToReal = { exports.aryMethod = { '1': [ 'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor', - 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'methodOf', 'mixin', - 'over', 'overEvery', 'overSome', 'rest', 'reverse', 'round', 'runInContext', - 'spread', 'template', 'trim', 'trimEnd', 'trimStart', 'uniqueId', 'words' + 'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', + 'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse', + 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', + 'uniqueId', 'words' ], '2': [ 'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll', @@ -248,7 +249,17 @@ exports.remap = { 'trimCharsStart': 'trimStart' }; -/** Used to track methods that skip `_.rearg`. */ +/** Used to track methods that skip fixing their arity. */ +exports.skipFixed = { + 'castArray': true, + 'flow': true, + 'flowRight': true, + 'iteratee': true, + 'mixin': true, + 'runInContext': true +}; + +/** Used to track methods that skip rearranging arguments. */ exports.skipRearg = { 'add': true, 'assign': true, From a5990a4c4ebc990a8c3cf91b21c052094f4f5d5b Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 3 Apr 2016 19:47:13 -0700 Subject: [PATCH 34/42] Use `thru` instead of `through` in docs. [ci skip] --- lodash.js | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/lodash.js b/lodash.js index 5716dfc8b4..397d4acd4d 100644 --- a/lodash.js +++ b/lodash.js @@ -8004,9 +8004,9 @@ /** * Creates an object composed of keys generated from the results of running - * each element of `collection` through `iteratee`. The corresponding value - * of each key is the number of times the key was returned by `iteratee`. - * The iteratee is invoked with one argument: (value). + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). * * @static * @memberOf _ @@ -8188,8 +8188,8 @@ /** * Creates a flattened array of values by running each element in `collection` - * through `iteratee` and flattening the mapped results. The iteratee is - * invoked with three arguments: (value, index|key, collection). + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). * * @static * @memberOf _ @@ -8326,9 +8326,9 @@ /** * Creates an object composed of keys generated from the results of running - * each element of `collection` through `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 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 _ @@ -8436,8 +8436,8 @@ /** * Creates an object composed of keys generated from the results of running - * each element of `collection` through `iteratee`. The corresponding value - * of each key is the last element responsible for generating the key. The + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The * iteratee is invoked with one argument: (value). * * @static @@ -8468,7 +8468,7 @@ }); /** - * Creates an array of values by running each element in `collection` through + * Creates an array of values by running each element in `collection` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, index|key, collection). * @@ -8601,7 +8601,7 @@ /** * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` through `iteratee`, where each successive + * 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 * value. The iteratee is invoked with four arguments: @@ -8879,7 +8879,7 @@ /** * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection through each iteratee. This method + * running each element in a collection thru each iteratee. This method * performs a stable sort, that is, it preserves the original sort order of * equal elements. The iteratees are invoked with one argument: (value). * @@ -12144,8 +12144,8 @@ /** * This method is like `_.invert` except that the inverted object is generated - * from the results of running each element of `object` through `iteratee`. - * The corresponding inverted value of each inverted key is an array of keys + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys * responsible for generating the inverted value. The iteratee is invoked * with one argument: (value). * @@ -12291,8 +12291,8 @@ /** * The opposite of `_.mapValues`; this method creates an object with the * same values as `object` and keys generated by running each own enumerable - * string keyed property of `object` through `iteratee`. The iteratee is - * invoked with three arguments: (value, key, object). + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). * * @static * @memberOf _ @@ -12320,8 +12320,8 @@ } /** - * Creates an object with the same keys as `object` and values generated by - * running each own enumerable string keyed property of `object` through + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, key, object). * @@ -12703,11 +12703,11 @@ /** * An alternative to `_.reduce`; this method transforms `object` to a new - * `accumulator` object which is the result of running each of its own enumerable - * string keyed properties through `iteratee`, with each invocation potentially - * mutating the `accumulator` object. The iteratee is invoked with four arguments: - * (accumulator, value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. The iteratee is invoked + * with four arguments: (accumulator, value, key, object). Iteratee functions + * may exit iteration early by explicitly returning `false`. * * @static * @memberOf _ From c01e0cd7d116f6dfea65a14dba05cebcbf6b430e Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 3 Apr 2016 19:57:13 -0700 Subject: [PATCH 35/42] Simplify references to partial or provided arguments. [ci skip] --- lodash.js | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/lodash.js b/lodash.js index 397d4acd4d..354edbcef6 100644 --- a/lodash.js +++ b/lodash.js @@ -4641,9 +4641,8 @@ } /** - * Creates a function that wraps `func` to invoke it with the optional `this` - * binding of `thisArg` and the `partials` prepended to those provided to - * the wrapper. + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. * * @private * @param {Function} func The function to wrap. @@ -5154,7 +5153,7 @@ /** * 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 + * `baseIteratee`. If arguments are provided, the chosen function is invoked * with them and its result is returned. * * @private @@ -8985,8 +8984,8 @@ } /** - * Creates a function that accepts up to `n` arguments, ignoring any - * additional arguments. + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. * * @static * @memberOf _ @@ -9043,8 +9042,7 @@ /** * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and prepends any additional `_.bind` arguments to those provided to the - * bound function. + * and `partials` prepended to the arguments it receives. * * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. @@ -9087,8 +9085,8 @@ }); /** - * Creates a function that invokes the method at `object[key]` and prepends - * any additional `_.bindKey` arguments to those provided to the bound function. + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. * * This method differs from `_.bind` by allowing bound functions to reference * methods that may be redefined or don't yet exist. See @@ -9633,9 +9631,9 @@ }); /** - * Creates a function that invokes `func` with `partial` arguments prepended - * to those provided to the new function. This method is like `_.bind` except - * it does **not** alter the `this` binding. + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. * * The `_.partial.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. @@ -9672,7 +9670,7 @@ /** * This method is like `_.partial` except that partially applied arguments - * are appended to those provided to the new function. + * are appended to the arguments it receives. * * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. @@ -14686,8 +14684,8 @@ } /** - * Creates a function that invokes `iteratees` with the arguments provided - * to the created function and returns their results. + * Creates a function that invokes `iteratees` with the arguments it receives + * and returns their results. * * @static * @memberOf _ @@ -14706,7 +14704,7 @@ /** * Creates a function that checks if **all** of the `predicates` return - * truthy when invoked with the arguments provided to the created function. + * truthy when invoked with the arguments it receives. * * @static * @memberOf _ @@ -14731,7 +14729,7 @@ /** * Creates a function that checks if **any** of the `predicates` return - * truthy when invoked with the arguments provided to the created function. + * truthy when invoked with the arguments it receives. * * @static * @memberOf _ From 7165ef6f5ede431fd8602105b23af48126eddb84 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 3 Apr 2016 19:57:32 -0700 Subject: [PATCH 36/42] Minor doc tweak to `_.rearg`. [ci skip] --- lodash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lodash.js b/lodash.js index 354edbcef6..99bcd60ae8 100644 --- a/lodash.js +++ b/lodash.js @@ -9707,7 +9707,7 @@ /** * Creates a function that invokes `func` with arguments arranged according - * to the specified indexes where the argument value at the first index is + * to the specified `indexes` where the argument value at the first index is * provided as the first argument, the argument value at the second index is * provided as the second argument, and so on. * From a71ac53fa725e5ce5f9c1e6e733da190d0fec623 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 3 Apr 2016 21:37:41 -0700 Subject: [PATCH 37/42] Add jsdoc comments to fp/_baseConvert. [ci skip] --- fp/_baseConvert.js | 336 ++++++++++++++++++---------- fp/_convertBrowser.js | 5 +- lib/fp/template/modules/convert.jst | 3 +- 3 files changed, 226 insertions(+), 118 deletions(-) diff --git a/fp/_baseConvert.js b/fp/_baseConvert.js index 3f5c91cb0f..e7e631ce4b 100644 --- a/fp/_baseConvert.js +++ b/fp/_baseConvert.js @@ -2,13 +2,98 @@ var mapping = require('./_mapping'), mutateMap = mapping.mutate, fallbackHolder = require('./placeholder'); +/** + * Creates a function, with an arity of `n`, that invokes `func` with the + * arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} n The arity of the new function. + * @returns {Function} Returns the new function. + */ +function baseArity(func, n) { + return n == 2 + ? function(a, b) { return func.apply(undefined, arguments); } + : function(a) { return func.apply(undefined, arguments); }; +} + +/** + * Creates a function that invokes `func`, with up to `n` arguments, ignoring + * any additional arguments. + * + * @private + * @param {Function} func The function to cap arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ +function baseAry(func, n) { + return n == 2 + ? function(a, b) { return func(a, b); } + : function(a) { return func(a); }; +} + +/** + * Creates a clone of `array`. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the cloned array. + */ +function cloneArray(array) { + var length = array ? array.length : 0, + result = Array(length); + + while (length--) { + result[length] = array[length]; + } + return result; +} + +/** + * Creates a function that clones a given object using the assignment `func`. + * + * @private + * @param {Function} func The assignment function. + * @returns {Function} Returns the new cloner function. + */ +function createCloner(func) { + return function(object) { + return func({}, object); + }; +} + +/** + * Creates a function that wraps `func` and uses `cloner` to clone the first + * argument it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} cloner The function to clone arguments. + * @returns {Function} Returns the new immutable function. + */ +function immutWrap(func, cloner) { + return function() { + var length = arguments.length; + if (!length) { + return result; + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var result = args[0] = cloner.apply(undefined, args); + func.apply(undefined, args); + return result; + }; +} + /** * The base implementation of `convert` which accepts a `util` object of methods * required to perform conversions. * * @param {Object} util The util object. - * @param {string} name The name of the function to wrap. - * @param {Function} func The function to wrap. + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. * @param {Object} [options] The options object. * @param {boolean} [options.cap=true] Specify capping iteratee arguments. * @param {boolean} [options.curry=true] Specify currying. @@ -75,114 +160,6 @@ function baseConvert(util, name, func, options) { var aryMethodKeys = keys(mapping.aryMethod); - var baseArity = function(func, n) { - return n == 2 - ? function(a, b) { return func.apply(undefined, arguments); } - : function(a) { return func.apply(undefined, arguments); }; - }; - - var baseAry = function(func, n) { - return n == 2 - ? function(a, b) { return func(a, b); } - : function(a) { return func(a); }; - }; - - var cloneArray = function(array) { - var length = array ? array.length : 0, - result = Array(length); - - while (length--) { - result[length] = array[length]; - } - return result; - }; - - var cloneByPath = function(object, path) { - path = toPath(path); - - var index = -1, - length = path.length, - result = clone(Object(object)), - nested = result; - - while (nested != null && ++index < length) { - var key = path[index], - value = nested[key]; - - if (value != null) { - nested[key] = clone(Object(value)); - } - nested = nested[key]; - } - return result; - }; - - var convertLib = function(options) { - return _.runInContext.convert(options)(undefined); - }; - - var createCloner = function(func) { - return function(object) { - return func({}, object); - }; - }; - - var createConverter = function(name, func) { - var oldOptions = options; - return function(options) { - var newUtil = isLib ? pristine : helpers, - newFunc = isLib ? pristine[name] : func, - newOptions = assign(assign({}, oldOptions), options); - - return baseConvert(newUtil, name, newFunc, newOptions); - }; - }; - - var immutWrap = function(func, cloner) { - return function() { - var length = arguments.length; - if (!length) { - return result; - } - var args = Array(length); - while (length--) { - args[length] = arguments[length]; - } - var result = args[0] = cloner.apply(undefined, args); - func.apply(undefined, args); - return result; - }; - }; - - var iterateeAry = function(func, n) { - return overArg(func, function(func) { - return typeof func == 'function' ? baseAry(func, n) : func; - }); - }; - - var iterateeRearg = function(func, indexes) { - return overArg(func, function(func) { - var n = indexes.length; - return baseArity(rearg(baseAry(func, n), indexes), n); - }); - }; - - var overArg = function(func, iteratee, retArg) { - return function() { - var length = arguments.length; - if (!length) { - return func(); - } - var args = Array(length); - while (length--) { - args[length] = arguments[length]; - } - var index = config.rearg ? 0 : (length - 1); - args[index] = iteratee(args[index]); - return func.apply(undefined, args); - }; - }; - var wrappers = { 'castArray': function(castArray) { return function() { @@ -243,7 +220,133 @@ function baseConvert(util, name, func, options) { } }; - var wrap = function(name, func) { + /*--------------------------------------------------------------------------*/ + + /** + * Creates a clone of `object` by `path`. + * + * @private + * @param {Object} object The object to clone. + * @param {Array|string} path The path to clone by. + * @returns {Object} Returns the cloned object. + */ + function cloneByPath(object, path) { + path = toPath(path); + + var index = -1, + length = path.length, + result = clone(Object(object)), + nested = result; + + while (nested != null && ++index < length) { + var key = path[index], + value = nested[key]; + + if (value != null) { + nested[key] = clone(Object(value)); + } + nested = nested[key]; + } + return result; + } + + /** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function} Returns the converted `lodash`. + */ + function convertLib(options) { + return _.runInContext.convert(options)(undefined); + } + + /** + * Create a converter function for `func` of `name`. + * + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @returns {Function} Returns the new converter function. + */ + function createConverter(name, func) { + var oldOptions = options; + return function(options) { + var newUtil = isLib ? pristine : helpers, + newFunc = isLib ? pristine[name] : func, + newOptions = assign(assign({}, oldOptions), options); + + return baseConvert(newUtil, name, newFunc, newOptions); + }; + } + + /** + * Creates a function that wraps `func` to invoke its iteratee, with up to `n` + * arguments, ignoring any additional arguments. + * + * @private + * @param {Function} func The function to cap iteratee arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ + function iterateeAry(func, n) { + return overArg(func, function(func) { + return typeof func == 'function' ? baseAry(func, n) : func; + }); + } + + /** + * Creates a function that wraps `func` to invoke its iteratee with arguments + * arranged according to the specified `indexes` where the argument value at + * the first index is provided as the first argument, the argument value at + * the second index is provided as the second argument, and so on. + * + * @private + * @param {Function} func The function to rearrange iteratee arguments for. + * @param {number[]} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + */ + function iterateeRearg(func, indexes) { + return overArg(func, function(func) { + var n = indexes.length; + return baseArity(rearg(baseAry(func, n), indexes), n); + }); + } + + /** + * Creates a function that invokes `func` with its first argument passed + * thru `transform`. + * + * @private + * @param {Function} func The function to wrap. + * @param {...Function} transform The functions to transform the first argument. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function() { + var length = arguments.length; + if (!length) { + return func(); + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var index = config.rearg ? 0 : (length - 1); + args[index] = transform(args[index]); + return func.apply(undefined, args); + }; + } + + /** + * Creates a function that wraps `func` and applys the conversions + * rules by `name`. + * + * @private + * @param {string} name The name of the function to wrap. + * @param {Function} func The function to wrap. + * @returns {Function} Returns the converted function. + */ + function wrap(name, func) { name = mapping.aliasToReal[name] || name; var result, @@ -309,7 +412,9 @@ function baseConvert(util, name, func, options) { result.placeholder = func.placeholder = placeholder; } return result; - }; + } + + /*--------------------------------------------------------------------------*/ if (!isObj) { return wrap(name, func); @@ -329,15 +434,16 @@ function baseConvert(util, name, func, options) { // Convert remaining methods. each(keys(_), function(key) { - if (typeof _[key] == 'function') { + var func = _[key]; + if (typeof func == 'function') { var length = pairs.length; while (length--) { if (pairs[length][0] == key) { return; } } - _[key].convert = createConverter(key, _[key]); - pairs.push([key, _[key]]); + func.convert = createConverter(key, func); + pairs.push([key, func]); } }); diff --git a/fp/_convertBrowser.js b/fp/_convertBrowser.js index fbd217485b..1874a5423c 100644 --- a/fp/_convertBrowser.js +++ b/fp/_convertBrowser.js @@ -1,9 +1,10 @@ var baseConvert = require('./_baseConvert'); /** - * Converts `lodash` to an immutable auto-curried iteratee-first data-last version. + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. * - * @param {Function} lodash The lodash function. + * @param {Function} lodash The lodash function to convert. * @param {Object} [options] The options object. See `baseConvert` for more details. * @returns {Function} Returns the converted `lodash`. */ diff --git a/lib/fp/template/modules/convert.jst b/lib/fp/template/modules/convert.jst index a1d266fa64..4795dc4246 100644 --- a/lib/fp/template/modules/convert.jst +++ b/lib/fp/template/modules/convert.jst @@ -3,7 +3,8 @@ var baseConvert = require('./_baseConvert'), /** * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last - * version. If `name` is an object its methods will be converted. + * version with conversion `options` applied. If `name` is an object its methods + * will be converted. * * @param {string} name The name of the function to wrap. * @param {Function} [func] The function to wrap. From c797f83ca5f27a458424e7d606d8db53b6b25d21 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 3 Apr 2016 21:53:37 -0700 Subject: [PATCH 38/42] Add fp `convert` test for unconverted methods. --- test/test-fp.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/test-fp.js b/test/test-fp.js index d79d97f393..d119d3021b 100644 --- a/test/test-fp.js +++ b/test/test-fp.js @@ -288,6 +288,22 @@ /*--------------------------------------------------------------------------*/ + QUnit.module('method.convert'); + + (function() { + QUnit.test('should exist on unconverted methods', function(assert) { + assert.expect(2); + + var array = [], + isArray = fp.isArray.convert({ 'curry': true }); + + assert.strictEqual(fp.isArray(array), true); + assert.strictEqual(isArray()(array), true); + }); + }()); + + /*--------------------------------------------------------------------------*/ + QUnit.module('convert methods'); _.each(['fp.convert', 'method.convert'], function(methodName) { From 804ad3d805033fa89ce5defa3667aaa713719bfe Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 3 Apr 2016 22:40:55 -0700 Subject: [PATCH 39/42] Move private key higher. [ci skip] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 88d22857b3..650aac64f3 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "name": "lodash", "version": "4.7.1-pre", "license": "MIT", - "main": "lodash.js", "private": true, + "main": "lodash.js", "devDependencies": { "async": "^1.5.2", "benchmark": "^2.1.0", From 2293de07a7b6c0de969606e42a5c98b6e4efb196 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 3 Apr 2016 23:47:07 -0700 Subject: [PATCH 40/42] Add `_falseOptions` module. --- lib/fp/build-modules.js | 3 ++- lib/fp/template/modules/_falseOptions.jst | 7 +++++++ lib/fp/template/modules/thru.jst | 11 ++--------- 3 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 lib/fp/template/modules/_falseOptions.jst diff --git a/lib/fp/build-modules.js b/lib/fp/build-modules.js index 39894dd9ab..5479c9a1ca 100644 --- a/lib/fp/build-modules.js +++ b/lib/fp/build-modules.js @@ -109,9 +109,10 @@ function build(target) { }); 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.push(util.writeFile(path.join(fpPath, '_util.js'), template._util())); async.series(actions, onComplete); } diff --git a/lib/fp/template/modules/_falseOptions.jst b/lib/fp/template/modules/_falseOptions.jst new file mode 100644 index 0000000000..8789f50ab9 --- /dev/null +++ b/lib/fp/template/modules/_falseOptions.jst @@ -0,0 +1,7 @@ +module.exports = { + 'cap': false, + 'curry': false, + 'fixed': false, + 'immutable': false, + 'rearg': false +}); diff --git a/lib/fp/template/modules/thru.jst b/lib/fp/template/modules/thru.jst index 2fd000f832..5bc1a7b03f 100644 --- a/lib/fp/template/modules/thru.jst +++ b/lib/fp/template/modules/thru.jst @@ -1,12 +1,5 @@ -var convert = require('./convert'); - -var func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'), { - 'cap': false, - 'curry': false, - 'fixed': false, - 'immutable': false, - 'rearg': false -}); +var convert = require('./convert'), + func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func; From 1ef96896d5b51770b1eff4619ee26e77353d6d6f Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 3 Apr 2016 22:10:16 -0700 Subject: [PATCH 41/42] Rebuild lodash and docs. --- dist/lodash.core.js | 48 +-- dist/lodash.core.min.js | 4 +- dist/lodash.fp.js | 403 +++++++++++++++------- dist/lodash.fp.min.js | 26 +- dist/lodash.js | 293 +++++++++------- dist/lodash.min.js | 215 ++++++------ dist/mapping.fp.js | 24 +- doc/README.md | 743 ++++++++++++++++++++-------------------- lodash.js | 4 +- package.json | 2 +- 10 files changed, 991 insertions(+), 771 deletions(-) diff --git a/dist/lodash.core.js b/dist/lodash.core.js index 91cb9cb863..631d5e0386 100644 --- a/dist/lodash.core.js +++ b/dist/lodash.core.js @@ -1,6 +1,6 @@ /** * @license - * lodash 4.7.0 (Custom Build) + * lodash 4.8.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.7.0'; + var VERSION = '4.8.0'; /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; @@ -357,7 +357,8 @@ var idCounter = 0; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -1140,8 +1141,8 @@ */ function createCtorWrapper(Ctor) { return function() { - // Use a `switch` statement to work with class constructors. - // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; var thisBinding = baseCreate(Ctor.prototype), @@ -1154,9 +1155,8 @@ } /** - * Creates a function that wraps `func` to invoke it with the optional `this` - * binding of `thisArg` and the `partials` prepended to those provided to - * the wrapper. + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. * * @private * @param {Function} func The function to wrap. @@ -1290,7 +1290,8 @@ case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See https://es5.github.io/#x15.10.6.4 for more details. + // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring + // for more details. return object == (other + ''); } @@ -1905,7 +1906,7 @@ } /** - * Creates an array of values by running each element in `collection` through + * Creates an array of values by running each element in `collection` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, index|key, collection). * @@ -1913,10 +1914,10 @@ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. * * The guarded methods are: - * `ary`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, `fill`, - * `invert`, `parseInt`, `random`, `range`, `rangeRight`, `slice`, `some`, - * `sortBy`, `take`, `takeRight`, `template`, `trim`, `trimEnd`, `trimStart`, - * and `words` + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `take`, `takeRight`, `template`, + * `trim`, `trimEnd`, `trimStart`, and `words` * * @static * @memberOf _ @@ -1953,7 +1954,7 @@ /** * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` through `iteratee`, where each successive + * 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 * value. The iteratee is invoked with four arguments: @@ -2064,7 +2065,7 @@ /** * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection through each iteratee. This method + * running each element in a collection thru each iteratee. This method * performs a stable sort, that is, it preserves the original sort order of * equal elements. The iteratees are invoked with one argument: (value). * @@ -2146,8 +2147,7 @@ /** * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and prepends any additional `_.bind` arguments to those provided to the - * bound function. + * and `partials` prepended to the arguments it receives. * * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. @@ -2790,8 +2790,9 @@ } /** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ @@ -2849,9 +2850,10 @@ /** * Checks if `value` is `NaN`. * - * **Note:** This method is not the same as - * [`isNaN`](https://es5.github.io/#x15.1.2.4) which returns `true` for - * `undefined` and other non-numeric values. + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. * * @static * @memberOf _ diff --git a/dist/lodash.core.min.js b/dist/lodash.core.min.js index 11cdcffdca..26ce62b65a 100644 --- a/dist/lodash.core.min.js +++ b/dist/lodash.core.min.js @@ -1,6 +1,6 @@ /** * @license - * lodash 4.7.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * lodash 4.8.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;++ee&&!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) { + if (forceCurry || (config.curry && aryKey > 1)) { + forceCurry && console.log(forceCurry, name); result = curry(result, aryKey); } return false; @@ -372,24 +482,26 @@ return /******/ (function(modules) { // webpackBootstrap result || (result = wrapped); if (result == func) { - result = function() { + result = forceCurry ? curry(result, 1) : function() { return func.apply(this, arguments); }; } - result.convert = convertMethod; + result.convert = createConverter(name, func); if (mapping.placeholder[name]) { setPlaceholder = true; result.placeholder = func.placeholder = placeholder; } return result; - }; + } + + /*--------------------------------------------------------------------------*/ if (!isObj) { return wrap(name, func); } var _ = func; - // Iterate over methods for the current ary cap. + // Convert methods by ary cap. var pairs = []; each(aryMethodKeys, function(aryKey) { each(mapping.aryMethod[aryKey], function(key) { @@ -400,6 +512,21 @@ return /******/ (function(modules) { // webpackBootstrap }); }); + // Convert remaining methods. + each(keys(_), function(key) { + var func = _[key]; + if (typeof func == 'function') { + var length = pairs.length; + while (length--) { + if (pairs[length][0] == key) { + return; + } + } + func.convert = createConverter(key, func); + pairs.push([key, func]); + } + }); + // Assign to `_` leaving `_.prototype` unchanged to allow chaining. each(pairs, function(pair) { _[pair[0]] = pair[1]; @@ -409,7 +536,7 @@ return /******/ (function(modules) { // webpackBootstrap if (setPlaceholder) { _.placeholder = placeholder; } - // Reassign aliases. + // Assign aliases. each(keys(_), function(key) { each(mapping.realToAlias[key] || [], function(alias) { _[alias] = _[key]; @@ -480,9 +607,10 @@ return /******/ (function(modules) { // webpackBootstrap exports.aryMethod = { '1': [ 'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor', - 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'methodOf', 'mixin', - 'over', 'overEvery', 'overSome', 'rest', 'reverse', 'round', 'runInContext', - 'spread', 'template', 'trim', 'trimEnd', 'trimStart', 'uniqueId', 'words' + 'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', + 'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse', + 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', + 'uniqueId', 'words' ], '2': [ 'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll', @@ -592,6 +720,10 @@ return /******/ (function(modules) { // webpackBootstrap exports.methodSpread = { 'invokeArgs': 2, 'invokeArgsMap': 2, + 'over': 0, + 'overArgs': 1, + 'overEvery': 0, + 'overSome': 0, 'partial': 1, 'partialRight': 1, 'without': 1 @@ -672,7 +804,17 @@ return /******/ (function(modules) { // webpackBootstrap 'trimCharsStart': 'trimStart' }; - /** Used to track methods that skip `_.rearg`. */ + /** Used to track methods that skip fixing their arity. */ + exports.skipFixed = { + 'castArray': true, + 'flow': true, + 'flowRight': true, + 'iteratee': true, + 'mixin': true, + 'runInContext': true + }; + + /** Used to track methods that skip rearranging arguments. */ exports.skipRearg = { 'add': true, 'assign': true, @@ -691,6 +833,7 @@ return /******/ (function(modules) { // webpackBootstrap 'matchesProperty': true, 'merge': true, 'multiply': true, + 'overArgs': true, 'partial': true, 'partialRight': true, 'random': true, @@ -703,6 +846,18 @@ return /******/ (function(modules) { // webpackBootstrap }; +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + /** + * The default argument placeholder value for methods. + * + * @type {Object} + */ + module.exports = {}; + + /***/ } /******/ ]) }); diff --git a/dist/lodash.fp.min.js b/dist/lodash.fp.min.js index d017bb6053..d452a03cdd 100644 --- a/dist/lodash.fp.min.js +++ b/dist/lodash.fp.min.js @@ -1,15 +1,17 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fp=e():t.fp=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var a=r[n]={exports:{},id:n,loaded:!1};return t[n].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function n(t,e){return a(t,t,e)}var a=r(1);"function"==typeof _&&(_=n(_.runInContext())), -t.exports=n},function(t,e,r){function n(t,e,r,s){var u,p="function"==typeof e,l=e===Object(e);if(l&&(s=r,r=e,e=void 0),null==r)throw new TypeError;s||(s={});var c={cap:"cap"in s?s.cap:!0,curry:"curry"in s?s.curry:!0,fixed:"fixed"in s?s.fixed:!0,immutable:"immutable"in s?s.immutable:!0,rearg:"rearg"in s?s.rearg:!0},d="rearg"in s&&s.rearg,h=p?r:o,f=p?r.runInContext():void 0,y=p?r:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isFunction:t.isFunction,iteratee:t.iteratee, -keys:t.keys,rearg:t.rearg,spread:t.spread,toPath:t.toPath},g=y.ary,m=y.assign,v=y.clone,W=y.curry,x=y.forEach,R=y.isArray,I=y.isFunction,b=y.keys,A=y.rearg,O=y.spread,E=y.toPath,k=b(a.aryMethod),B=function(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}},j=function(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}},C=function(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r},M=function(t,e){e=E(e);for(var r=-1,n=e.length,a=v(Object(t)),i=a;null!=i&&++r2?r-2:1,a&&r>=a?n:j(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!I(r))return t(r,Object(e)); -var n=[],a=[];return x(b(e),function(t){var i=e[t];I(i)&&(a.push(t),n.push(r.prototype[t]))}),t(r,Object(e)),x(a,function(t,e){var a=n[e];I(a)?r.prototype[t]=a:delete r.prototype[t]}),r}},runInContext:function(e){return function(r){return n(t,e(r),s)}}},D=function(t,e){t=a.aliasToReal[t]||t;var r=L[t],o=function(r){var a=p?f:y,i=p?f[t]:e,o=m(m({},c),r);return n(a,t,i,o)};if(r){var s=r(e);return s.convert=o,s}var l=e;return c.immutable&&(i.array[t]?l=P(e,C):i.object[t]?l=P(e,q(e)):i.set[t]&&(l=P(e,M))), -x(k,function(e){return x(a.aryMethod[e],function(r){if(t==r){var n=!p&&a.iterateeAry[t],i=a.iterateeRearg[t],o=a.methodSpread[t];return s=l,c.fixed&&(s=void 0===o?g(s,e):O(s,o)),c.rearg&&e>1&&(d||!a.skipRearg[t])&&(s=A(s,a.methodRearg[t]||a.aryRearg[e])),c.cap&&(i?s=z(s,i):n&&(s=S(s,n))),c.curry&&e>1&&(s=W(s,e)),!1}}),!s}),s||(s=l),s==e&&(s=function(){return e.apply(this,arguments)}),s.convert=o,a.placeholder[t]&&(u=!0,s.placeholder=e.placeholder=h),s};if(!l)return D(e,r);var F=r,T=[];return x(k,function(t){ -x(a.aryMethod[t],function(t){var e=F[a.remap[t]||t];e&&T.push([t,D(t,e)])})}),x(T,function(t){F[t[0]]=t[1]}),F.convert=w,u&&(F.placeholder=h),x(b(F),function(t){x(a.realToAlias[t]||[],function(e){F[e]=F[t]})}),F}var a=r(2),i=a.mutate,o={};t.exports=n},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendWith:"assignInWith",first:"head",__:"placeholder",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome", -apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",equals:"isEqual",identical:"eq",init:"initial",invertObj:"invert",juxt:"over",mapObj:"mapValues",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",pickAll:"pick",pipe:"flow",prop:"get",propOf:"propertyOf",propOr:"getOr",unapply:"rest",unnest:"flatten",useWith:"overArgs",whereEq:"filter",zipObj:"zipObject"},e.aryMethod={1:["attempt","castArray","ceil","create","curry","curryRight","floor","fromPairs","invert","iteratee","memoize","method","methodOf","mixin","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words"], +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fp=e():t.fp=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function n(t,e){return i(t,t,e)}var i=r(1);"function"==typeof _&&(_=n(_.runInContext())), +t.exports=n},function(t,e,r){function n(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}function i(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}}function a(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r}function o(t){return function(e){return t({},e)}}function s(t,e){return function(){var r=arguments.length;if(!r)return i;for(var n=Array(r);r--;)n[r]=arguments[r];var i=n[0]=e.apply(void 0,n);return t.apply(void 0,n), +i}}function u(t,e,r,d){function f(t,e){e=F(e);for(var r=-1,n=e.length,i=M(Object(t)),a=i;null!=a&&++r1&&(k||!p.skipRearg[t])&&(r=L(r,p.methodRearg[t]||p.aryRearg[e])), +I.cap&&(o?r=m(r,o):a&&(r=g(r,a))),(b||I.curry&&e>1)&&(b&&console.log(b,t),r=q(r,e)),!1}}),!r}),r||(r=n),r==e&&(r=b?q(r,1):function(){return e.apply(this,arguments)}),r.convert=y(t,e),p.placeholder[t]&&(W=!0,r.placeholder=e.placeholder=E),r}var W,R="function"==typeof e,A=e===Object(e);if(A&&(d=r,r=e,e=void 0),null==r)throw new TypeError;d||(d={});var I={cap:"cap"in d?d.cap:!0,curry:"curry"in d?d.curry:!0,fixed:"fixed"in d?d.fixed:!0,immutable:"immutable"in d?d.immutable:!0,rearg:"rearg"in d?d.rearg:!0 +},b="curry"in d&&d.curry,O="fixed"in d&&d.fixed,k="rearg"in d&&d.rearg,E=R?r:c,B=R?r.runInContext():void 0,j=R?r:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isFunction:t.isFunction,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,spread:t.spread,toPath:t.toPath},C=j.ary,w=j.assign,M=j.clone,q=j.curry,S=j.forEach,P=j.isArray,z=j.isFunction,K=j.keys,L=j.rearg,D=j.spread,F=j.toPath,T=K(p.aryMethod),_={castArray:function(t){return function(){var e=arguments[0]; +return P(e)?t(a(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],r=arguments[1],n=t(e,r),a=n.length;return I.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&r>=a?n:i(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!z(r))return t(r,Object(e));var n=[],i=[];return S(K(e),function(t){var a=e[t];z(a)&&(i.push(t),n.push(r.prototype[t]))}),t(r,Object(e)),S(i,function(t,e){var i=n[e];z(i)?r.prototype[t]=i:delete r.prototype[t]}),r}},runInContext:function(e){ +return function(r){return u(t,e(r),d)}}};if(!A)return x(e,r);var N=r,V=[];return S(T,function(t){S(p.aryMethod[t],function(t){var e=N[p.remap[t]||t];e&&V.push([t,x(t,e)])})}),S(K(N),function(t){var e=N[t];if("function"==typeof e){for(var r=V.length;r--;)if(V[r][0]==t)return;e.convert=y(t,e),V.push([t,e])}}),S(V,function(t){N[t[0]]=t[1]}),N.convert=h,W&&(N.placeholder=E),S(K(N),function(t){S(p.realToAlias[t]||[],function(e){N[e]=N[t]})}),N}var p=r(2),l=p.mutate,c=r(3);t.exports=u},function(t,e){e.aliasToReal={ +each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendWith:"assignInWith",first:"head",__:"placeholder",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",equals:"isEqual",identical:"eq",init:"initial",invertObj:"invert",juxt:"over",mapObj:"mapValues",omitAll:"omit",nAry:"ary",path:"get", +pathEq:"matchesProperty",pathOr:"getOr",pickAll:"pick",pipe:"flow",prop:"get",propOf:"propertyOf",propOr:"getOr",unapply:"rest",unnest:"flatten",useWith:"overArgs",whereEq:"filter",zipObj:"zipObject"},e.aryMethod={1:["attempt","castArray","ceil","create","curry","curryRight","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","methodOf","mixin","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words"], 2:["add","after","ary","assign","assignIn","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","minBy","multiply","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"], 3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","getOr","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1], 4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findIndex:1,findKey:1,findLast:1,findLastIndex:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1]},e.methodRearg={assignInWith:[1,2,0],assignWith:[1,2,0],getOr:[2,1,0],isEqualWith:[1,2,0], -isMatchWith:[2,1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],updateWith:[3,1,2,0],zipWith:[1,2,0]},e.methodSpread={invokeArgs:2,invokeArgsMap:2,partial:1,partialRight:1,without:1},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignIn:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsDeep:!0, -merge:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={};for(var a in r){var i=r[a];t.call(n,i)?n[i].push(a):n[i]=[a]}return n}(),e.remap={curryN:"curry",curryRightN:"curryRight",getOr:"get",invokeArgs:"invoke",invokeArgsMap:"invokeMap",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",restFrom:"rest", -spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart"},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,partial:!0,partialRight:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,without:!0,zip:!0,zipObject:!0}}])}); \ No newline at end of file +isMatchWith:[2,1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],updateWith:[3,1,2,0],zipWith:[1,2,0]},e.methodSpread={invokeArgs:2,invokeArgsMap:2,over:0,overArgs:1,overEvery:0,overSome:0,partial:1,partialRight:1,without:1},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignIn:!0,assignInWith:!0, +assignWith:!0,defaults:!0,defaultsDeep:!0,merge:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={};for(var i in r){var a=r[i];t.call(n,a)?n[a].push(i):n[a]=[i]}return n}(),e.remap={curryN:"curry",curryRightN:"curryRight",getOr:"get",invokeArgs:"invoke",invokeArgsMap:"invokeMap",padChars:"pad",padCharsEnd:"padEnd", +padCharsStart:"padStart",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,without:!0,zip:!0,zipObject:!0 +}},function(t,e){t.exports={}}])}); \ No newline at end of file diff --git a/dist/lodash.js b/dist/lodash.js index 6387c6ba2e..dcd255f02c 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -1,6 +1,6 @@ /** * @license - * lodash 4.7.0 (Custom Build) + * lodash 4.8.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.7.0'; + var VERSION = '4.8.0'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -119,7 +119,10 @@ reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g; - /** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */ + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source); @@ -131,7 +134,10 @@ /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; - /** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */ + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). + */ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; /** Used to match `RegExp` flags from their coerced string values. */ @@ -410,7 +416,7 @@ * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. - * @param {...*} args The arguments to invoke `func` with. + * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { @@ -1391,7 +1397,8 @@ var objectCtorString = funcToString.call(Object); /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -1450,11 +1457,11 @@ var realNames = {}; /** Used to detect maps, sets, and weakmaps. */ - var dataViewCtorString = DataView ? (DataView + '') : '', - mapCtorString = Map ? funcToString.call(Map) : '', - promiseCtorString = Promise ? funcToString.call(Promise) : '', - setCtorString = Set ? funcToString.call(Set) : '', - weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : ''; + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, @@ -3190,16 +3197,7 @@ function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { - var key = matchData[0][0], - value = matchData[0][1]; - - return function(object) { - if (object == null) { - return false; - } - return object[key] === value && - (value !== undefined || (key in Object(object))); - }; + return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || baseIsMatch(object, source, matchData); @@ -3215,6 +3213,9 @@ * @returns {Function} Returns the new function. */ function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(path, srcValue); + } return function(object) { var objValue = get(object, path); return (objValue === undefined && objValue === srcValue) @@ -4386,8 +4387,8 @@ */ function createCtorWrapper(Ctor) { return function() { - // Use a `switch` statement to work with class constructors. - // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { @@ -4608,7 +4609,7 @@ */ function createOver(arrayFunc) { return rest(function(iteratees) { - iteratees = arrayMap(baseFlatten(iteratees, 1), getIteratee()); + iteratees = arrayMap(iteratees, getIteratee()); return rest(function(args) { var thisArg = this; return arrayFunc(iteratees, function(iteratee) { @@ -4641,9 +4642,8 @@ } /** - * Creates a function that wraps `func` to invoke it with the optional `this` - * binding of `thisArg` and the `partials` prepended to those provided to - * the wrapper. + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. * * @private * @param {Function} func The function to wrap. @@ -4986,7 +4986,8 @@ case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See https://es5.github.io/#x15.10.6.4 for more details. + // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring + // for more details. return object == (other + ''); case mapTag: @@ -5153,7 +5154,7 @@ /** * 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 + * `baseIteratee`. If arguments are provided, the chosen function is invoked * with them and its result is returned. * * @private @@ -5291,7 +5292,7 @@ getTag = function(value) { var result = objectToString.call(value), Ctor = result == objectTag ? value.constructor : null, - ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : ''; + ctorString = toSource(Ctor); if (ctorString) { switch (ctorString) { @@ -5344,29 +5345,25 @@ * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { - if (object == null) { - return false; - } - var result = hasFunc(object, path); - if (!result && !isKey(path)) { - path = baseCastPath(path); + path = isKey(path, object) ? [path] : baseCastPath(path); - var index = -1, - length = path.length; + var result, + index = -1, + length = path.length; - while (object != null && ++index < length) { - var key = path[index]; - if (!(result = hasFunc(object, key))) { - break; - } - object = object[key]; + while (++index < length) { + var key = path[index]; + if (!(result = object != null && hasFunc(object, key))) { + break; } + object = object[key]; } - var length = object ? object.length : undefined; - return result || ( - !!length && isLength(length) && isIndex(path, length) && - (isArray(object) || isString(object) || isArguments(object)) - ); + if (result) { + return result; + } + var length = object ? object.length : 0; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isString(object) || isArguments(object)); } /** @@ -5570,6 +5567,25 @@ return value === value && !isObject(value); } + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new function. + */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } + /** * Merges the function metadata of `source` into `data`. * @@ -5744,6 +5760,22 @@ return result; }); + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (isFunction(func)) { + try { + return funcToString.call(func); + } catch (e) {} + } + return toString(func); + } + /** * Creates a clone of `wrapper`. * @@ -5774,7 +5806,8 @@ * @since 3.0.0 * @category Array * @param {Array} array The array to process. - * @param {number} [size=0] The length of each chunk. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Array} Returns the new array containing chunks. * @example * @@ -5784,9 +5817,12 @@ * _.chunk(['a', 'b', 'c', 'd'], 3); * // => [['a', 'b', 'c'], ['d']] */ - function chunk(array, size) { - size = nativeMax(toInteger(size), 0); - + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } var length = array ? array.length : 0; if (!length || size < 1) { return []; @@ -7968,9 +8004,9 @@ /** * Creates an object composed of keys generated from the results of running - * each element of `collection` through `iteratee`. The corresponding value - * of each key is the number of times the key was returned by `iteratee`. - * The iteratee is invoked with one argument: (value). + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). * * @static * @memberOf _ @@ -8152,8 +8188,8 @@ /** * Creates a flattened array of values by running each element in `collection` - * through `iteratee` and flattening the mapped results. The iteratee is - * invoked with three arguments: (value, index|key, collection). + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). * * @static * @memberOf _ @@ -8290,9 +8326,9 @@ /** * Creates an object composed of keys generated from the results of running - * each element of `collection` through `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 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 _ @@ -8400,8 +8436,8 @@ /** * Creates an object composed of keys generated from the results of running - * each element of `collection` through `iteratee`. The corresponding value - * of each key is the last element responsible for generating the key. The + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The * iteratee is invoked with one argument: (value). * * @static @@ -8432,7 +8468,7 @@ }); /** - * Creates an array of values by running each element in `collection` through + * Creates an array of values by running each element in `collection` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, index|key, collection). * @@ -8440,10 +8476,10 @@ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. * * The guarded methods are: - * `ary`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, `fill`, - * `invert`, `parseInt`, `random`, `range`, `rangeRight`, `slice`, `some`, - * `sortBy`, `take`, `takeRight`, `template`, `trim`, `trimEnd`, `trimStart`, - * and `words` + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `take`, `takeRight`, `template`, + * `trim`, `trimEnd`, `trimStart`, and `words` * * @static * @memberOf _ @@ -8565,7 +8601,7 @@ /** * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` through `iteratee`, where each successive + * 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 * value. The iteratee is invoked with four arguments: @@ -8706,7 +8742,8 @@ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to sample. - * @param {number} [n=0] The number of elements to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Array} Returns the random elements. * @example * @@ -8716,13 +8753,17 @@ * _.sampleSize([1, 2, 3], 4); * // => [2, 3, 1] */ - function sampleSize(collection, n) { + function sampleSize(collection, n, guard) { var index = -1, result = toArray(collection), length = result.length, lastIndex = length - 1; - n = baseClamp(toInteger(n), 0, length); + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = baseClamp(toInteger(n), 0, length); + } while (++index < n) { var rand = baseRandom(index, lastIndex), value = result[rand]; @@ -8838,7 +8879,7 @@ /** * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection through each iteratee. This method + * running each element in a collection thru each iteratee. This method * performs a stable sort, that is, it preserves the original sort order of * equal elements. The iteratees are invoked with one argument: (value). * @@ -8944,8 +8985,8 @@ } /** - * Creates a function that accepts up to `n` arguments, ignoring any - * additional arguments. + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. * * @static * @memberOf _ @@ -9002,8 +9043,7 @@ /** * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and prepends any additional `_.bind` arguments to those provided to the - * bound function. + * and `partials` prepended to the arguments it receives. * * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. @@ -9046,8 +9086,8 @@ }); /** - * Creates a function that invokes the method at `object[key]` and prepends - * any additional `_.bindKey` arguments to those provided to the bound function. + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. * * This method differs from `_.bind` by allowing bound functions to reference * methods that may be redefined or don't yet exist. See @@ -9553,7 +9593,7 @@ * @memberOf _ * @category Function * @param {Function} func The function to wrap. - * @param {...(Function|Function[])} [transforms] The functions to transform + * @param {...Function} [transforms] The functions to transform * arguments, specified individually or in arrays. * @returns {Function} Returns the new function. * @example @@ -9577,7 +9617,7 @@ * // => [100, 10] */ var overArgs = rest(function(func, transforms) { - transforms = arrayMap(baseFlatten(transforms, 1), getIteratee()); + transforms = arrayMap(transforms, getIteratee()); var funcsLength = transforms.length; return rest(function(args) { @@ -9592,9 +9632,9 @@ }); /** - * Creates a function that invokes `func` with `partial` arguments prepended - * to those provided to the new function. This method is like `_.bind` except - * it does **not** alter the `this` binding. + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. * * The `_.partial.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. @@ -9631,7 +9671,7 @@ /** * This method is like `_.partial` except that partially applied arguments - * are appended to those provided to the new function. + * are appended to the arguments it receives. * * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. @@ -9668,7 +9708,7 @@ /** * Creates a function that invokes `func` with arguments arranged according - * to the specified indexes where the argument value at the first index is + * to the specified `indexes` where the argument value at the first index is * provided as the first argument, the argument value at the second index is * provided as the second argument, and so on. * @@ -9750,7 +9790,7 @@ /** * Creates a function that invokes `func` with the `this` binding of the * create function and an array of arguments much like - * [`Function#apply`](https://es5.github.io/#x15.3.4.3). + * [`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply). * * **Note:** This method is based on the * [spread operator](https://mdn.io/spread_operator). @@ -10639,8 +10679,9 @@ } /** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ @@ -10785,9 +10826,10 @@ /** * Checks if `value` is `NaN`. * - * **Note:** This method is not the same as - * [`isNaN`](https://es5.github.io/#x15.1.2.4) which returns `true` for - * `undefined` and other non-numeric values. + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. * * @static * @memberOf _ @@ -10835,14 +10877,11 @@ * // => false */ function isNative(value) { - if (value == null) { + if (!isObject(value)) { return false; } - if (isFunction(value)) { - return reIsNative.test(funcToString.call(value)); - } - return isObjectLike(value) && - (isHostObject(value) ? reIsNative : reIsHostCtor).test(value); + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); } /** @@ -11371,7 +11410,7 @@ value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { - return value === 0 ? value : +value; + return value === 0 ? value : +value; } value = value.replace(reTrim, ''); var isBinary = reIsBinary.test(value); @@ -12047,7 +12086,7 @@ * // => false */ function has(object, path) { - return hasPath(object, path, baseHas); + return object != null && hasPath(object, path, baseHas); } /** @@ -12077,7 +12116,7 @@ * // => false */ function hasIn(object, path) { - return hasPath(object, path, baseHasIn); + return object != null && hasPath(object, path, baseHasIn); } /** @@ -12104,8 +12143,8 @@ /** * This method is like `_.invert` except that the inverted object is generated - * from the results of running each element of `object` through `iteratee`. - * The corresponding inverted value of each inverted key is an array of keys + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys * responsible for generating the inverted value. The iteratee is invoked * with one argument: (value). * @@ -12251,8 +12290,8 @@ /** * The opposite of `_.mapValues`; this method creates an object with the * same values as `object` and keys generated by running each own enumerable - * string keyed property of `object` through `iteratee`. The iteratee is - * invoked with three arguments: (value, key, object). + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). * * @static * @memberOf _ @@ -12280,8 +12319,8 @@ } /** - * Creates an object with the same keys as `object` and values generated by - * running each own enumerable string keyed property of `object` through + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, key, object). * @@ -12570,7 +12609,7 @@ * console.log(object.a[0].b.c); * // => 4 * - * _.set(object, 'x[0].y.z', 5); + * _.set(object, ['x', '0', 'y', 'z'], 5); * console.log(object.x[0].y.z); * // => 5 */ @@ -12663,11 +12702,11 @@ /** * An alternative to `_.reduce`; this method transforms `object` to a new - * `accumulator` object which is the result of running each of its own enumerable - * string keyed properties through `iteratee`, with each invocation potentially - * mutating the `accumulator` object. The iteratee is invoked with four arguments: - * (accumulator, value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. The iteratee is invoked + * with four arguments: (accumulator, value, key, object). Iteratee functions + * may exit iteration early by explicitly returning `false`. * * @static * @memberOf _ @@ -12733,7 +12772,7 @@ * console.log(object); * // => { 'a': [{ 'b': {} }] }; * - * _.unset(object, 'a[0].b.c'); + * _.unset(object, ['a', '0', 'b', 'c']); * // => true * * console.log(object); @@ -13401,7 +13440,8 @@ * @since 3.0.0 * @category String * @param {string} [string=''] The string to repeat. - * @param {number} [n=0] The number of times to repeat the string. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {string} Returns the repeated string. * @example * @@ -13414,8 +13454,13 @@ * _.repeat('abc', 0); * // => '' */ - function repeat(string, n) { - return baseRepeat(toString(string), toInteger(n)); + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); } /** @@ -14640,14 +14685,14 @@ } /** - * Creates a function that invokes `iteratees` with the arguments provided - * to the created function and returns their results. + * Creates a function that invokes `iteratees` with the arguments it receives + * and returns their results. * * @static * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Function|Function[])} iteratees The iteratees to invoke. + * @param {...Function} iteratees The iteratees to invoke. * @returns {Function} Returns the new function. * @example * @@ -14660,13 +14705,13 @@ /** * Creates a function that checks if **all** of the `predicates` return - * truthy when invoked with the arguments provided to the created function. + * truthy when invoked with the arguments it receives. * * @static * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Function|Function[])} predicates The predicates to check. + * @param {...Function} predicates The predicates to check. * @returns {Function} Returns the new function. * @example * @@ -14685,13 +14730,13 @@ /** * Creates a function that checks if **any** of the `predicates` return - * truthy when invoked with the arguments provided to the created function. + * truthy when invoked with the arguments it receives. * * @static * @memberOf _ * @since 4.0.0 * @category Util - * @param {...(Function|Function[])} predicates The predicates to check. + * @param {...Function} predicates The predicates to check. * @returns {Function} Returns the new function. * @example * diff --git a/dist/lodash.min.js b/dist/lodash.min.js index a9176a61dc..5c853bbb07 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -1,6 +1,6 @@ /** * @license - * lodash 4.7.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * lodash 4.8.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():Ru.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(de(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||de(t,su[r])&&!pu.call(e,r)?n:t}function Ht(t,n,r){(r===T||de(t[n],r))&&(typeof n!="number"||r!==T||n in t)||(t[n]=r)}function Qt(t,n,r){var e=t[n];pu.call(t,n)&&de(e,r)&&(r!==T||n in t)||(t[n]=r)}function Xt(t,n,r,e){return oo(t,function(t,u,o){n(e,t,r(t),o)}),e}function tn(t,n){return t&&ur(n,Te(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(!ke(t))return t;if(o=Yo(t)){if(c=Mr(t),!n)return er(t,c)}else{var a=zr(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(Ho(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,Te,Cr):Te(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=Te(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 ke(t)?Eu(t):{}}function ln(t,n,r){if(typeof t!="function")throw new au("Expected a function");return Su(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&&je(i)&&(r||Yo(i)||be(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&&fo(t,n,Te)}function gn(t,n){return t&&co(t,n,Te)}function dn(t,n){return i(n,function(n){return we(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),Yo(t)?n:l(n,r(t))}function xn(t,n){return pu.call(t,n)||typeof t=="object"&&n in t&&null===Cu(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=$u(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=Vr(t,n),n=Hr(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||!ke(t)&&!Ee(n))n=t!==t&&n!==n;else t:{var o=Yo(t),i=Yo(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||ze(t)?kr(t,n,On,r,e,u):Er(t,n,f,On,r,e,u);else{if(!(2&e)&&(o=a&&pu.call(t,"__wrapped__"), -f=i&&pu.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=Te(t),i=f.length,c=Te(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,Ve,po),u=e.length,o={};++rn||n>9007199254740991)return r;do n%2&&(r+=t),(n=Bu(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,tu,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=Bu((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 $u(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 mu(n).set(new mu(t)),n}function nr(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=Lu(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=Lu(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 ve(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 au("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=$u(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 ve(function(n){return n=a(_n(n,1),Sr()),ve(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,Wu(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:De(e)||0;var u=-1;r=Lu(Wu((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)&&_o(r,n),r.placeholder=e,r}function Ar(t){var n=fu[t];return function(t,r){if(t=De(t),r=Le(r)){var e=(Ne(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(Ne(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 au("Expected a function"); -var a=e?e.length:0;if(a||(n&=-97,e=u=T),i=i===T?i:Lu(Le(i),0),f=f===T?f:Le(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=T}var h=c?T:so(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]:$u(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:Lu(o[9]-a,0),!f&&24&n&&(n&=-25),(h?ao:_o)(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 Jr(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Le(n),n=e-n,Zn(t,0,0>n?0:n)):[]}function Yr(t){return t?t[0]:T}function Hr(t){var n=t?t.length:0;return n?t[n-1]:T}function Qr(t,n){return t&&t.length&&n&&n.length?$n(t,n):t}function Xr(t){return t?Nu.call(t):t}function te(t){if(!t||!t.length)return[];var n=0;return t=i(t,function(t){ -return je(t)?(n=Lu(t.length,n),true):void 0}),w(n,function(n){return a(t,Mn(n))})}function ne(t,n){if(!t||!t.length)return[];var e=te(t);return null==n?e:a(e,function(t){return r(n,T,t)})}function re(t){return t=xt(t),t.__chain__=true,t}function ee(t,n){return n(t)}function ue(){return this}function oe(t,n){return typeof n=="function"&&Yo(t)?u(t,n):oo(t,Sr(n))}function ie(t,n){var r;if(typeof n=="function"&&Yo(t)){for(r=t.length;r--&&false!==n(t[r],r,t););r=t}else r=io(t,Sr(n));return r}function fe(t,n){ -return(Yo(t)?a:Sn)(t,Sr(n,3))}function ce(t,n){var r=-1,e=Me(t),u=e.length,o=u-1;for(n=on(Le(n),0,u);++r=t&&(n=T),r}}function se(t,n,r){return n=r?T:n,t=Or(t,8,T,T,T,T,T,n),t.placeholder=se.placeholder,t}function he(t,n,r){ -return n=r?T:n,t=Or(t,16,T,T,T,T,T,n),t.placeholder=he.placeholder,t}function pe(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=No();if(u(t))return i(t);var r;r=t-p,t=n-(t-h),r=false===v?t:$u(t,v-r),s=Su(o,r)}function i(t){return wu(s),s=T,g&&c?e(t):(c=a=T,l)}function f(){var t=No(),r=u(t);return c=arguments,a=this,h=t,r?s===T?(p=t=h,s=Su(o,n),_?e(t):l):(wu(s),s=Su(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 au("Expected a function");return n=De(n)||0,ke(r)&&(_=!!r.leading,v="maxWait"in r&&Lu(De(r.maxWait)||0,n),g="trailing"in r?!!r.trailing:g),f.cancel=function(){s!==T&&wu(s),h=p=0,c=a=s=T},f.flush=function(){return s===T?l:i(No())},f}function _e(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 au("Expected a function");return r.cache=new(_e.Cache||Lt), -r}function ve(t,n){if(typeof t!="function")throw new au("Expected a function");return n=Lu(n===T?t.length-1:Le(n),0),function(){for(var e=arguments,u=-1,o=Lu(e.length-n,0),i=Array(o);++un}function be(t){return je(t)&&pu.call(t,"callee")&&(!Iu.call(t,"callee")||"[object Arguments]"==gu.call(t))}function xe(t){return null!=t&&Oe(ho(t))&&!we(t)}function je(t){return Ee(t)&&xe(t)}function me(t){return Ee(t)?"[object Error]"==gu.call(t)||typeof t.message=="string"&&typeof t.name=="string":false}function we(t){return t=ke(t)?gu.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function Ae(t){return typeof t=="number"&&t==Le(t)}function Oe(t){return typeof t=="number"&&t>-1&&0==t%1&&9007199254740991>=t; -}function ke(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Ee(t){return!!t&&typeof t=="object"}function Ie(t){return null==t?false:we(t)?yu.test(hu.call(t)):Ee(t)&&(M(t)?yu:yt).test(t)}function Se(t){return typeof t=="number"||Ee(t)&&"[object Number]"==gu.call(t)}function Re(t){return!Ee(t)||"[object Object]"!=gu.call(t)||M(t)?false:(t=Cu(Object(t)),null===t?true:(t=pu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&hu.call(t)==vu))}function We(t){return ke(t)&&"[object RegExp]"==gu.call(t); -}function Be(t){return typeof t=="string"||!Yo(t)&&Ee(t)&&"[object String]"==gu.call(t)}function Ce(t){return typeof t=="symbol"||Ee(t)&&"[object Symbol]"==gu.call(t)}function ze(t){return Ee(t)&&Oe(t.length)&&!!zt[gu.call(t)]}function Ue(t,n){return n>t}function Me(t){if(!t)return[];if(xe(t))return Be(t)?t.match(It):er(t);if(ku&&t[ku])return $(t[ku]());var n=zr(t);return("[object Map]"==n?D:"[object Set]"==n?N:Je)(t)}function Le(t){if(!t)return 0===t?t:0;if(t=De(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 $e(t){return t?on(Le(t),0,4294967295):0}function De(t){if(typeof t=="number")return t;if(Ce(t))return K;if(ke(t)&&(t=we(t.valueOf)?t.valueOf():t,t=ke(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 Fe(t){return ur(t,Ve(t))}function Ne(t){if(typeof t=="string")return t;if(null==t)return"";if(Ce(t))return uo?uo.call(t):"";var n=t+"";return"0"==n&&1/t==-V?"-0":n; -}function Pe(t,n,r){return t=null==t?T:yn(t,n),t===T?r:t}function Ze(t,n){return Ur(t,n,xn)}function qe(t,n){return Ur(t,n,jn)}function Te(t){var n=qr(t);if(!n&&!xe(t))return Mu(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 Ve(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 oo=ar(vn),io=ar(gn,true),fo=lr(),co=lr(true); -Au&&!Iu.call({valueOf:1},"valueOf")&&(In=function(t){return $(Au(t))});var ao=Gu?function(t,n){return Gu.set(t,n),t}:tu,lo=Tu&&2===new Tu([1,2]).size?function(t){return new Tu(t)}:eu,so=Gu?function(t){return Gu.get(t)}:eu,ho=Mn("length");Ou||(Cr=function(){return[]});var po=Ou?function(t){for(var n=[];t;)l(n,Cr(t)),t=Cu(Object(t));return n}:Cr;(Pu&&"[object DataView]"!=zr(new Pu(new ArrayBuffer(1)))||Zu&&"[object Map]"!=zr(new Zu)||qu&&"[object Promise]"!=zr(qu.resolve())||Tu&&"[object Set]"!=zr(new Tu)||Vu&&"[object WeakMap]"!=zr(new Vu))&&(zr=function(t){ -var n=gu.call(t);if(t="[object Object]"==n?t.constructor:null,t=typeof t=="function"?hu.call(t):"")switch(t){case Hu:return"[object DataView]";case Qu:return"[object Map]";case Xu:return"[object Promise]";case to:return"[object Set]";case no:return"[object WeakMap]"}return n});var _o=function(){var t=0,n=0;return function(r,e){var u=No(),o=16-(u-n);if(n=u,o>0){if(150<=++t)return r}else t=0;return ao(r,e)}}(),vo=_e(function(t){var n=[];return Ne(t).replace(it,function(t,r,e,u){n.push(e?u.replace(ht,"$1"):r||t); -}),n}),go=ve(function(t,n){return je(t)?sn(t,_n(n,1,true)):[]}),yo=ve(function(t,n){var r=Hr(n);return je(r)&&(r=T),je(t)?sn(t,_n(n,1,true),Sr(r)):[]}),bo=ve(function(t,n){var r=Hr(n);return je(r)&&(r=T),je(t)?sn(t,_n(n,1,true),T,r):[]}),xo=ve(function(t){var n=a(t,rn);return n.length&&n[0]===t[0]?mn(n):[]}),jo=ve(function(t){var n=Hr(t),r=a(t,rn);return n===Hr(r)?n=T:r.pop(),r.length&&r[0]===t[0]?mn(r,Sr(n)):[]}),mo=ve(function(t){var n=Hr(t),r=a(t,rn);return n===Hr(r)?n=T:r.pop(),r.length&&r[0]===t[0]?mn(r,T,n):[]; -}),wo=ve(Qr),Ao=ve(function(t,n){n=a(_n(n,1),String);var r=nn(t,n);return Dn(t,n.sort(R)),r}),Oo=ve(function(t){return Gn(_n(t,1,true))}),ko=ve(function(t){var n=Hr(t);return je(n)&&(n=T),Gn(_n(t,1,true),Sr(n))}),Eo=ve(function(t){var n=Hr(t);return je(n)&&(n=T),Gn(_n(t,1,true),T,n)}),Io=ve(function(t,n){return je(t)?sn(t,n):[]}),So=ve(function(t){return Hn(i(t,je))}),Ro=ve(function(t){var n=Hr(t);return je(n)&&(n=T),Hn(i(t,je),Sr(n))}),Wo=ve(function(t){var n=Hr(t);return je(n)&&(n=T),Hn(i(t,je),T,n)}),Bo=ve(te),Co=ve(function(t){ -var n=t.length,n=n>1?t[n-1]:T,n=typeof n=="function"?(t.pop(),n):T;return ne(t,n)}),zo=ve(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:ee,args:[n],thisArg:T}),new Ot(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(T),t})):this.thru(n)}),Uo=fr(function(t,n,r){pu.call(t,r)?++t[r]:t[r]=1}),Mo=fr(function(t,n,r){pu.call(t,r)?t[r].push(n):t[r]=[n]; -}),Lo=ve(function(t,n,e){var u=-1,o=typeof n=="function",i=Nr(n),f=xe(t)?Array(t.length):[];return oo(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}),$o=fr(function(t,n,r){t[r]=n}),Do=fr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),Fo=ve(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),[])}),No=ou.now,Po=ve(function(t,n,r){var e=1;if(r.length)var u=F(r,Br(Po)),e=32|e;return Or(t,e,n,r,u); -}),Zo=ve(function(t,n,r){var e=3;if(r.length)var u=F(r,Br(Zo)),e=32|e;return Or(n,e,t,r,u)}),qo=ve(function(t,n){return ln(t,1,n)}),To=ve(function(t,n,r){return ln(t,De(n)||0,r)});_e.Cache=Lt;var Vo=ve(function(t,n){n=a(_n(n,1),Sr());var e=n.length;return ve(function(u){for(var o=-1,i=$u(u.length,e);++o--t?n.apply(this,arguments):void 0}},xt.ary=ae,xt.assign=Qo,xt.assignIn=Xo,xt.assignInWith=ti,xt.assignWith=ni,xt.at=ri,xt.before=le,xt.bind=Po,xt.bindAll=ji,xt.bindKey=Zo,xt.castArray=ge,xt.chain=re,xt.chunk=function(t,n){ -n=Lu(Le(n),0);var r=t?t.length:0;if(!r||1>n)return[];for(var e=0,u=0,o=Array(Wu(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:Le(e),0>e&&(e+=u),e=r>e?0:$e(e);e>r;)t[r++]=n;return t},xt.filter=function(t,n){return(Yo(t)?i:pn)(t,Sr(n,3))},xt.flatMap=function(t,n){return _n(fe(t,n),1)},xt.flatMapDeep=function(t,n){ -return _n(fe(t,n),V)},xt.flatMapDepth=function(t,n,r){return r=r===T?1:Le(r),_n(fe(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:Le(n),_n(t,n)):[]},xt.flip=function(t){return Or(t,512)},xt.flow=mi,xt.flowRight=wi,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:Le(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 au("Expected a function"); -return ke(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),pe(t,n,{leading:e,maxWait:n,trailing:u})},xt.thru=ee,xt.toArray=Me,xt.toPairs=Ke,xt.toPairsIn=Ge,xt.toPath=function(t){return Yo(t)?a(t,en):Ce(t)?[t]:er(vo(t))},xt.toPlainObject=Fe,xt.transform=function(t,n,r){var e=Yo(t)||ze(t);if(n=Sr(n,4),null==r)if(e||ke(t)){var o=t.constructor;r=e?Yo(t)?new o:[]:we(o)?an(Cu(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 ae(t,1); -},xt.union=Oo,xt.unionBy=ko,xt.unionWith=Eo,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=Vr(r,e),e=Hr(e),r=null!=r&&Ze(r,e)?delete r[e]:true}return r},xt.unzip=te,xt.unzipWith=ne,xt.update=function(t,n,r){return null==t?t:Pn(t,n,(typeof r=="function"?r:tu)(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:tu)(yn(t,n)),e)),t},xt.values=Je,xt.valuesIn=function(t){return null==t?[]:k(t,Ve(t))},xt.without=Io,xt.words=Qe,xt.wrap=function(t,n){return n=null==n?tu:n,Ko(n,t)},xt.xor=So,xt.xorBy=Ro,xt.xorWith=Wo,xt.zip=Bo,xt.zipObject=function(t,n){return Qn(t||[],n||[],Qt)},xt.zipObjectDeep=function(t,n){return Qn(t||[],n||[],Pn)},xt.zipWith=Co,xt.entries=Ke,xt.entriesIn=Ge,xt.extend=Xo,xt.extendWith=ti,ru(xt,xt),xt.add=Wi,xt.attempt=xi, -xt.camelCase=hi,xt.capitalize=Ye,xt.ceil=Bi,xt.clamp=function(t,n,r){return r===T&&(r=n,n=T),r!==T&&(r=De(r),r=r===r?r:0),n!==T&&(n=De(n),n=n===n?n:0),on(De(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=He,xt.divide=Ci,xt.endsWith=function(t,n,r){t=Ne(t),n=typeof n=="string"?n:n+"";var e=t.length;return r=r===T?e:on(Le(r),0,e),r-=n.length, -r>=0&&t.indexOf(n,r)==r},xt.eq=de,xt.escape=function(t){return(t=Ne(t))&&tt.test(t)?t.replace(Q,C):t},xt.escapeRegExp=function(t){return(t=Ne(t))&&ct.test(t)?t.replace(ft,"\\$&"):t},xt.every=function(t,n,r){var e=Yo(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),Yo(t)){var r=g(t,n);return r>-1?t[r]:T}return v(t,n,oo)},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), -Yo(t)){var r=g(t,n,true);return r>-1?t[r]:T}return v(t,n,io)},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=zi,xt.forEach=oe,xt.forEachRight=ie,xt.forIn=function(t,n){return null==t?t:fo(t,Sr(n),Ve)},xt.forInRight=function(t,n){return null==t?t:co(t,Sr(n),Ve)},xt.forOwn=function(t,n){return t&&vn(t,Sr(n))},xt.forOwnRight=function(t,n){return t&&gn(t,Sr(n))},xt.get=Pe,xt.gt=ye,xt.gte=function(t,n){return t>=n},xt.has=Ze, -xt.hasIn=qe,xt.head=Yr,xt.identity=tu,xt.includes=function(t,n,r,e){return t=xe(t)?t:Je(t),r=r&&!e?Le(r):0,e=t.length,0>r&&(r=Lu(e+r,0)),Be(t)?e>=r&&-1r&&(r=Lu(e+r,0)),d(t,n,r)):-1},xt.inRange=function(t,n,r){return n=De(n)||0,r===T?(r=n,n=0):r=De(r)||0,t=De(t),t>=$u(n,r)&&t=-9007199254740991&&9007199254740991>=t},xt.isSet=function(t){return Ee(t)&&"[object Set]"==zr(t)},xt.isString=Be,xt.isSymbol=Ce,xt.isTypedArray=ze,xt.isUndefined=function(t){return t===T},xt.isWeakMap=function(t){return Ee(t)&&"[object WeakMap]"==zr(t)},xt.isWeakSet=function(t){return Ee(t)&&"[object WeakSet]"==gu.call(t); -},xt.join=function(t,n){return t?Uu.call(t,n):""},xt.kebabCase=pi,xt.last=Hr,xt.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==T&&(u=Le(r),u=(0>u?Lu(e+u,0):$u(u,e-1))+1),n!==n)return U(t,u,true);for(;u--;)if(t[u]===n)return u;return-1},xt.lowerCase=_i,xt.lowerFirst=vi,xt.lt=Ue,xt.lte=function(t,n){return n>=t},xt.max=function(t){return t&&t.length?_(t,tu,ye):T},xt.maxBy=function(t,n){return t&&t.length?_(t,Sr(n),ye):T},xt.mean=function(t){return b(t,tu)},xt.meanBy=function(t,n){ -return b(t,Sr(n))},xt.min=function(t){return t&&t.length?_(t,tu,Ue):T},xt.minBy=function(t,n){return t&&t.length?_(t,Sr(n),Ue):T},xt.multiply=Ui,xt.noConflict=function(){return Jt._===this&&(Jt._=du),this},xt.noop=eu,xt.now=No,xt.pad=function(t,n,r){t=Ne(t);var e=(n=Le(n))?P(t):0;return n&&n>e?(n=(n-e)/2,xr(Bu(n),r)+t+xr(Wu(n),r)):t},xt.padEnd=function(t,n,r){t=Ne(t);var e=(n=Le(n))?P(t):0;return n&&n>e?t+xr(n-e,r):t},xt.padStart=function(t,n,r){t=Ne(t);var e=(n=Le(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=Ne(t).replace(at,""),Du(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=De(t)||0,n===T?(n=t,t=0):n=De(n)||0),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=Fu(),$u(t+r*(n-t+Nt("1e-"+((r+"").length-1))),n)):Fn(t,n)},xt.reduce=function(t,n,r){var e=Yo(t)?s:x,u=3>arguments.length;return e(t,Sr(n,4),r,u,oo); -},xt.reduceRight=function(t,n,r){var e=Yo(t)?h:x,u=3>arguments.length;return e(t,Sr(n,4),r,u,io)},xt.repeat=function(t,n){return Nn(Ne(t),Le(n))},xt.replace=function(){var t=arguments,n=Ne(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(xe(t)){var n=t.length;return n&&Be(t)?P(t):n}return Ee(t)&&(n=zr(t),"[object Map]"==n||"[object Set]"==n)?t.size:Te(t).length},xt.snakeCase=gi,xt.some=function(t,n,r){var e=Yo(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&&de(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(de(t[r],n))return r}return-1},xt.startCase=di,xt.startsWith=function(t,n,r){return t=Ne(t),r=on(Le(r),0,t.length),t.lastIndexOf(n,r)==r},xt.subtract=Li,xt.sum=function(t){return t&&t.length?m(t,tu):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=Ne(t),n=ti({},n,e,Gt), -r=ti({},n.imports,e.imports,Gt);var u,o,i=Te(r),f=k(r,i),c=0;r=n.interpolate||mt;var a="__p+='";r=cu((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=xi(function(){return Function(i,l+"return "+a).apply(T,f)}),n.source=a,me(n))throw n;return n},xt.times=function(t,n){if(t=Le(t),1>t||t>9007199254740991)return[];var r=4294967295,e=$u(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),We(u)){if(t.slice(o).search(u)){ -var f=r;for(u.global||(u=cu(u.source,Ne(_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=Ne(t))&&X.test(t)?t.replace(H,Z):t},xt.uniqueId=function(t){var n=++_u;return Ne(t)+n},xt.upperCase=yi,xt.upperFirst=bi,xt.each=oe,xt.eachRight=ie,xt.first=Yr,ru(xt,function(){var t={};return vn(xt,function(n,r){pu.call(xt.prototype,r)||(t[r]=n)}),t}(),{chain:false}), -xt.VERSION="4.7.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:Lu(Le(r),0);var u=this.clone();return e?u.__takeCount__=$u(r,u.__takeCount__):u.__views__.push({size:$u(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(tu)},kt.prototype.find=function(t){ -return this.filter(t).head()},kt.prototype.findLast=function(t){return this.reverse().find(t)},kt.prototype.invokeMap=ve(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=Le(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=Le(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||Yo(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:ee,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=lu[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(Yo(u)?u:[],t)}return this[r](function(r){return n.apply(Yo(r)?r:[],t)}); -}}),vn(kt.prototype,function(t,n){var r=xt[n];if(r){var e=r.name+"";(Yu[e]||(Yu[e]=[])).push({name:n,func:r})}}),Yu[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=Yo(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=Kr(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:ee,args:[Xr],thisArg:T}),new Ot(t,this.__chain__)):this.thru(Xr)},xt.prototype.toJSON=xt.prototype.valueOf=xt.prototype.value=function(){return Yn(this.__wrapped__,this.__actions__)},ku&&(xt.prototype[ku]=ue), -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 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];++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,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,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.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: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={}; 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/dist/mapping.fp.js b/dist/mapping.fp.js index 5f5a819de6..01eefd17ed 100644 --- a/dist/mapping.fp.js +++ b/dist/mapping.fp.js @@ -108,9 +108,10 @@ return /******/ (function(modules) { // webpackBootstrap exports.aryMethod = { '1': [ 'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor', - 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'methodOf', 'mixin', - 'over', 'overEvery', 'overSome', 'rest', 'reverse', 'round', 'runInContext', - 'spread', 'template', 'trim', 'trimEnd', 'trimStart', 'uniqueId', 'words' + 'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', + 'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse', + 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', + 'uniqueId', 'words' ], '2': [ 'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll', @@ -220,6 +221,10 @@ return /******/ (function(modules) { // webpackBootstrap exports.methodSpread = { 'invokeArgs': 2, 'invokeArgsMap': 2, + 'over': 0, + 'overArgs': 1, + 'overEvery': 0, + 'overSome': 0, 'partial': 1, 'partialRight': 1, 'without': 1 @@ -300,7 +305,17 @@ return /******/ (function(modules) { // webpackBootstrap 'trimCharsStart': 'trimStart' }; - /** Used to track methods that skip `_.rearg`. */ + /** Used to track methods that skip fixing their arity. */ + exports.skipFixed = { + 'castArray': true, + 'flow': true, + 'flowRight': true, + 'iteratee': true, + 'mixin': true, + 'runInContext': true + }; + + /** Used to track methods that skip rearranging arguments. */ exports.skipRearg = { 'add': true, 'assign': true, @@ -319,6 +334,7 @@ return /******/ (function(modules) { // webpackBootstrap 'matchesProperty': true, 'merge': true, 'multiply': true, + 'overArgs': true, 'partial': true, 'partialRight': true, 'random': true, diff --git a/doc/README.md b/doc/README.md index e2d247da8d..b6cf108d4c 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,11 +1,11 @@ -# lodash v4.7.0 +# lodash v4.8.0 ## `Array` -* `_.chunk` +* `_.chunk` * `_.compact` * `_.concat` * `_.difference` @@ -98,7 +98,7 @@ * `_.reduceRight` * `_.reject` * `_.sample` -* `_.sampleSize` +* `_.sampleSize` * `_.shuffle` * `_.size` * `_.some` @@ -320,7 +320,7 @@ * `_.padEnd` * `_.padStart` * `_.parseInt` -* `_.repeat` +* `_.repeat` * `_.replace` * `_.snakeCase` * `_.split` @@ -404,8 +404,8 @@ -### `_.chunk(array, [size=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L5786 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package") +### `_.chunk(array, [size=1])` +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L5819 "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 @@ -415,7 +415,7 @@ elements. 3.0.0 #### Arguments 1. `array` *(Array)*: The array to process. -2. `[size=0]` *(number)*: The length of each chunk. +2. `[size=1]` *(number)*: The length of each chunk #### Returns *(Array)*: Returns the new array containing chunks. @@ -435,7 +435,7 @@ _.chunk(['a', 'b', 'c', 'd'], 3); ### `_.compact(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L5818 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L5854 "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 +460,7 @@ _.compact([0, 1, false, 2, '', 3]); ### `_.concat(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L5855 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.concat "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L5891 "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 +492,7 @@ console.log(array); ### `_.difference(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L5887 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L5923 "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 +520,7 @@ _.difference([3, 2, 1], [4, 2]); ### `_.differenceBy(array, [values], [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L5917 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.differenceby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L5953 "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 +553,7 @@ _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); ### `_.differenceWith(array, [values], [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L5948 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.differencewith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L5984 "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 +584,7 @@ _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); ### `_.drop(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L5983 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6019 "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 +618,7 @@ _.drop([1, 2, 3], 0); ### `_.dropRight(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6017 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6053 "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 +652,7 @@ _.dropRight([1, 2, 3], 0); ### `_.dropRightWhile(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6063 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6099 "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 +697,7 @@ _.dropRightWhile(users, 'active'); ### `_.dropWhile(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6105 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6141 "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 +742,7 @@ _.dropWhile(users, 'active'); ### `_.fill(array, value, [start=0], [end=array.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6140 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6176 "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 +782,7 @@ _.fill([4, 6, 8, 10], '*', 1, 3); ### `_.findIndex(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6187 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6223 "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 +826,7 @@ _.findIndex(users, 'active'); ### `_.findLastIndex(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6228 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6264 "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 +870,7 @@ _.findLastIndex(users, 'active'); ### `_.flatten(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6248 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6284 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package") Flattens `array` a single level deep. @@ -894,7 +894,7 @@ _.flatten([1, [2, [3, [4]], 5]]); ### `_.flattenDeep(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6267 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6303 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") Recursively flattens `array`. @@ -918,7 +918,7 @@ _.flattenDeep([1, [2, [3, [4]], 5]]); ### `_.flattenDepth(array, [depth=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6292 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6328 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") Recursively flatten `array` up to `depth` times. @@ -948,7 +948,7 @@ _.flattenDepth(array, 2); ### `_.fromPairs(pairs)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6316 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.frompairs "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6352 "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 +973,7 @@ _.fromPairs([['fred', 30], ['barney', 40]]); ### `_.head(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6346 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6382 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package") Gets the first element of `array`. @@ -1003,7 +1003,7 @@ _.head([]); ### `_.indexOf(array, value, [fromIndex=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6373 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6409 "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) @@ -1036,7 +1036,7 @@ _.indexOf([1, 2, 1, 2], 2, 2); ### `_.initial(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6399 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6435 "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 +1060,7 @@ _.initial([1, 2, 3]); ### `_.intersection([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6420 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6456 "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 +1087,7 @@ _.intersection([2, 1], [4, 2], [1, 2]); ### `_.intersectionBy([arrays], [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6450 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersectionby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6486 "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 +1119,7 @@ _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); ### `_.intersectionWith([arrays], [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6485 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6521 "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 +1150,7 @@ _.intersectionWith(objects, others, _.isEqual); ### `_.join(array, [separator=','])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6514 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.join "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6550 "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 +1175,7 @@ _.join(['a', 'b', 'c'], '~'); ### `_.last(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6532 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6568 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") Gets the last element of `array`. @@ -1199,7 +1199,7 @@ _.last([1, 2, 3]); ### `_.lastIndexOf(array, value, [fromIndex=array.length-1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6558 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6594 "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 +1230,7 @@ _.lastIndexOf([1, 2, 1, 2], 2, 2); ### `_.pull(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6606 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6642 "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 +1264,7 @@ console.log(array); ### `_.pullAll(array, values)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6628 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullall "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6664 "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 +1295,7 @@ console.log(array); ### `_.pullAllBy(array, values, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6658 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullallby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6694 "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 +1329,7 @@ console.log(array); ### `_.pullAllWith(array, values, [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6687 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullallwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6723 "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 +1363,7 @@ console.log(array); ### `_.pullAt(array, [indexes])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6718 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6754 "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 +1398,7 @@ console.log(evens); ### `_.remove(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6755 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6791 "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 +1437,7 @@ console.log(evens); ### `_.reverse(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6799 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reverse "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6835 "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 +1471,7 @@ console.log(array); ### `_.slice(array, [start=0], [end=array.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6819 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6855 "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 +1497,7 @@ returned. ### `_.sortedIndex(array, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6855 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6891 "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 +1526,7 @@ _.sortedIndex([4, 5], 4); ### `_.sortedIndexBy(array, value, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6885 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6921 "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 +1560,7 @@ _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); ### `_.sortedIndexOf(array, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6905 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6941 "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 +1586,7 @@ _.sortedIndexOf([1, 1, 2, 2], 2); ### `_.sortedLastIndex(array, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6934 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6970 "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 +1613,7 @@ _.sortedLastIndex([4, 5], 4); ### `_.sortedLastIndexBy(array, value, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6959 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L6995 "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 +1642,7 @@ _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); ### `_.sortedLastIndexOf(array, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L6979 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7015 "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 +1668,7 @@ _.sortedLastIndexOf([1, 1, 2, 2], 2); ### `_.sortedUniq(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7005 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7041 "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 +1693,7 @@ _.sortedUniq([1, 1, 2]); ### `_.sortedUniqBy(array, [iteratee])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7027 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7063 "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 +1719,7 @@ _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); ### `_.tail(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7047 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tail "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7083 "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 +1743,7 @@ _.tail([1, 2, 3]); ### `_.take(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7076 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7112 "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 +1777,7 @@ _.take([1, 2, 3], 0); ### `_.takeRight(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7109 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7145 "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 +1811,7 @@ _.takeRight([1, 2, 3], 0); ### `_.takeRightWhile(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7155 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7191 "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 +1856,7 @@ _.takeRightWhile(users, 'active'); ### `_.takeWhile(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7197 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7233 "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 +1901,7 @@ _.takeWhile(users, 'active'); ### `_.union([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7219 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7255 "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 +1927,7 @@ _.union([2, 1], [4, 2], [1, 2]); ### `_.unionBy([arrays], [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7246 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unionby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7282 "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 +1959,7 @@ _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); ### `_.unionWith([arrays], [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7274 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unionwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7310 "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 +1989,7 @@ _.unionWith(objects, others, _.isEqual); ### `_.uniq(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7299 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7335 "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 +2016,7 @@ _.uniq([2, 1, 2]); ### `_.uniqBy(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7327 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7363 "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 +2047,7 @@ _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); ### `_.uniqWith(array, [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7352 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7388 "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 +2076,7 @@ _.uniqWith(objects, _.isEqual); ### `_.unzip(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7377 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7413 "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 +2105,7 @@ _.unzip(zipped); ### `_.unzipWith(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7414 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzipwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7450 "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 +2135,7 @@ _.unzipWith(zipped, _.add); ### `_.without(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7444 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7480 "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 +2162,7 @@ _.without([1, 2, 1, 3], 1, 2); ### `_.xor([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7467 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7503 "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 +2189,7 @@ _.xor([2, 1], [4, 2]); ### `_.xorBy([arrays], [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7494 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xorby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7530 "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 +2221,7 @@ _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); ### `_.xorWith([arrays], [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7522 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xorwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7558 "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 +2251,7 @@ _.xorWith(objects, others, _.isEqual); ### `_.zip([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7546 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7582 "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 +2277,7 @@ _.zip(['fred', 'barney'], [30, 40], [true, false]); ### `_.zipObject([props=[]], [values=[]])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7564 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7600 "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 +2303,7 @@ _.zipObject(['a', 'b'], [1, 2]); ### `_.zipObjectDeep([props=[]], [values=[]])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7583 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7619 "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 +2328,7 @@ _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); ### `_.zipWith([arrays], [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7606 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7642 "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,12 +2363,12 @@ _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { ### `_.countBy(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7990 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8026 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package") Creates an object composed of keys generated from the results of running -each element of `collection` through `iteratee`. The corresponding value -of each key is the number of times the key was returned by `iteratee`. -The iteratee is invoked with one argument: *(value)*. +each element of `collection` thru `iteratee`. The corresponding value of +each key is the number of times the key was returned by `iteratee`. The +iteratee is invoked with one argument: *(value)*. #### Since 0.5.0 @@ -2394,7 +2394,7 @@ _.countBy(['one', 'two', 'three'], 'length'); ### `_.every(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8031 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8067 "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 +2438,7 @@ _.every(users, 'active'); ### `_.filter(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8074 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8110 "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 +2482,7 @@ _.filter(users, 'active'); ### `_.find(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8115 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8151 "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 +2527,7 @@ _.find(users, 'active'); ### `_.findLast(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8143 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8179 "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,11 +2555,11 @@ _.findLast([1, 2, 3, 4], function(n) { ### `_.flatMap(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8174 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8210 "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` -through `iteratee` and flattening the mapped results. The iteratee is -invoked with three arguments: *(value, index|key, collection)*. +thru `iteratee` and flattening the mapped results. The iteratee is invoked +with three arguments: *(value, index|key, collection)*. #### Since 4.0.0 @@ -2586,7 +2586,7 @@ _.flatMap([1, 2], duplicate); ### `_.flatMapDeep(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8199 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8235 "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 +2616,7 @@ _.flatMapDeep([1, 2], duplicate); ### `_.flatMapDepth(collection, [iteratee=_.identity], [depth=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8225 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8261 "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 +2647,7 @@ _.flatMapDepth([1, 2], duplicate, 2); ### `_.forEach(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8259 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8295 "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 +2689,7 @@ _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { ### `_.forEachRight(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8284 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8320 "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 +2720,12 @@ _.forEachRight([1, 2], function(value) { ### `_.groupBy(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8313 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8349 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package") Creates an object composed of keys generated from the results of running -each element of `collection` through `iteratee`. The corresponding value -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 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,7 +2752,7 @@ _.groupBy(['one', 'two', 'three'], 'length'); ### `_.includes(collection, value, [fromIndex=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8351 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8387 "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 checked for a substring of `value`, otherwise @@ -2791,7 +2791,7 @@ _.includes('pebbles', 'eb'); ### `_.invokeMap(collection, path, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8387 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invokemap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8423 "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 @@ -2823,11 +2823,11 @@ _.invokeMap([123, 456], String.prototype.split, ''); ### `_.keyBy(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8429 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keyby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8465 "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` through `iteratee`. The corresponding value -of each key is the last element responsible for generating the key. The +each element of `collection` thru `iteratee`. The corresponding value of +each key is the last element responsible for generating the key. The iteratee is invoked with one argument: *(value)*. #### Since @@ -2861,9 +2861,9 @@ _.keyBy(array, 'dir'); ### `_.map(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8476 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8512 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package") -Creates an array of values by running each element in `collection` through +Creates an array of values by running each element in `collection` thru `iteratee`. The iteratee is invoked with three arguments:
*(value, index|key, collection)*.
@@ -2873,10 +2873,10 @@ Many lodash methods are guarded to work as iteratees for methods like

The guarded methods are:
-`ary`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, `fill`, -`invert`, `parseInt`, `random`, `range`, `rangeRight`, `slice`, `some`, -`sortBy`, `take`, `takeRight`, `template`, `trim`, `trimEnd`, `trimStart`, -and `words` +`ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, +`fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, +`sampleSize`, `slice`, `some`, `sortBy`, `take`, `takeRight`, `template`, +`trim`, `trimEnd`, `trimStart`, and `words` #### Since 0.1.0 @@ -2915,7 +2915,7 @@ _.map(users, 'user'); ### `_.orderBy(collection, [iteratees=[_.identity]], [orders])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8510 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.orderby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8546 "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 +2952,7 @@ _.orderBy(users, ['user', 'age'], ['asc', 'desc']); ### `_.partition(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8561 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8597 "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,10 +2998,10 @@ _.partition(users, 'active'); ### `_.reduce(collection, [iteratee=_.identity], [accumulator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8601 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8637 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package") Reduces `collection` to a value which is the accumulated result of running -each element in `collection` through `iteratee`, where each successive +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 value. The iteratee is invoked with four arguments:
@@ -3046,7 +3046,7 @@ _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { ### `_.reduceRight(collection, [iteratee=_.identity], [accumulator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8629 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8665 "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 +3077,7 @@ _.reduceRight(array, function(flattened, other) { ### `_.reject(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8670 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8706 "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 +3120,7 @@ _.reject(users, 'active'); ### `_.sample(collection)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8692 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8728 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package") Gets a random element from `collection`. @@ -3143,8 +3143,8 @@ _.sample([1, 2, 3, 4]); -### `_.sampleSize(collection, [n=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8718 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.samplesize "See the npm package") +### `_.sampleSize(collection, [n=1])` +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8755 "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`. @@ -3153,7 +3153,7 @@ size of `collection`. 4.0.0 #### Arguments 1. `collection` *(Array|Object)*: The collection to sample. -2. `[n=0]` *(number)*: The number of elements to sample. +2. `[n=1]` *(number)*: The number of elements to sample. #### Returns *(Array)*: Returns the random elements. @@ -3173,7 +3173,7 @@ _.sampleSize([1, 2, 3], 4); ### `_.shuffle(collection)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8751 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8792 "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 +3198,7 @@ _.shuffle([1, 2, 3, 4]); ### `_.size(collection)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8776 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8817 "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 +3229,7 @@ _.size('pebbles'); ### `_.some(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8830 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8871 "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,10 +3273,10 @@ _.some(users, 'active'); ### `_.sortBy(collection, [iteratees=[_.identity]])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8873 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8914 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package") Creates an array of elements, sorted in ascending order by the results of -running each element in a collection through each iteratee. This method +running each element in a collection thru each iteratee. This method performs a stable sort, that is, it preserves the original sort order of equal elements. The iteratees are invoked with one argument: *(value)*. @@ -3322,7 +3322,7 @@ _.sortBy(users, 'user', function(o) { ### `_.now()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8905 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8946 "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 +3352,7 @@ _.defer(function(stamp) { ### `_.after(n, func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8933 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L8974 "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,10 +3386,10 @@ _.forEach(saves, function(type) { ### `_.ary(func, [n=func.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8962 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9003 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package") -Creates a function that accepts up to `n` arguments, ignoring any -additional arguments. +Creates a function that invokes `func`, with up to `n` arguments, +ignoring any additional arguments. #### Since 3.0.0 @@ -3412,7 +3412,7 @@ _.map(['6', '8', '10'], _.ary(parseInt, 1)); ### `_.before(n, func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L8985 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9026 "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,11 +3439,10 @@ jQuery(element).on('click', _.before(5, addContactToList)); ### `_.bind(func, thisArg, [partials])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9038 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9078 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package") Creates a function that invokes `func` with the `this` binding of `thisArg` -and prepends any additional `_.bind` arguments to those provided to the -bound function. +and `partials` prepended to the arguments it receives.

The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, @@ -3487,10 +3486,10 @@ bound('hi'); ### `_.bindKey(object, key, [partials])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9092 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9132 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package") -Creates a function that invokes the method at `object[key]` and prepends -any additional `_.bindKey` arguments to those provided to the bound function. +Creates a function that invokes the method at `object[key]` with `partials` +prepended to the arguments it receives.

This method differs from `_.bind` by allowing bound functions to reference @@ -3544,7 +3543,7 @@ bound('hi'); ### `_.curry(func, [arity=func.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9142 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9182 "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 @@ -3596,7 +3595,7 @@ curried(1)(_, 3)(2); ### `_.curryRight(func, [arity=func.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9187 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9227 "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`. @@ -3645,7 +3644,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.7.0/lodash.js#L9244 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9284 "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 @@ -3704,7 +3703,7 @@ jQuery(window).on('popstate', debounced.cancel); ### `_.defer(func, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9379 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9419 "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. @@ -3732,7 +3731,7 @@ _.defer(function(text) { ### `_.delay(func, wait, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9402 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9442 "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. @@ -3761,7 +3760,7 @@ _.delay(function(text) { ### `_.flip(func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9424 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9464 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package") Creates a function that invokes `func` with arguments reversed. @@ -3789,7 +3788,7 @@ flipped('a', 'b', 'c', 'd'); ### `_.memoize(func, [resolver])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9472 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9512 "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 @@ -3844,7 +3843,7 @@ _.memoize.Cache = WeakMap; ### `_.negate(predicate)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9515 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9555 "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 @@ -3874,7 +3873,7 @@ _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); ### `_.once(func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9542 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9582 "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 @@ -3902,7 +3901,7 @@ initialize(); ### `_.overArgs(func, [transforms])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9578 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.overargs "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9618 "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`. @@ -3911,7 +3910,7 @@ corresponding `transforms`. 4.0.0 #### Arguments 1. `func` *(Function)*: The function to wrap. -2. `[transforms]` *(...(Function|Function[]))*: The functions to transform +2. `[transforms]` *(...Function)*: The functions to transform arguments, specified individually or in arrays. #### Returns @@ -3944,11 +3943,11 @@ func(10, 5); ### `_.partial(func, [partials])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9626 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9666 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package") -Creates a function that invokes `func` with `partial` arguments prepended -to those provided to the new function. This method is like `_.bind` except -it does **not** alter the `this` binding. +Creates a function that invokes `func` with `partials` prepended to the +arguments it receives. This method is like `_.bind` except it does **not** +alter the `this` binding.

The `_.partial.placeholder` value, which defaults to `_` in monolithic @@ -3989,10 +3988,10 @@ greetFred('hi'); ### `_.partialRight(func, [partials])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9663 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9703 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package") This method is like `_.partial` except that partially applied arguments -are appended to those provided to the new function. +are appended to the arguments it receives.

The `_.partialRight.placeholder` value, which defaults to `_` in monolithic @@ -4033,10 +4032,10 @@ sayHelloTo('fred'); ### `_.rearg(func, indexes)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9691 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9731 "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 +to the specified `indexes` where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on. @@ -4065,7 +4064,7 @@ rearged('b', 'c', 'a') ### `_.rest(func, [start=func.length-1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9720 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9760 "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 @@ -4101,11 +4100,11 @@ say('hello', 'fred', 'barney', 'pebbles'); ### `_.spread(func, [start=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9783 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9823 "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 -[`Function#apply`](https://es5.github.io/#x15.3.4.3). +[`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply).

**Note:** This method is based on the @@ -4146,7 +4145,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.7.0/lodash.js#L9840 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9880 "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` @@ -4197,7 +4196,7 @@ jQuery(window).on('popstate', throttled.cancel); ### `_.unary(func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9873 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unary "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9913 "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. @@ -4222,7 +4221,7 @@ _.map(['6', '8', '10'], _.unary(parseInt)); ### `_.wrap(value, [wrapper=identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9899 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9939 "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 @@ -4260,7 +4259,7 @@ p('fred, barney, & pebbles'); ### `_.castArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9939 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.castarray "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L9979 "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. @@ -4303,7 +4302,7 @@ console.log(_.castArray(array) === array); ### `_.clone(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L9972 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10012 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package") Creates a shallow clone of `value`.
@@ -4339,7 +4338,7 @@ console.log(shallow[0] === objects[0]); ### `_.cloneDeep(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10027 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10067 "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`. @@ -4366,7 +4365,7 @@ console.log(deep[0] === objects[0]); ### `_.cloneDeepWith(value, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10058 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10098 "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`. @@ -4403,7 +4402,7 @@ console.log(el.childNodes.length); ### `_.cloneWith(value, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10006 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonewith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10046 "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` @@ -4443,7 +4442,7 @@ console.log(el.childNodes.length); ### `_.eq(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10094 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.eq "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10134 "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) @@ -4485,7 +4484,7 @@ _.eq(NaN, NaN); ### `_.gt(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10120 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10160 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package") Checks if `value` is greater than `other`. @@ -4516,7 +4515,7 @@ _.gt(1, 3); ### `_.gte(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10146 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.gte "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10186 "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`. @@ -4547,7 +4546,7 @@ _.gte(1, 3); ### `_.isArguments(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10168 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10208 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") Checks if `value` is likely an `arguments` object. @@ -4574,7 +4573,7 @@ _.isArguments([1, 2, 3]); ### `_.isArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10199 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10239 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") Checks if `value` is classified as an `Array` object. @@ -4607,7 +4606,7 @@ _.isArray(_.noop); ### `_.isArrayBuffer(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10219 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10259 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package") Checks if `value` is classified as an `ArrayBuffer` object. @@ -4634,7 +4633,7 @@ _.isArrayBuffer(new Array(2)); ### `_.isArrayLike(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10248 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraylike "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10288 "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 @@ -4669,7 +4668,7 @@ _.isArrayLike(_.noop); ### `_.isArrayLikeObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10277 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10317 "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. @@ -4703,7 +4702,7 @@ _.isArrayLikeObject(_.noop); ### `_.isBoolean(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10299 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10339 "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. @@ -4730,7 +4729,7 @@ _.isBoolean(null); ### `_.isBuffer(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10321 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10361 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package") Checks if `value` is a buffer. @@ -4757,7 +4756,7 @@ _.isBuffer(new Uint8Array(2)); ### `_.isDate(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10343 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10383 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") Checks if `value` is classified as a `Date` object. @@ -4784,7 +4783,7 @@ _.isDate('Mon April 23 2012'); ### `_.isElement(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10365 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10405 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") Checks if `value` is likely a DOM element. @@ -4811,7 +4810,7 @@ _.isElement(''); ### `_.isEmpty(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10402 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10442 "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.
@@ -4856,7 +4855,7 @@ _.isEmpty({ 'a': 1 }); ### `_.isEqual(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10451 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10491 "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. @@ -4895,7 +4894,7 @@ object === other; ### `_.isEqualWith(value, other, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10488 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequalwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10528 "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 @@ -4937,7 +4936,7 @@ _.isEqualWith(array, other, customizer); ### `_.isError(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10513 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10553 "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. @@ -4965,7 +4964,7 @@ _.isError(Error); ### `_.isFinite(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10548 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10588 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") Checks if `value` is a finite primitive number.
@@ -5002,7 +5001,7 @@ _.isFinite(Infinity); ### `_.isFunction(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10570 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10610 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") Checks if `value` is classified as a `Function` object. @@ -5029,7 +5028,7 @@ _.isFunction(/abc/); ### `_.isInteger(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10604 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10644 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package") Checks if `value` is an integer.
@@ -5066,7 +5065,7 @@ _.isInteger('3'); ### `_.isLength(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10635 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10675 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package") Checks if `value` is a valid array-like length.
@@ -5103,7 +5102,7 @@ _.isLength('3'); ### `_.isMap(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10715 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10756 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package") Checks if `value` is classified as a `Map` object. @@ -5130,7 +5129,7 @@ _.isMap(new WeakMap); ### `_.isMatch(object, source)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10743 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10784 "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 @@ -5165,7 +5164,7 @@ _.isMatch(object, { 'age': 36 }); ### `_.isMatchWith(object, source, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10779 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10820 "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 @@ -5207,14 +5206,15 @@ _.isMatchWith(object, source, customizer); ### `_.isNaN(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10811 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10853 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") Checks if `value` is `NaN`.

-**Note:** This method is not the same as -[`isNaN`](https://es5.github.io/#x15.1.2.4) which returns `true` for -`undefined` and other non-numeric values. +**Note:** This method is based on +[`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as +global [`isNaN`](https://mdn.io/isNaN) which returns `true` for +`undefined` and other non-number values. #### Since 0.1.0 @@ -5245,7 +5245,7 @@ _.isNaN(undefined); ### `_.isNative(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10836 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10878 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") Checks if `value` is a native function. @@ -5272,7 +5272,7 @@ _.isNative(_); ### `_.isNil(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10888 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10927 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package") Checks if `value` is `null` or `undefined`. @@ -5302,7 +5302,7 @@ _.isNil(NaN); ### `_.isNull(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10864 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10903 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") Checks if `value` is `null`. @@ -5329,7 +5329,7 @@ _.isNull(void 0); ### `_.isNumber(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10919 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10958 "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,10 +5366,11 @@ _.isNumber('3'); ### `_.isObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10664 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10705 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") -Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. -*(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)* +Checks if `value` is the +[language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) +of `Object`. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)* #### Since 0.1.0 @@ -5400,7 +5401,7 @@ _.isObject(null); ### `_.isObjectLike(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10693 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10734 "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". @@ -5434,7 +5435,7 @@ _.isObjectLike(null); ### `_.isPlainObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10953 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L10992 "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`. @@ -5472,7 +5473,7 @@ _.isPlainObject(Object.create(null)); ### `_.isRegExp(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L10985 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11024 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") Checks if `value` is classified as a `RegExp` object. @@ -5499,7 +5500,7 @@ _.isRegExp('/abc/'); ### `_.isSafeInteger(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11017 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11056 "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. @@ -5537,7 +5538,7 @@ _.isSafeInteger('3'); ### `_.isSet(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11039 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11078 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package") Checks if `value` is classified as a `Set` object. @@ -5564,7 +5565,7 @@ _.isSet(new WeakSet); ### `_.isString(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11061 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11100 "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. @@ -5591,7 +5592,7 @@ _.isString(1); ### `_.isSymbol(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11084 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.issymbol "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11123 "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. @@ -5618,7 +5619,7 @@ _.isSymbol('abc'); ### `_.isTypedArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11107 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11146 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") Checks if `value` is classified as a typed array. @@ -5645,7 +5646,7 @@ _.isTypedArray([]); ### `_.isUndefined(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11129 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11168 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") Checks if `value` is `undefined`. @@ -5672,7 +5673,7 @@ _.isUndefined(null); ### `_.isWeakMap(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11151 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11190 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package") Checks if `value` is classified as a `WeakMap` object. @@ -5699,7 +5700,7 @@ _.isWeakMap(new Map); ### `_.isWeakSet(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11173 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11212 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package") Checks if `value` is classified as a `WeakSet` object. @@ -5726,7 +5727,7 @@ _.isWeakSet(new Set); ### `_.lt(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11199 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11238 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package") Checks if `value` is less than `other`. @@ -5757,7 +5758,7 @@ _.lt(3, 1); ### `_.lte(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11225 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lte "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11264 "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`. @@ -5788,7 +5789,7 @@ _.lte(3, 1); ### `_.toArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11252 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11291 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") Converts `value` to an array. @@ -5821,7 +5822,7 @@ _.toArray(null); ### `_.toInteger(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11294 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11333 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package") Converts `value` to an integer.
@@ -5858,7 +5859,7 @@ _.toInteger('3'); ### `_.toLength(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11334 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tolength "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11373 "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. @@ -5896,7 +5897,7 @@ _.toLength('3'); ### `_.toNumber(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11361 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11400 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package") Converts `value` to a number. @@ -5929,7 +5930,7 @@ _.toNumber('3'); ### `_.toPlainObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11406 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11445 "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. @@ -5963,7 +5964,7 @@ _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); ### `_.toSafeInteger(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11434 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11473 "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. @@ -5997,7 +5998,7 @@ _.toSafeInteger('3'); ### `_.toString(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11459 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tostring "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11498 "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. @@ -6034,7 +6035,7 @@ _.toString([1, 2, 3]); ### `_.add(augend, addend)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14951 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14996 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") Adds two numbers. @@ -6059,7 +6060,7 @@ _.add(6, 4); ### `_.ceil(number, [precision=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14976 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L15021 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package") Computes `number` rounded up to `precision`. @@ -6090,7 +6091,7 @@ _.ceil(6040, -2); ### `_.divide(dividend, divisor)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14993 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.divide "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L15038 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.divide "See the npm package") Divide two numbers. @@ -6115,7 +6116,7 @@ _.divide(6, 4); ### `_.floor(number, [precision=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L15018 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L15063 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package") Computes `number` rounded down to `precision`. @@ -6146,7 +6147,7 @@ _.floor(4060, -2); ### `_.max(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L15038 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L15083 "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 `undefined` is returned. @@ -6174,7 +6175,7 @@ _.max([]); ### `_.maxBy(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L15068 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.maxby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L15113 "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 @@ -6207,7 +6208,7 @@ _.maxBy(objects, 'n'); ### `_.mean(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L15088 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L15133 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package") Computes the mean of the values in `array`. @@ -6231,7 +6232,7 @@ _.mean([4, 2, 8, 6]); ### `_.meanBy(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L15116 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.meanby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L15161 "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. @@ -6264,7 +6265,7 @@ _.meanBy(objects, 'n'); ### `_.min(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L15138 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L15183 "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 `undefined` is returned. @@ -6292,7 +6293,7 @@ _.min([]); ### `_.minBy(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L15168 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.minby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L15213 "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 @@ -6325,7 +6326,7 @@ _.minBy(objects, 'n'); ### `_.multiply(multiplier, multiplicand)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L15189 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.multiply "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L15234 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.multiply "See the npm package") Multiply two numbers. @@ -6350,7 +6351,7 @@ _.multiply(6, 4); ### `_.round(number, [precision=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L15214 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L15259 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package") Computes `number` rounded to `precision`. @@ -6381,7 +6382,7 @@ _.round(4060, -2); ### `_.subtract(minuend, subtrahend)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L15231 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L15276 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package") Subtract two numbers. @@ -6406,7 +6407,7 @@ _.subtract(6, 4); ### `_.sum(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L15249 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L15294 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") Computes the sum of the values in `array`. @@ -6430,7 +6431,7 @@ _.sum([4, 2, 8, 6]); ### `_.sumBy(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L15279 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sumby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L15324 "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. @@ -6469,7 +6470,7 @@ _.sumBy(objects, 'n'); ### `_.clamp(number, [lower], upper)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12884 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12923 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package") Clamps `number` within the inclusive `lower` and `upper` bounds. @@ -6498,7 +6499,7 @@ _.clamp(10, -5, 5); ### `_.inRange(number, [start=0], end)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12937 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12976 "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`. @@ -6545,7 +6546,7 @@ _.inRange(-3, -2, -6); ### `_.random([lower=0], [upper=1], [floating])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12980 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13019 "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 @@ -6593,7 +6594,7 @@ _.random(1.2, 5.2); ### `_.assign(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11507 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11546 "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. @@ -6635,7 +6636,7 @@ _.assign({ 'a': 1 }, new Foo, new Bar); ### `_.assignIn(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11549 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assignin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11588 "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. @@ -6678,7 +6679,7 @@ _.assignIn({ 'a': 1 }, new Foo, new Bar); ### `_.assignInWith(object, sources, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11587 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assigninwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11626 "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 @@ -6719,7 +6720,7 @@ defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); ### `_.assignWith(object, sources, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11618 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assignwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11657 "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 @@ -6757,7 +6758,7 @@ defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); ### `_.at(object, [paths])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11643 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11682 "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`. @@ -6787,7 +6788,7 @@ _.at(['a', 'b', 'c'], 0, 2); ### `_.create(prototype, [properties])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11681 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11720 "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 @@ -6831,7 +6832,7 @@ circle instanceof Shape; ### `_.defaults(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11706 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11745 "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 @@ -6862,7 +6863,7 @@ _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); ### `_.defaultsDeep(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11730 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11769 "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. @@ -6891,7 +6892,7 @@ _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'ag ### `_.findKey(object, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11771 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11810 "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. @@ -6935,7 +6936,7 @@ _.findKey(users, 'active'); ### `_.findLastKey(object, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11811 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11850 "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. @@ -6979,7 +6980,7 @@ _.findLastKey(users, 'active'); ### `_.forIn(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11842 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11881 "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 @@ -7016,7 +7017,7 @@ _.forIn(new Foo, function(value, key) { ### `_.forInRight(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11873 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11912 "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. @@ -7051,7 +7052,7 @@ _.forInRight(new Foo, function(value, key) { ### `_.forOwn(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11906 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11945 "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:
@@ -7088,7 +7089,7 @@ _.forOwn(new Foo, function(value, key) { ### `_.forOwnRight(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11935 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L11974 "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. @@ -7123,7 +7124,7 @@ _.forOwnRight(new Foo, function(value, key) { ### `_.functions(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11961 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12000 "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`. @@ -7155,7 +7156,7 @@ _.functions(new Foo); ### `_.functionsIn(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L11987 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functionsin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12026 "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`. @@ -7187,7 +7188,7 @@ _.functionsIn(new Foo); ### `_.get(object, path, [defaultValue])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12016 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12055 "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. @@ -7222,7 +7223,7 @@ _.get(object, 'a.b.c', 'default'); ### `_.has(object, path)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12048 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12087 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") Checks if `path` is a direct property of `object`. @@ -7259,7 +7260,7 @@ _.has(other, 'a'); ### `_.hasIn(object, path)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12078 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.hasin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12117 "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`. @@ -7295,7 +7296,7 @@ _.hasIn(object, 'b'); ### `_.invert(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12100 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12139 "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 @@ -7323,11 +7324,11 @@ _.invert(object); ### `_.invertBy(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12131 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invertby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12170 "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` through `iteratee`. -The corresponding inverted value of each inverted key is an array of keys +from the results of running each element of `object` thru `iteratee`. The +corresponding inverted value of each inverted key is an array of keys responsible for generating the inverted value. The iteratee is invoked with one argument: *(value)*. @@ -7359,7 +7360,7 @@ _.invertBy(object, function(value) { ### `_.invoke(object, path, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12157 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12196 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package") Invokes the method at `path` of `object`. @@ -7387,7 +7388,7 @@ _.invoke(object, 'a[0].b.c.slice', 1, 3); ### `_.keys(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12187 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12226 "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`.
@@ -7426,7 +7427,7 @@ _.keys('hi'); ### `_.keysIn(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12230 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12269 "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`.
@@ -7460,12 +7461,12 @@ _.keysIn(new Foo); ### `_.mapKeys(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12271 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapkeys "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12310 "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 -string keyed property of `object` through `iteratee`. The iteratee is -invoked with three arguments: *(value, key, object)*. +string keyed property of `object` thru `iteratee`. The iteratee is invoked +with three arguments: *(value, key, object)*. #### Since 3.8.0 @@ -7490,10 +7491,10 @@ _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { ### `_.mapValues(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12309 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12348 "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` through +Creates an object with the same keys as `object` and values generated +by running each own enumerable string keyed property of `object` thru `iteratee`. The iteratee is invoked with three arguments:
*(value, key, object)*. @@ -7527,7 +7528,7 @@ _.mapValues(users, 'age'); ### `_.merge(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12350 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12389 "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 @@ -7569,7 +7570,7 @@ _.merge(users, ages); ### `_.mergeWith(object, sources, customizer)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12392 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mergewith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12431 "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 @@ -7618,7 +7619,7 @@ _.mergeWith(object, other, customizer); ### `_.omit(object, [props])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12416 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12455 "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 @@ -7647,7 +7648,7 @@ _.omit(object, ['a', 'c']); ### `_.omitBy(object, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12445 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omitby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12484 "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 @@ -7677,7 +7678,7 @@ _.omitBy(object, _.isNumber); ### `_.pick(object, [props])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12470 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12509 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package") Creates an object composed of the picked `object` properties. @@ -7704,7 +7705,7 @@ _.pick(object, ['a', 'c']); ### `_.pickBy(object, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12493 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pickby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12532 "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)*. @@ -7732,7 +7733,7 @@ _.pickBy(object, _.isNumber); ### `_.result(object, path, [defaultValue])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12526 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12565 "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 @@ -7771,7 +7772,7 @@ _.result(object, 'a[0].b.c3', _.constant('default')); ### `_.set(object, path, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12576 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12615 "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 it's created. Arrays are created for missing index properties while objects @@ -7799,7 +7800,7 @@ _.set(object, 'a[0].b.c', 4); console.log(object.a[0].b.c); // => 4 -_.set(object, 'x[0].y.z', 5); +_.set(object, ['x', '0', 'y', 'z'], 5); console.log(object.x[0].y.z); // => 5 ``` @@ -7810,7 +7811,7 @@ console.log(object.x[0].y.z); ### `_.setWith(object, path, value, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12604 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.setwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12643 "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` @@ -7845,7 +7846,7 @@ _.setWith(object, '[0][1]', 'a', Object); ### `_.toPairs(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12632 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topairs "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12671 "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`. @@ -7880,7 +7881,7 @@ _.toPairs(new Foo); ### `_.toPairsIn(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12659 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topairsin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12698 "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`. @@ -7915,14 +7916,14 @@ _.toPairsIn(new Foo); ### `_.transform(object, [iteratee=_.identity], [accumulator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12692 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12731 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package") An alternative to `_.reduce`; this method transforms `object` to a new -`accumulator` object which is the result of running each of its own enumerable -string keyed properties through `iteratee`, with each invocation potentially -mutating the `accumulator` object. The iteratee is invoked with four arguments:
-*(accumulator, value, key, object)*. Iteratee functions may exit iteration -early by explicitly returning `false`. +`accumulator` object which is the result of running each of its own +enumerable string keyed properties thru `iteratee`, with each invocation +potentially mutating the `accumulator` object. The iteratee is invoked +with four arguments: *(accumulator, value, key, object)*. Iteratee functions +may exit iteration early by explicitly returning `false`. #### Since 1.3.0 @@ -7954,7 +7955,7 @@ _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { ### `_.unset(object, path)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12741 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12780 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package") Removes the property at `path` of `object`.
@@ -7979,7 +7980,7 @@ _.unset(object, 'a[0].b.c'); console.log(object); // => { 'a': [{ 'b': {} }] }; -_.unset(object, 'a[0].b.c'); +_.unset(object, ['a', '0', 'b', 'c']); // => true console.log(object); @@ -7992,7 +7993,7 @@ console.log(object); ### `_.update(object, path, updater)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12772 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.update "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12811 "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` @@ -8030,7 +8031,7 @@ console.log(object.x[0].y.z); ### `_.updateWith(object, path, updater, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12800 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.updatewith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12839 "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` @@ -8065,7 +8066,7 @@ _.updateWith(object, '[0][1]', _.constant('a'), Object); ### `_.values(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12831 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12870 "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`.
@@ -8102,7 +8103,7 @@ _.values('hi'); ### `_.valuesIn(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L12859 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L12898 "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`. @@ -8143,7 +8144,7 @@ _.valuesIn(new Foo); ### `_(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L1580 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.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, @@ -8277,7 +8278,7 @@ _.isArray(squares.value()); ### `_.chain(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7645 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7681 "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 @@ -8316,7 +8317,7 @@ var youngest = _ ### `_.tap(value, interceptor)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7674 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7710 "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 @@ -8349,7 +8350,7 @@ _([1, 2, 3]) ### `_.thru(value, interceptor)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7702 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7738 "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 @@ -8382,7 +8383,7 @@ _(' abc ') ### `_.prototype[Symbol.iterator]()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7862 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7898 "View in source") [Ⓣ][1] Enables the wrapper to be iterable. @@ -8408,7 +8409,7 @@ Array.from(wrapped); ### `_.prototype.at([paths])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7726 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7762 "View in source") [Ⓣ][1] This method is the wrapper version of `_.at`. @@ -8437,7 +8438,7 @@ _(['a', 'b', 'c']).at(0, 2).value(); ### `_.prototype.chain()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7778 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7814 "View in source") [Ⓣ][1] Creates a `lodash` wrapper instance with explicit method chain sequences enabled. @@ -8472,7 +8473,7 @@ _(users) ### `_.prototype.commit()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7808 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7844 "View in source") [Ⓣ][1] Executes the chain sequence and returns the wrapped result. @@ -8506,7 +8507,7 @@ console.log(array); ### `_.prototype.next()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7834 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7870 "View in source") [Ⓣ][1] Gets the next value on a wrapped object following the [iterator protocol](https://mdn.io/iteration_protocols#iterator). @@ -8536,7 +8537,7 @@ wrapped.next(); ### `_.prototype.plant(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7890 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7926 "View in source") [Ⓣ][1] Creates a clone of the chain sequence planting `value` as the wrapped value. @@ -8570,7 +8571,7 @@ wrapped.value(); ### `_.prototype.reverse()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7930 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7966 "View in source") [Ⓣ][1] This method is the wrapper version of `_.reverse`.
@@ -8599,7 +8600,7 @@ console.log(array); ### `_.prototype.value()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L7962 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L7998 "View in source") [Ⓣ][1] Executes the chain sequence to resolve the unwrapped value. @@ -8629,7 +8630,7 @@ _([1, 2, 3]).value(); ### `_.camelCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13041 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13080 "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). @@ -8659,7 +8660,7 @@ _.camelCase('__FOO_BAR__'); ### `_.capitalize([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13061 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13100 "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. @@ -8684,7 +8685,7 @@ _.capitalize('FRED'); ### `_.deburr([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13082 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13121 "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) @@ -8711,7 +8712,7 @@ _.deburr('déjà vu'); ### `_.endsWith([string=''], [target], [position=string.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13110 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13149 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") Checks if `string` ends with the given target string. @@ -8743,7 +8744,7 @@ _.endsWith('abc', 'b', 2); ### `_.escape([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13157 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13196 "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. @@ -8791,7 +8792,7 @@ _.escape('fred, barney, & pebbles'); ### `_.escapeRegExp([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13179 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13218 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. @@ -8816,7 +8817,7 @@ _.escapeRegExp('[lodash](https://lodash.com/)'); ### `_.kebabCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13207 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13246 "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). @@ -8847,7 +8848,7 @@ _.kebabCase('__FOO_BAR__'); ### `_.lowerCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13231 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13270 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package") Converts `string`, as space separated words, to lower case. @@ -8877,7 +8878,7 @@ _.lowerCase('__FOO_BAR__'); ### `_.lowerFirst([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13252 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13291 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") Converts the first character of `string` to lower case. @@ -8904,7 +8905,7 @@ _.lowerFirst('FRED'); ### `_.pad([string=''], [length=0], [chars=' '])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13277 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13316 "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`. @@ -8937,7 +8938,7 @@ _.pad('abc', 3); ### `_.padEnd([string=''], [length=0], [chars=' '])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13316 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padend "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13355 "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`. @@ -8970,7 +8971,7 @@ _.padEnd('abc', 3); ### `_.padStart([string=''], [length=0], [chars=' '])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13349 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padstart "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13388 "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`. @@ -9003,7 +9004,7 @@ _.padStart('abc', 3); ### `_.parseInt(string, [radix=10])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13383 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13422 "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 @@ -9036,8 +9037,8 @@ _.map(['6', '08', '10'], _.parseInt); -### `_.repeat([string=''], [n=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13416 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") +### `_.repeat([string=''], [n=1])` +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13456 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") Repeats the given string `n` times. @@ -9045,7 +9046,7 @@ Repeats the given string `n` times. 3.0.0 #### Arguments 1. `[string='']` *(string)*: The string to repeat. -2. `[n=0]` *(number)*: The number of times to repeat the string. +2. `[n=1]` *(number)*: The number of times to repeat the string. #### Returns *(string)*: Returns the repeated string. @@ -9068,7 +9069,7 @@ _.repeat('abc', 0); ### `_.replace([string=''], pattern, replacement)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13439 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13484 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package") Replaces matches for `pattern` in `string` with `replacement`.
@@ -9098,7 +9099,7 @@ _.replace('Hi Fred', 'Fred', 'Barney'); ### `_.snakeCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13467 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13512 "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). @@ -9129,7 +9130,7 @@ _.snakeCase('--FOO-BAR--'); ### `_.split([string=''], separator, [limit])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13490 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13535 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package") Splits `string` by `separator`.
@@ -9159,7 +9160,7 @@ _.split('a-b-c', '-', 2); ### `_.startCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13515 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13560 "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). @@ -9190,7 +9191,7 @@ _.startCase('__FOO_BAR__'); ### `_.startsWith([string=''], [target], [position=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13542 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13587 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") Checks if `string` starts with the given target string. @@ -9222,7 +9223,7 @@ _.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.7.0/lodash.js#L13651 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13696 "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 @@ -9331,7 +9332,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\ ### `_.toLower([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13780 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tolower "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13825 "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). @@ -9362,7 +9363,7 @@ _.toLower('__FOO_BAR__'); ### `_.toUpper([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13805 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toupper "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13850 "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). @@ -9393,7 +9394,7 @@ _.toUpper('__foo_bar__'); ### `_.trim([string=''], [chars=whitespace])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13831 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13876 "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`. @@ -9424,7 +9425,7 @@ _.map([' foo ', ' bar '], _.trim); ### `_.trimEnd([string=''], [chars=whitespace])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13870 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13915 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package") Removes trailing whitespace or specified characters from `string`. @@ -9452,7 +9453,7 @@ _.trimEnd('-_-abc-_-', '_-'); ### `_.trimStart([string=''], [chars=whitespace])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13907 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L13952 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package") Removes leading whitespace or specified characters from `string`. @@ -9480,7 +9481,7 @@ _.trimStart('-_-abc-_-', '_-'); ### `_.truncate([string=''], [options={}], [options.length=30], [options.omission='...'], [options.separator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L13962 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.truncate "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14007 "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 @@ -9527,7 +9528,7 @@ _.truncate('hi-diddly-ho there, neighborino', { ### `_.unescape([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14037 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14082 "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 @@ -9557,7 +9558,7 @@ _.unescape('fred, barney, & pebbles'); ### `_.upperCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14064 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14109 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package") Converts `string`, as space separated words, to upper case. @@ -9587,7 +9588,7 @@ _.upperCase('__foo_bar__'); ### `_.upperFirst([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14085 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14130 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") Converts the first character of `string` to upper case. @@ -9614,7 +9615,7 @@ _.upperFirst('FRED'); ### `_.words([string=''], [pattern])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14106 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14151 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") Splits `string` into an array of its words. @@ -9648,7 +9649,7 @@ _.words('fred, barney, & pebbles', /[^, ]+/g); ### `_.attempt(func, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14140 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14185 "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. @@ -9680,7 +9681,7 @@ if (_.isError(elements)) { ### `_.bindAll(object, methodNames)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14175 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14220 "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. @@ -9717,7 +9718,7 @@ jQuery(element).on('click', view.onClick); ### `_.cond(pairs)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14211 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.cond "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14256 "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 @@ -9756,7 +9757,7 @@ func({ 'a': '1', 'b': '2' }); ### `_.conforms(source)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14254 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.conforms "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14299 "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 @@ -9787,7 +9788,7 @@ _.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) })); ### `_.constant(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14275 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14320 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") Creates a function that returns `value`. @@ -9814,7 +9815,7 @@ getter() === object; ### `_.flow([funcs])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14302 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14347 "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 @@ -9845,7 +9846,7 @@ addSquare(1, 2); ### `_.flowRight([funcs])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14324 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14369 "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. @@ -9875,7 +9876,7 @@ addSquare(1, 2); ### `_.identity(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14342 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14387 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") This method returns the first argument given to it. @@ -9901,7 +9902,7 @@ _.identity(object) === object; ### `_.iteratee([func=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14388 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iteratee "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14433 "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 @@ -9953,7 +9954,7 @@ _.filter(['abc', 'def'], /ef/); ### `_.matches(source)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14416 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14461 "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 @@ -9988,7 +9989,7 @@ _.filter(users, _.matches({ 'age': 40, 'active': false })); ### `_.matchesProperty(path, srcValue)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14444 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14489 "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 @@ -10023,7 +10024,7 @@ _.find(users, _.matchesProperty('user', 'fred')); ### `_.method(path, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14472 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14517 "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. @@ -10057,7 +10058,7 @@ _.map(objects, _.method(['a', 'b', 'c'])); ### `_.methodOf(object, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14501 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14546 "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 @@ -10090,7 +10091,7 @@ _.map([['a', '2'], ['c', '0']], _.methodOf(object)); ### `_.mixin([object=lodash], source, [options={}], [options.chain=true])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14543 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14588 "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 @@ -10137,7 +10138,7 @@ _('fred').vowels(); ### `_.noConflict()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14592 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14637 "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. @@ -10158,7 +10159,7 @@ var lodash = _.noConflict(); ### `_.noop()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14614 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14659 "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. @@ -10179,7 +10180,7 @@ _.noop(object) === undefined; ### `_.nthArg([n=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14634 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14679 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package") Creates a function that returns its nth argument. @@ -10205,15 +10206,15 @@ func('a', 'b', 'c'); ### `_.over(iteratees)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14658 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14703 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package") -Creates a function that invokes `iteratees` with the arguments provided -to the created function and returns their results. +Creates a function that invokes `iteratees` with the arguments it receives +and returns their results. #### Since 4.0.0 #### Arguments -1. `iteratees` *(...(Function|Function[]))*: The iteratees to invoke. +1. `iteratees` *(...Function)*: The iteratees to invoke. #### Returns *(Function)*: Returns the new function. @@ -10232,15 +10233,15 @@ func(1, 2, 3, 4); ### `_.overEvery(predicates)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14683 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.overevery "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14728 "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 provided to the created function. +truthy when invoked with the arguments it receives. #### Since 4.0.0 #### Arguments -1. `predicates` *(...(Function|Function[]))*: The predicates to check. +1. `predicates` *(...Function)*: The predicates to check. #### Returns *(Function)*: Returns the new function. @@ -10265,15 +10266,15 @@ func(NaN); ### `_.overSome(predicates)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14708 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.oversome "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14753 "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 provided to the created function. +truthy when invoked with the arguments it receives. #### Since 4.0.0 #### Arguments -1. `predicates` *(...(Function|Function[]))*: The predicates to check. +1. `predicates` *(...Function)*: The predicates to check. #### Returns *(Function)*: Returns the new function. @@ -10298,7 +10299,7 @@ func(NaN); ### `_.property(path)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14732 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14777 "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. @@ -10330,7 +10331,7 @@ _.map(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); ### `_.propertyOf(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14757 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14802 "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`. @@ -10361,7 +10362,7 @@ _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); ### `_.range([start=0], end, [step=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14803 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14848 "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 @@ -10412,7 +10413,7 @@ _.range(0); ### `_.rangeRight([start=0], end, [step=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14840 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rangeright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14885 "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. @@ -10457,7 +10458,7 @@ _.rangeRight(0); ### `_.runInContext([context=root])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L1366 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.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. @@ -10503,7 +10504,7 @@ var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; ### `_.times(n, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14861 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14906 "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)*. @@ -10532,7 +10533,7 @@ _.times(3, String); ### `_.toPath(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14905 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14950 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package") Converts `value` to a property path array. @@ -10568,7 +10569,7 @@ console.log(path === newPath); ### `_.uniqueId([prefix=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L14929 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L14974 "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. @@ -10601,7 +10602,7 @@ _.uniqueId(); ### `_.VERSION` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L15615 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L15660 "View in source") [Ⓣ][1] (string): The semantic version number. @@ -10612,7 +10613,7 @@ _.uniqueId(); ### `_.templateSettings` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L1625 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.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 @@ -10625,7 +10626,7 @@ alternative delimiters. ### `_.templateSettings.escape` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L1633 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L1640 "View in source") [Ⓣ][1] (RegExp): Used to detect `data` property values to be HTML-escaped. @@ -10636,7 +10637,7 @@ alternative delimiters. ### `_.templateSettings.evaluate` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L1641 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L1648 "View in source") [Ⓣ][1] (RegExp): Used to detect code to be evaluated. @@ -10647,7 +10648,7 @@ alternative delimiters. ### `_.templateSettings.imports` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L1665 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L1672 "View in source") [Ⓣ][1] (Object): Used to import variables into the compiled template. @@ -10658,7 +10659,7 @@ alternative delimiters. ### `_.templateSettings.interpolate` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L1649 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L1656 "View in source") [Ⓣ][1] (RegExp): Used to detect `data` property values to inject. @@ -10669,7 +10670,7 @@ alternative delimiters. ### `_.templateSettings.variable` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L1657 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L1664 "View in source") [Ⓣ][1] (string): Used to reference the data object in the template text. @@ -10686,7 +10687,7 @@ alternative delimiters. ### `_.templateSettings.imports._` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.7.0/lodash.js#L1673 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.8.0/lodash.js#L1680 "View in source") [Ⓣ][1] A reference to the `lodash` function. diff --git a/lodash.js b/lodash.js index 99bcd60ae8..8bf41a6296 100644 --- a/lodash.js +++ b/lodash.js @@ -1,6 +1,6 @@ /** * @license - * lodash 4.7.0 + * lodash 4.8.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.7.0'; + var VERSION = '4.8.0'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; diff --git a/package.json b/package.json index 650aac64f3..c5007fc9d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "4.7.1-pre", + "version": "4.8.0", "license": "MIT", "private": true, "main": "lodash.js", From 792bfbb604d55ea0c56c59e8c65d953fffb1d7a2 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 3 Apr 2016 22:44:11 -0700 Subject: [PATCH 42/42] Bump to v4.8.0. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4b8e396867..7445be427c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v4.7.0 +# lodash v4.8.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.7.0/LICENSE) & supports [modern environments](#support).
+Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.8.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.7.0/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.7.0/dist/lodash.core.min.js)) - * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.7.0/dist/lodash.js) ([~22 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.7.0/dist/lodash.min.js)) + * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.8.0/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.8.0/dist/lodash.core.min.js)) + * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.8.0/dist/lodash.js) ([~22 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.8.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.7.0-npm/fp) + * [lodash/fp](https://github.com/lodash/lodash/tree/4.8.0-npm/fp) ## Further Reading - * [Contributing](https://github.com/lodash/lodash/blob/4.7.0/.github/CONTRIBUTING.md) + * [Contributing](https://github.com/lodash/lodash/blob/4.8.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)