From b281ddecc4f62fe54676a359e63474cf6be3b44e Mon Sep 17 00:00:00 2001 From: max Date: Tue, 17 Sep 2019 07:31:36 +0300 Subject: [PATCH 01/22] change documentation, show clearly how sortBy work with two iteratees (#4467) --- lodash.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lodash.js b/lodash.js index 9b95dfefe8..0770ff5671 100644 --- a/lodash.js +++ b/lodash.js @@ -9916,15 +9916,15 @@ * var users = [ * { 'user': 'fred', 'age': 48 }, * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, + * { 'user': 'fred', 'age': 30 }, * { 'user': 'barney', 'age': 34 } * ]; * * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] * * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] */ var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { From 602cc3f03d99a1f69143c61ad4d5efacf6a47469 Mon Sep 17 00:00:00 2001 From: Graeme Yeates Date: Fri, 4 Oct 2019 13:23:55 -0400 Subject: [PATCH 02/22] (4.17) Short circuit sortedIndexBy methods for empty arrays (#4497) --- lodash.js | 11 +++++++---- test/test.js | 10 ++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/lodash.js b/lodash.js index 0770ff5671..75868f2145 100644 --- a/lodash.js +++ b/lodash.js @@ -4129,11 +4129,14 @@ * into `array`. */ function baseSortedIndexBy(array, value, iteratee, retHighest) { - value = iteratee(value); - var low = 0, - high = array == null ? 0 : array.length, - valIsNaN = value !== value, + high = array == null ? 0 : array.length; + if (high === 0) { + return 0; + } + + value = iteratee(value); + var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined; diff --git a/test/test.js b/test/test.js index 72c71a9936..b6c3533107 100644 --- a/test/test.js +++ b/test/test.js @@ -20998,6 +20998,16 @@ assert.strictEqual(actual, 1); }); + QUnit.test('`_.' + methodName + '` should avoid calling iteratee when length is 0', function(assert) { + var objects = [], + iteratee = function() { + throw new Error; + }, + actual = func(objects, { 'x': 50 }, iteratee); + + assert.strictEqual(actual, 0); + }); + QUnit.test('`_.' + methodName + '` should support arrays larger than `MAX_ARRAY_LENGTH / 2`', function(assert) { assert.expect(12); From 659e8c019ccaf0515fb3d47ceb50cb67abd18885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipi=C5=84ski?= Date: Thu, 10 Oct 2019 22:04:37 +0200 Subject: [PATCH 03/22] Ensure `orderBy` will accept iteratee path arrays #4438 (#4513) --- lodash.js | 15 ++++++++++++++- test/test.js | 19 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/lodash.js b/lodash.js index 75868f2145..da22f31126 100644 --- a/lodash.js +++ b/lodash.js @@ -3719,8 +3719,21 @@ * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + var index = -1; - iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); var result = baseMap(collection, function(value, key, collection) { var criteria = arrayMap(iteratees, function(iteratee) { diff --git a/test/test.js b/test/test.js index b6c3533107..fed616b280 100644 --- a/test/test.js +++ b/test/test.js @@ -16020,6 +16020,14 @@ { 'a': 'y', 'b': 2 } ]; + var nestedObj = [ + { id: '4', address: { zipCode: 4, streetName: 'Beta' } }, + { id: '3', address: { zipCode: 3, streetName: 'Alpha' } }, + { id: '1', address: { zipCode: 1, streetName: 'Alpha' } }, + { id: '2', address: { zipCode: 2, streetName: 'Alpha' } }, + { id: '5', address: { zipCode: 4, streetName: 'Alpha' } }, + ]; + QUnit.test('should sort by a single property by a specified order', function(assert) { assert.expect(1); @@ -16027,6 +16035,17 @@ assert.deepEqual(actual, [objects[1], objects[3], objects[0], objects[2]]); }); + QUnit.test('should sort by nested key in array format', function(assert) { + assert.expect(1); + + var actual = _.orderBy( + nestedObj, + [['address', 'zipCode'], ['address.streetName']], + ['asc', 'desc'], + ); + assert.deepEqual(actual, [nestedObj[2], nestedObj[3], nestedObj[1], nestedObj[0], nestedObj[4]]); + }); + QUnit.test('should sort by multiple properties by specified orders', function(assert) { assert.expect(1); From 94c3a8133cb4fcdb50db72b4fd14dd884b195cd5 Mon Sep 17 00:00:00 2001 From: Artemy Tregubenko Date: Sun, 13 Oct 2019 19:54:27 +0200 Subject: [PATCH 04/22] Document matches* shorthands for over* methods (#4510) (#4514) --- lodash.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/lodash.js b/lodash.js index da22f31126..d8b959a17f 100644 --- a/lodash.js +++ b/lodash.js @@ -9183,6 +9183,10 @@ * // The `_.property` iteratee shorthand. * _.filter(users, 'active'); * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] */ function filter(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; @@ -15560,6 +15564,9 @@ * values against any array or object value, respectively. See `_.isEqual` * for a list of supported value comparisons. * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * * @static * @memberOf _ * @since 3.0.0 @@ -15575,6 +15582,10 @@ * * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + * + * // Checking for several possible values + * _.filter(users, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); @@ -15589,6 +15600,9 @@ * `srcValue` values against any array or object value, respectively. See * `_.isEqual` for a list of supported value comparisons. * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * * @static * @memberOf _ * @since 3.2.0 @@ -15605,6 +15619,10 @@ * * _.find(objects, _.matchesProperty('a', 4)); * // => { 'a': 4, 'b': 5, 'c': 6 } + * + * // Checking for several possible values + * _.filter(users, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ function matchesProperty(path, srcValue) { return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); @@ -15828,6 +15846,10 @@ * Creates a function that checks if **all** of the `predicates` return * truthy when invoked with the arguments it receives. * + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. + * * @static * @memberOf _ * @since 4.0.0 @@ -15854,6 +15876,10 @@ * Creates a function that checks if **any** of the `predicates` return * truthy when invoked with the arguments it receives. * + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. + * * @static * @memberOf _ * @since 4.0.0 @@ -15873,6 +15899,9 @@ * * func(NaN); * // => false + * + * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }]) + * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]]) */ var overSome = createOver(arraySome); From 0cec225778d4ac26c2bac95031ecc92a94f08bbb Mon Sep 17 00:00:00 2001 From: Chinedum Ukejianya Date: Wed, 16 Oct 2019 17:43:11 -0400 Subject: [PATCH 05/22] Fix lodash.isEqual for circular references (#4320) (#4515) --- lodash.js | 18 ++++++++++-------- test/test.js | 20 ++++++++++++++++++-- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/lodash.js b/lodash.js index d8b959a17f..cbf3b38487 100644 --- a/lodash.js +++ b/lodash.js @@ -5634,10 +5634,11 @@ if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } - // Assume cyclic values are equal. - var stacked = stack.get(array); - if (stacked && stack.get(other)) { - return stacked == other; + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; } var index = -1, result = true, @@ -5799,10 +5800,11 @@ return false; } } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked && stack.get(other)) { - return stacked == other; + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; } var result = true; stack.set(object, other); diff --git a/test/test.js b/test/test.js index fed616b280..2bfb54669d 100644 --- a/test/test.js +++ b/test/test.js @@ -9741,7 +9741,7 @@ }); QUnit.test('should compare arrays with circular references', function(assert) { - assert.expect(4); + assert.expect(6); var array1 = [], array2 = []; @@ -9766,6 +9766,14 @@ array2 = ['a', ['a', 'b', 'c'], 'c']; assert.strictEqual(_.isEqual(array1, array2), false); + + array1 = [[[]]]; + array1[0][0][0] = array1; + array2 = []; + array2[0] = array2; + + assert.strictEqual(_.isEqual(array1, array2), false); + assert.strictEqual(_.isEqual(array2, array1), false); }); QUnit.test('should have transitive equivalence for circular references of arrays', function(assert) { @@ -9783,7 +9791,7 @@ }); QUnit.test('should compare objects with circular references', function(assert) { - assert.expect(4); + assert.expect(6); var object1 = {}, object2 = {}; @@ -9808,6 +9816,14 @@ object2 = { 'a': 1, 'b': { 'a': 1, 'b': 2, 'c': 3 }, 'c': 3 }; assert.strictEqual(_.isEqual(object1, object2), false); + + object1 = {self: {self: {self: {}}}}; + object1.self.self.self = object1; + object2 = {self: {}}; + object2.self = object2; + + assert.strictEqual(_.isEqual(object1, object2), false); + assert.strictEqual(_.isEqual(object2, object1), false); }); QUnit.test('should have transitive equivalence for circular references of objects', function(assert) { From e7b28ea6cb17b4ca021e7c9d66218c8c89782f32 Mon Sep 17 00:00:00 2001 From: Alex Brasetvik Date: Thu, 4 Jun 2020 08:36:12 +0200 Subject: [PATCH 06/22] Sanitize sourceURL so it cannot affect evaled code (#4518) --- lodash.js | 8 +++----- test/test.js | 12 ++++++++++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/lodash.js b/lodash.js index cbf3b38487..c724b6b8fd 100644 --- a/lodash.js +++ b/lodash.js @@ -14821,11 +14821,11 @@ // Use a sourceURL for easier debugging. // The sourceURL gets injected into the source that's eval-ed, so be careful - // with lookup (in case of e.g. prototype pollution), and strip newlines if any. - // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection. + // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in + // and escape the comment, thus injecting code that gets evaled. var sourceURL = '//# sourceURL=' + (hasOwnProperty.call(options, 'sourceURL') - ? (options.sourceURL + '').replace(/[\r\n]/g, ' ') + ? (options.sourceURL + '').replace(/\s/g, ' ') : ('lodash.templateSources[' + (++templateCounter) + ']') ) + '\n'; @@ -14858,8 +14858,6 @@ // If `variable` is not specified wrap a with-statement around the generated // code to add the data object to the top of the scope chain. - // Like with sourceURL, we take care to not check the option's prototype, - // as this configuration is a code injection vector. var variable = hasOwnProperty.call(options, 'variable') && options.variable; if (!variable) { source = 'with (obj) {\n' + source + '\n}\n'; diff --git a/test/test.js b/test/test.js index 2bfb54669d..e9507a304a 100644 --- a/test/test.js +++ b/test/test.js @@ -22641,6 +22641,18 @@ assert.deepEqual(actual, expected); }); + QUnit.test('should not let a sourceURL inject code', function(assert) { + assert.expect(1); + + var actual, + expected = 'no error'; + try { + actual = _.template(expected, {'sourceURL': '\u2028\u2029\n!this would err if it was executed!'})(); + } catch (e) {} + + assert.equal(actual, expected); + }); + QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) { assert.expect(1); From c84fe82760fb2d3e03a63379b297a1cc1a2fce12 Mon Sep 17 00:00:00 2001 From: Jakub Mikulas Date: Thu, 2 Jul 2020 23:47:49 +0200 Subject: [PATCH 07/22] fix(zipObjectDeep): prototype pollution (#4759) --- lodash.js | 4 ++++ test/test.js | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/lodash.js b/lodash.js index c724b6b8fd..8b0caea3f6 100644 --- a/lodash.js +++ b/lodash.js @@ -3990,6 +3990,10 @@ var key = toKey(path[index]), newValue = value; + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; diff --git a/test/test.js b/test/test.js index e9507a304a..73a5875baa 100644 --- a/test/test.js +++ b/test/test.js @@ -25799,6 +25799,39 @@ }); }); + // zipObjectDeep prototype pollution + ['__proto__', 'constructor', 'prototype'].forEach(function (keyToTest) { + QUnit.test('zipObjectDeep is not setting ' + keyToTest + ' on global', function (assert) { + assert.expect(1); + + _.zipObjectDeep([keyToTest + '.a'], ['newValue']); + // Can't access plain `a` as it's not defined and test fails + assert.notEqual(root['a'], 'newValue'); + }); + + QUnit.test('zipObjectDeep is not overwriting ' + keyToTest + ' on vars', function (assert) { + assert.expect(3); + + const b = 'oldValue' + _.zipObjectDeep([keyToTest + '.b'], ['newValue']); + assert.equal(b, 'oldValue'); + assert.notEqual(root['b'], 'newValue'); + + // ensure nothing was created + assert.notOk(root['b']); + }); + + QUnit.test('zipObjectDeep is not overwriting global.' + keyToTest, function (assert) { + assert.expect(2); + + _.zipObjectDeep([root + '.' + keyToTest + '.c'], ['newValue']); + assert.notEqual(root['c'], 'newValue'); + + // ensure nothing was created + assert.notOk(root['c']); + }); + }); + /*--------------------------------------------------------------------------*/ QUnit.module('lodash.zipWith'); From 3a3b0fd339c2109563f7e8167dc95265ed82ef3e Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Wed, 8 Jul 2020 09:44:35 +0200 Subject: [PATCH 08/22] Bump to v4.17.16 --- README.md | 8 +- dist/lodash.js | 91 +++++++++++---- dist/lodash.min.js | 270 +++++++++++++++++++++++---------------------- 3 files changed, 210 insertions(+), 159 deletions(-) diff --git a/README.md b/README.md index c0a2bb834f..e41f0323f2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v4.17.15 +# lodash v4.17.16 [Site](https://lodash.com/) | [Docs](https://lodash.com/docs) | @@ -20,11 +20,11 @@ $ lodash core -o ./dist/lodash.core.js ## Download - * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.17.15/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.15/dist/lodash.core.min.js)) - * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.17.15/dist/lodash.js) ([~24 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.15/dist/lodash.min.js)) + * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.17.16/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.16/dist/lodash.core.min.js)) + * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.17.16/dist/lodash.js) ([~24 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.16/dist/lodash.min.js)) * [CDN copies](https://www.jsdelivr.com/projects/lodash) -Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.17.15/LICENSE) & supports modern environments.
+Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.17.16/LICENSE) & supports modern environments.
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you. ## Installation diff --git a/dist/lodash.js b/dist/lodash.js index 9b95dfefe8..8b0caea3f6 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -3719,8 +3719,21 @@ * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + var index = -1; - iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); var result = baseMap(collection, function(value, key, collection) { var criteria = arrayMap(iteratees, function(iteratee) { @@ -3977,6 +3990,10 @@ var key = toKey(path[index]), newValue = value; + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; @@ -4129,11 +4146,14 @@ * into `array`. */ function baseSortedIndexBy(array, value, iteratee, retHighest) { - value = iteratee(value); - var low = 0, - high = array == null ? 0 : array.length, - valIsNaN = value !== value, + high = array == null ? 0 : array.length; + if (high === 0) { + return 0; + } + + value = iteratee(value); + var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined; @@ -5618,10 +5638,11 @@ if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } - // Assume cyclic values are equal. - var stacked = stack.get(array); - if (stacked && stack.get(other)) { - return stacked == other; + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; } var index = -1, result = true, @@ -5783,10 +5804,11 @@ return false; } } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked && stack.get(other)) { - return stacked == other; + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; } var result = true; stack.set(object, other); @@ -9167,6 +9189,10 @@ * // The `_.property` iteratee shorthand. * _.filter(users, 'active'); * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] */ function filter(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; @@ -9916,15 +9942,15 @@ * var users = [ * { 'user': 'fred', 'age': 48 }, * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, + * { 'user': 'fred', 'age': 30 }, * { 'user': 'barney', 'age': 34 } * ]; * * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] * * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] */ var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { @@ -14799,11 +14825,11 @@ // Use a sourceURL for easier debugging. // The sourceURL gets injected into the source that's eval-ed, so be careful - // with lookup (in case of e.g. prototype pollution), and strip newlines if any. - // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection. + // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in + // and escape the comment, thus injecting code that gets evaled. var sourceURL = '//# sourceURL=' + (hasOwnProperty.call(options, 'sourceURL') - ? (options.sourceURL + '').replace(/[\r\n]/g, ' ') + ? (options.sourceURL + '').replace(/\s/g, ' ') : ('lodash.templateSources[' + (++templateCounter) + ']') ) + '\n'; @@ -14836,8 +14862,6 @@ // If `variable` is not specified wrap a with-statement around the generated // code to add the data object to the top of the scope chain. - // Like with sourceURL, we take care to not check the option's prototype, - // as this configuration is a code injection vector. var variable = hasOwnProperty.call(options, 'variable') && options.variable; if (!variable) { source = 'with (obj) {\n' + source + '\n}\n'; @@ -15544,6 +15568,9 @@ * values against any array or object value, respectively. See `_.isEqual` * for a list of supported value comparisons. * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * * @static * @memberOf _ * @since 3.0.0 @@ -15559,6 +15586,10 @@ * * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + * + * // Checking for several possible values + * _.filter(users, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); @@ -15573,6 +15604,9 @@ * `srcValue` values against any array or object value, respectively. See * `_.isEqual` for a list of supported value comparisons. * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * * @static * @memberOf _ * @since 3.2.0 @@ -15589,6 +15623,10 @@ * * _.find(objects, _.matchesProperty('a', 4)); * // => { 'a': 4, 'b': 5, 'c': 6 } + * + * // Checking for several possible values + * _.filter(users, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ function matchesProperty(path, srcValue) { return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); @@ -15812,6 +15850,10 @@ * Creates a function that checks if **all** of the `predicates` return * truthy when invoked with the arguments it receives. * + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. + * * @static * @memberOf _ * @since 4.0.0 @@ -15838,6 +15880,10 @@ * Creates a function that checks if **any** of the `predicates` return * truthy when invoked with the arguments it receives. * + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. + * * @static * @memberOf _ * @since 4.0.0 @@ -15857,6 +15903,9 @@ * * func(NaN); * // => false + * + * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }]) + * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]]) */ var overSome = createOver(arraySome); diff --git a/dist/lodash.min.js b/dist/lodash.min.js index 13ec307dac..6618dd7c11 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -1,137 +1,139 @@ /** * @license - * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ -;(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u"']/g,G=RegExp(V.source),H=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nn=/^\w*$/,tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rn=/[\\^$.*+?()[\]{}|]/g,en=RegExp(rn.source),un=/^\s+|\s+$/g,on=/^\s+/,fn=/\s+$/,cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,an=/\{\n\/\* \[wrapped with (.+)\] \*/,ln=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hn=/\\(\\)?/g,pn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_n=/\w*$/,vn=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,dn=/^\[object .+?Constructor\]$/,yn=/^0o[0-7]+$/i,bn=/^(?:0|[1-9]\d*)$/,xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jn=/($^)/,wn=/['\n\r\u2028\u2029\\]/g,mn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",An="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+mn,En="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",kn=RegExp("['\u2019]","g"),Sn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),On=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+En+mn,"g"),In=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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\\u2000-\\u206f \\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])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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\\u2000-\\u206f \\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\\u2000-\\u206f \\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])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",An].join("|"),"g"),Rn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wn="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Bn={}; -Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=true,Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object Boolean]"]=Bn["[object DataView]"]=Bn["[object Date]"]=Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object WeakMap]"]=false; -var Ln={};Ln["[object Arguments]"]=Ln["[object Array]"]=Ln["[object ArrayBuffer]"]=Ln["[object DataView]"]=Ln["[object Boolean]"]=Ln["[object Date]"]=Ln["[object Float32Array]"]=Ln["[object Float64Array]"]=Ln["[object Int8Array]"]=Ln["[object Int16Array]"]=Ln["[object Int32Array]"]=Ln["[object Map]"]=Ln["[object Number]"]=Ln["[object Object]"]=Ln["[object RegExp]"]=Ln["[object Set]"]=Ln["[object String]"]=Ln["[object Symbol]"]=Ln["[object Uint8Array]"]=Ln["[object Uint8ClampedArray]"]=Ln["[object Uint16Array]"]=Ln["[object Uint32Array]"]=true, -Ln["[object Error]"]=Ln["[object Function]"]=Ln["[object WeakMap]"]=false;var Un={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Cn=parseFloat,Dn=parseInt,Mn=typeof global=="object"&&global&&global.Object===Object&&global,Tn=typeof self=="object"&&self&&self.Object===Object&&self,$n=Mn||Tn||Function("return this")(),Fn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nn=Fn&&typeof module=="object"&&module&&!module.nodeType&&module,Pn=Nn&&Nn.exports===Fn,Zn=Pn&&Mn.process,qn=function(){ -try{var n=Nn&&Nn.f&&Nn.f("util").types;return n?n:Zn&&Zn.binding&&Zn.binding("util")}catch(n){}}(),Vn=qn&&qn.isArrayBuffer,Kn=qn&&qn.isDate,Gn=qn&&qn.isMap,Hn=qn&&qn.isRegExp,Jn=qn&&qn.isSet,Yn=qn&&qn.isTypedArray,Qn=b("length"),Xn=x({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I", -"\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C", -"\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i", -"\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r", -"\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij", -"\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),nt=x({"&":"&","<":"<",">":">",'"':""","'":"'"}),tt=x({"&":"&","<":"<",">":">",""":'"',"'":"'"}),rt=function x(mn){function An(n){if(yu(n)&&!ff(n)&&!(n instanceof Un)){if(n instanceof On)return n;if(oi.call(n,"__wrapped__"))return Fe(n)}return new On(n)}function En(){}function On(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=T}function Un(n){this.__wrapped__=n, -this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function _t(n,t,e,u,i,o){var f,c=1&t,a=2&t,l=4&t;if(e&&(f=i?e(n,u,i,o):e(n)),f!==T)return f;if(!du(n))return n;if(u=ff(n)){if(f=me(n),!c)return Ur(n,f)}else{var s=vo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(af(n))return Ir(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Ae(n),!c)return a?Mr(n,lt(f,n)):Dr(n,at(f,n))}else{if(!Ln[s])return i?n:{};f=Ee(n,s,c)}}if(o||(o=new Zn), -i=o.get(n))return i;o.set(n,f),pf(n)?n.forEach(function(r){f.add(_t(r,t,e,r,n,o))}):sf(n)&&n.forEach(function(r,u){f.set(u,_t(r,t,e,u,n,o))});var a=l?a?ve:_e:a?Bu:Wu,p=u?T:a(n);return r(p||n,function(r,u){p&&(u=r,r=n[u]),ot(f,u,_t(r,t,e,u,n,o))}),f}function vt(n){var t=Wu(n);return function(r){return gt(r,n,t)}}function gt(n,t,r){var e=r.length;if(null==n)return!e;for(n=Qu(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===T&&!(u in n)||!i(o))return false}return true}function dt(n,t,r){if(typeof n!="function")throw new ti("Expected a function"); -return bo(function(){n.apply(T,r)},t)}function yt(n,t,r,e){var u=-1,i=o,a=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=c(t,k(r))),e?(i=f,a=false):200<=t.length&&(i=O,a=false,t=new Nn(t));n:for(;++ut}function Rt(n,t){return null!=n&&oi.call(n,t)}function zt(n,t){return null!=n&&t in Qu(n)}function Wt(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=Ku(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,k(t))),s=Ci(p.length,s), -l[a]=!r&&(t||120<=u&&120<=p.length)?new Nn(a&&p):T}var p=n[0],_=-1,v=l[0];n:for(;++_r.length?t:kt(t,hr(r,0,-1)),r=null==t?t:t[Me(Ve(r))],null==r?T:n(r,t,e)}function Ut(n){return yu(n)&&"[object Arguments]"==Ot(n)}function Ct(n){ -return yu(n)&&"[object ArrayBuffer]"==Ot(n)}function Dt(n){return yu(n)&&"[object Date]"==Ot(n)}function Mt(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!yu(n)&&!yu(t))t=n!==n&&t!==t;else n:{var i=ff(n),o=ff(t),f=i?"[object Array]":vo(n),c=o?"[object Array]":vo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&af(n)){if(!af(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Zn),t=i||_f(n)?se(n,t,r,e,Mt,u):he(n,t,f,r,e,Mt,u);else{ -if(!(1&r)&&(i=a&&oi.call(n,"__wrapped__"),f=o&&oi.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Zn),t=Mt(n,t,r,e,u);break n}if(c)t:if(u||(u=new Zn),i=1&r,f=_e(n),o=f.length,c=_e(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:oi.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++at?r:0,Se(t,r)?n[t]:T}function Xt(n,t,r){var e=-1;return t=c(t.length?t:[$u],k(ye())),n=Gt(n,function(n){return{ -a:c(t,function(t){return t(n)}),b:++e,c:n}}),w(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e=f?c:c*("desc"==r[e]?-1:1);break n}}e=n.b-t.b}return e})}function nr(n,t){return tr(n,t,function(t,r){return zu(n,r)})}function tr(n,t,r){for(var e=-1,u=t.length,i={};++et||9007199254740991t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Ku(u);++e=u){for(;e>>1,o=n[i];null!==o&&!wu(o)&&(r?o<=t:ot.length?n:kt(n,hr(t,0,-1)),null==n||delete n[Me(Ve(t))]}function jr(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++ie)return e?br(n[0]):[];for(var u=-1,i=Ku(e);++u=e?n:hr(n,t,r)}function Ir(n,t){if(t)return n.slice();var r=n.length,r=gi?gi(r):new n.constructor(r);return n.copy(r),r}function Rr(n){var t=new n.constructor(n.byteLength);return new vi(t).set(new vi(n)), -t}function zr(n,t){return new n.constructor(t?Rr(n.buffer):n.buffer,n.byteOffset,n.length)}function Wr(n,t){if(n!==t){var r=n!==T,e=null===n,u=n===n,i=wu(n),o=t!==T,f=null===t,c=t===t,a=wu(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&nu?T:i,u=1),t=Qu(t);++eo&&f[0]!==a&&f[o-1]!==a?[]:L(f,a), -o-=c.length,or?r?or(t,n):t:(r=or(t,Oi(n/D(t))),Rn.test(t)?Or(M(r),0,n).join(""):r.slice(0,n))}function te(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=Ku(l+c),h=this&&this!==$n&&this instanceof i?f:t;++at||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Br(e,r,h[4]):r,i[4]=e?L(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Lr(e,r,h[6]):r,i[6]=e?L(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Ci(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0], -t=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===T?c?0:n.length:Ui(i[9]-a,0),!f&&24&t&&(t&=-25),Ue((h?co:yo)(t&&1!=t?8==t||16==t?Kr(n,t,f):32!=t&&33!=t||u.length?Jr.apply(T,i):te(n,t,r,e):Pr(n,t,r),i),n,t)}function ce(n,t,r,e){return n===T||lu(n,ei[r])&&!oi.call(e,r)?t:n}function ae(n,t,r,e,u,i){return du(n)&&du(t)&&(i.set(t,n),Yt(n,t,T,ae,i),i.delete(t)),n}function le(n){return xu(n)?T:n}function se(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t; -var c=-1,a=true,l=2&r?new Nn:T;for(i.set(n,t),i.set(t,n);++cr&&(r=Ui(e+r,0)),_(n,ye(t,3),r)):-1}function Pe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==T&&(u=Eu(r),u=0>r?Ui(e+u,0):Ci(u,e-1)), -_(n,ye(t,3),u,true)}function Ze(n){return(null==n?0:n.length)?wt(n,1):[]}function qe(n){return n&&n.length?n[0]:T}function Ve(n){var t=null==n?0:n.length;return t?n[t-1]:T}function Ke(n,t){return n&&n.length&&t&&t.length?er(n,t):n}function Ge(n){return null==n?n:$i.call(n)}function He(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){if(hu(n))return t=Ui(n.length,t),true}),A(t,function(t){return c(n,b(t))})}function Je(t,r){if(!t||!t.length)return[];var e=He(t);return null==r?e:c(e,function(t){ -return n(r,T,t)})}function Ye(n){return n=An(n),n.__chain__=true,n}function Qe(n,t){return t(n)}function Xe(){return this}function nu(n,t){return(ff(n)?r:uo)(n,ye(t,3))}function tu(n,t){return(ff(n)?e:io)(n,ye(t,3))}function ru(n,t){return(ff(n)?c:Gt)(n,ye(t,3))}function eu(n,t,r){return t=r?T:t,t=n&&null==t?n.length:t,fe(n,128,T,T,T,T,t)}function uu(n,t){var r;if(typeof t!="function")throw new ti("Expected a function");return n=Eu(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=T), -r}}function iu(n,t,r){return t=r?T:t,n=fe(n,8,T,T,T,T,T,t),n.placeholder=iu.placeholder,n}function ou(n,t,r){return t=r?T:t,n=fe(n,16,T,T,T,T,T,t),n.placeholder=ou.placeholder,n}function fu(n,t,r){function e(t){var r=c,e=a;return c=a=T,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===T||r>=t||0>r||g&&n>=l}function i(){var n=Go();if(u(n))return o(n);var r,e=bo;r=n-_,n=t-(n-p),r=g?Ci(n,l-r):n,h=e(i,r)}function o(n){return h=T,d&&c?e(n):(c=a=T,s)}function f(){var n=Go(),r=u(n);if(c=arguments, -a=this,p=n,r){if(h===T)return _=n=p,h=bo(i,t),v?e(n):s;if(g)return lo(h),h=bo(i,t),e(p)}return h===T&&(h=bo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ti("Expected a function");return t=Su(t)||0,du(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Ui(Su(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==T&&lo(h),_=0,c=p=a=h=T},f.flush=function(){return h===T?s:o(Go())},f}function cu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache; -return i.has(u)?i.get(u):(e=n.apply(this,e),r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ti("Expected a function");return r.cache=new(cu.Cache||Fn),r}function au(n){if(typeof n!="function")throw new ti("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function lu(n,t){return n===t||n!==n&&t!==t; -}function su(n){return null!=n&&gu(n.length)&&!_u(n)}function hu(n){return yu(n)&&su(n)}function pu(n){if(!yu(n))return false;var t=Ot(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!xu(n)}function _u(n){return!!du(n)&&(n=Ot(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function vu(n){return typeof n=="number"&&n==Eu(n)}function gu(n){return typeof n=="number"&&-1=n; -}function du(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function yu(n){return null!=n&&typeof n=="object"}function bu(n){return typeof n=="number"||yu(n)&&"[object Number]"==Ot(n)}function xu(n){return!(!yu(n)||"[object Object]"!=Ot(n))&&(n=di(n),null===n||(n=oi.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&ii.call(n)==li))}function ju(n){return typeof n=="string"||!ff(n)&&yu(n)&&"[object String]"==Ot(n)}function wu(n){return typeof n=="symbol"||yu(n)&&"[object Symbol]"==Ot(n); -}function mu(n){if(!n)return[];if(su(n))return ju(n)?M(n):Ur(n);if(wi&&n[wi]){n=n[wi]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=vo(n),("[object Map]"==t?W:"[object Set]"==t?U:Uu)(n)}function Au(n){return n?(n=Su(n),n===$||n===-$?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Eu(n){n=Au(n);var t=n%1;return n===n?t?n-t:n:0}function ku(n){return n?pt(Eu(n),0,4294967295):0}function Su(n){if(typeof n=="number")return n;if(wu(n))return F;if(du(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n, -n=du(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(un,"");var t=gn.test(n);return t||yn.test(n)?Dn(n.slice(2),t?2:8):vn.test(n)?F:+n}function Ou(n){return Cr(n,Bu(n))}function Iu(n){return null==n?"":yr(n)}function Ru(n,t,r){return n=null==n?T:kt(n,t),n===T?r:n}function zu(n,t){return null!=n&&we(n,t,zt)}function Wu(n){return su(n)?qn(n):Vt(n)}function Bu(n){if(su(n))n=qn(n,true);else if(du(n)){var t,r=ze(n),e=[];for(t in n)("constructor"!=t||!r&&oi.call(n,t))&&e.push(t);n=e}else{if(t=[], -null!=n)for(r in Qu(n))t.push(r);n=t}return n}function Lu(n,t){if(null==n)return{};var r=c(ve(n),function(n){return[n]});return t=ye(t),tr(n,r,function(n,r){return t(n,r[0])})}function Uu(n){return null==n?[]:S(n,Wu(n))}function Cu(n){return $f(Iu(n).toLowerCase())}function Du(n){return(n=Iu(n))&&n.replace(xn,Xn).replace(Sn,"")}function Mu(n,t,r){return n=Iu(n),t=r?T:t,t===T?zn.test(n)?n.match(In)||[]:n.match(sn)||[]:n.match(t)||[]}function Tu(n){return function(){return n}}function $u(n){return n; -}function Fu(n){return qt(typeof n=="function"?n:_t(n,1))}function Nu(n,t,e){var u=Wu(t),i=Et(t,u);null!=e||du(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=Et(t,Wu(t)));var o=!(du(e)&&"chain"in e&&!e.chain),f=_u(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Ur(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function Pu(){} -function Zu(n){return Ie(n)?b(Me(n)):rr(n)}function qu(){return[]}function Vu(){return false}mn=null==mn?$n:rt.defaults($n.Object(),mn,rt.pick($n,Wn));var Ku=mn.Array,Gu=mn.Date,Hu=mn.Error,Ju=mn.Function,Yu=mn.Math,Qu=mn.Object,Xu=mn.RegExp,ni=mn.String,ti=mn.TypeError,ri=Ku.prototype,ei=Qu.prototype,ui=mn["__core-js_shared__"],ii=Ju.prototype.toString,oi=ei.hasOwnProperty,fi=0,ci=function(){var n=/[^.]+$/.exec(ui&&ui.keys&&ui.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),ai=ei.toString,li=ii.call(Qu),si=$n._,hi=Xu("^"+ii.call(oi).replace(rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pi=Pn?mn.Buffer:T,_i=mn.Symbol,vi=mn.Uint8Array,gi=pi?pi.g:T,di=B(Qu.getPrototypeOf,Qu),yi=Qu.create,bi=ei.propertyIsEnumerable,xi=ri.splice,ji=_i?_i.isConcatSpreadable:T,wi=_i?_i.iterator:T,mi=_i?_i.toStringTag:T,Ai=function(){ -try{var n=je(Qu,"defineProperty");return n({},"",{}),n}catch(n){}}(),Ei=mn.clearTimeout!==$n.clearTimeout&&mn.clearTimeout,ki=Gu&&Gu.now!==$n.Date.now&&Gu.now,Si=mn.setTimeout!==$n.setTimeout&&mn.setTimeout,Oi=Yu.ceil,Ii=Yu.floor,Ri=Qu.getOwnPropertySymbols,zi=pi?pi.isBuffer:T,Wi=mn.isFinite,Bi=ri.join,Li=B(Qu.keys,Qu),Ui=Yu.max,Ci=Yu.min,Di=Gu.now,Mi=mn.parseInt,Ti=Yu.random,$i=ri.reverse,Fi=je(mn,"DataView"),Ni=je(mn,"Map"),Pi=je(mn,"Promise"),Zi=je(mn,"Set"),qi=je(mn,"WeakMap"),Vi=je(Qu,"create"),Ki=qi&&new qi,Gi={},Hi=Te(Fi),Ji=Te(Ni),Yi=Te(Pi),Qi=Te(Zi),Xi=Te(qi),no=_i?_i.prototype:T,to=no?no.valueOf:T,ro=no?no.toString:T,eo=function(){ -function n(){}return function(t){return du(t)?yi?yi(t):(n.prototype=t,t=new n,n.prototype=T,t):{}}}();An.templateSettings={escape:J,evaluate:Y,interpolate:Q,variable:"",imports:{_:An}},An.prototype=En.prototype,An.prototype.constructor=An,On.prototype=eo(En.prototype),On.prototype.constructor=On,Un.prototype=eo(En.prototype),Un.prototype.constructor=Un,Mn.prototype.clear=function(){this.__data__=Vi?Vi(null):{},this.size=0},Mn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n], -this.size-=n?1:0,n},Mn.prototype.get=function(n){var t=this.__data__;return Vi?(n=t[n],"__lodash_hash_undefined__"===n?T:n):oi.call(t,n)?t[n]:T},Mn.prototype.has=function(n){var t=this.__data__;return Vi?t[n]!==T:oi.call(t,n)},Mn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Vi&&t===T?"__lodash_hash_undefined__":t,this},Tn.prototype.clear=function(){this.__data__=[],this.size=0},Tn.prototype.delete=function(n){var t=this.__data__;return n=ft(t,n),!(0>n)&&(n==t.length-1?t.pop():xi.call(t,n,1), ---this.size,true)},Tn.prototype.get=function(n){var t=this.__data__;return n=ft(t,n),0>n?T:t[n][1]},Tn.prototype.has=function(n){return-1e?(++this.size,r.push([n,t])):r[e][1]=t,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Mn,map:new(Ni||Tn),string:new Mn}},Fn.prototype.delete=function(n){return n=be(this,n).delete(n),this.size-=n?1:0,n},Fn.prototype.get=function(n){return be(this,n).get(n); -},Fn.prototype.has=function(n){return be(this,n).has(n)},Fn.prototype.set=function(n,t){var r=be(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},Nn.prototype.add=Nn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},Nn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.clear=function(){this.__data__=new Tn,this.size=0},Zn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Zn.prototype.get=function(n){ -return this.__data__.get(n)},Zn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Tn){var e=r.__data__;if(!Ni||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Fn(e)}return r.set(n,t),this.size=r.size,this};var uo=Fr(mt),io=Fr(At,true),oo=Nr(),fo=Nr(true),co=Ki?function(n,t){return Ki.set(n,t),n}:$u,ao=Ai?function(n,t){return Ai(n,"toString",{configurable:true,enumerable:false,value:Tu(t),writable:true})}:$u,lo=Ei||function(n){ -return $n.clearTimeout(n)},so=Zi&&1/U(new Zi([,-0]))[1]==$?function(n){return new Zi(n)}:Pu,ho=Ki?function(n){return Ki.get(n)}:Pu,po=Ri?function(n){return null==n?[]:(n=Qu(n),i(Ri(n),function(t){return bi.call(n,t)}))}:qu,_o=Ri?function(n){for(var t=[];n;)a(t,po(n)),n=di(n);return t}:qu,vo=Ot;(Fi&&"[object DataView]"!=vo(new Fi(new ArrayBuffer(1)))||Ni&&"[object Map]"!=vo(new Ni)||Pi&&"[object Promise]"!=vo(Pi.resolve())||Zi&&"[object Set]"!=vo(new Zi)||qi&&"[object WeakMap]"!=vo(new qi))&&(vo=function(n){ -var t=Ot(n);if(n=(n="[object Object]"==t?n.constructor:T)?Te(n):"")switch(n){case Hi:return"[object DataView]";case Ji:return"[object Map]";case Yi:return"[object Promise]";case Qi:return"[object Set]";case Xi:return"[object WeakMap]"}return t});var go=ui?_u:Vu,yo=Ce(co),bo=Si||function(n,t){return $n.setTimeout(n,t)},xo=Ce(ao),jo=function(n){n=cu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(tn,function(n,r,e,u){ -t.push(e?u.replace(hn,"$1"):r||n)}),t}),wo=fr(function(n,t){return hu(n)?yt(n,wt(t,1,hu,true)):[]}),mo=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),ye(r,2)):[]}),Ao=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),T,r):[]}),Eo=fr(function(n){var t=c(n,Er);return t.length&&t[0]===n[0]?Wt(t):[]}),ko=fr(function(n){var t=Ve(n),r=c(n,Er);return t===Ve(r)?t=T:r.pop(),r.length&&r[0]===n[0]?Wt(r,ye(t,2)):[]}),So=fr(function(n){var t=Ve(n),r=c(n,Er);return(t=typeof t=="function"?t:T)&&r.pop(), -r.length&&r[0]===n[0]?Wt(r,T,t):[]}),Oo=fr(Ke),Io=pe(function(n,t){var r=null==n?0:n.length,e=ht(n,t);return ur(n,c(t,function(n){return Se(n,r)?+n:n}).sort(Wr)),e}),Ro=fr(function(n){return br(wt(n,1,hu,true))}),zo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T),br(wt(n,1,hu,true),ye(t,2))}),Wo=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return br(wt(n,1,hu,true),T,t)}),Bo=fr(function(n,t){return hu(n)?yt(n,t):[]}),Lo=fr(function(n){return mr(i(n,hu))}),Uo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T), -mr(i(n,hu),ye(t,2))}),Co=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return mr(i(n,hu),T,t)}),Do=fr(He),Mo=fr(function(n){var t=n.length,t=1=t}),of=Ut(function(){return arguments}())?Ut:function(n){return yu(n)&&oi.call(n,"callee")&&!bi.call(n,"callee")},ff=Ku.isArray,cf=Vn?k(Vn):Ct,af=zi||Vu,lf=Kn?k(Kn):Dt,sf=Gn?k(Gn):Tt,hf=Hn?k(Hn):Nt,pf=Jn?k(Jn):Pt,_f=Yn?k(Yn):Zt,vf=ee(Kt),gf=ee(function(n,t){return n<=t}),df=$r(function(n,t){ -if(ze(t)||su(t))Cr(t,Wu(t),n);else for(var r in t)oi.call(t,r)&&ot(n,r,t[r])}),yf=$r(function(n,t){Cr(t,Bu(t),n)}),bf=$r(function(n,t,r,e){Cr(t,Bu(t),n,e)}),xf=$r(function(n,t,r,e){Cr(t,Wu(t),n,e)}),jf=pe(ht),wf=fr(function(n,t){n=Qu(n);var r=-1,e=t.length,u=2--n)return t.apply(this,arguments)}},An.ary=eu,An.assign=df,An.assignIn=yf,An.assignInWith=bf,An.assignWith=xf,An.at=jf,An.before=uu,An.bind=Ho,An.bindAll=Nf,An.bindKey=Jo,An.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return ff(n)?n:[n]},An.chain=Ye,An.chunk=function(n,t,r){if(t=(r?Oe(n,t,r):t===T)?1:Ui(Eu(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Ku(Oi(r/t));et?0:t,e)):[]},An.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0,0>t?0:t)):[]},An.dropRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true,true):[]; -},An.dropWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true):[]},An.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&Oe(n,t,r)&&(r=0,e=u),u=n.length,r=Eu(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:Eu(e),0>e&&(e+=u),e=r>e?0:ku(e);r>>0,r?(n=Iu(n))&&(typeof t=="string"||null!=t&&!hf(t))&&(t=yr(t),!t&&Rn.test(n))?Or(M(n),0,r):n.split(t,r):[]},An.spread=function(t,r){if(typeof t!="function")throw new ti("Expected a function");return r=null==r?0:Ui(Eu(r),0), -fr(function(e){var u=e[r];return e=Or(e,0,r),u&&a(e,u),n(t,this,e)})},An.tail=function(n){var t=null==n?0:n.length;return t?hr(n,1,t):[]},An.take=function(n,t,r){return n&&n.length?(t=r||t===T?1:Eu(t),hr(n,0,0>t?0:t)):[]},An.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0>t?0:t,e)):[]},An.takeRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),false,true):[]},An.takeWhile=function(n,t){return n&&n.length?jr(n,ye(t,3)):[]},An.tap=function(n,t){return t(n), -n},An.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ti("Expected a function");return du(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),fu(n,t,{leading:e,maxWait:t,trailing:u})},An.thru=Qe,An.toArray=mu,An.toPairs=zf,An.toPairsIn=Wf,An.toPath=function(n){return ff(n)?c(n,Me):wu(n)?[n]:Ur(jo(Iu(n)))},An.toPlainObject=Ou,An.transform=function(n,t,e){var u=ff(n),i=u||af(n)||_f(n);if(t=ye(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:du(n)&&_u(o)?eo(di(n)):{}; -}return(i?r:mt)(n,function(n,r,u){return t(e,n,r,u)}),e},An.unary=function(n){return eu(n,1)},An.union=Ro,An.unionBy=zo,An.unionWith=Wo,An.uniq=function(n){return n&&n.length?br(n):[]},An.uniqBy=function(n,t){return n&&n.length?br(n,ye(t,2)):[]},An.uniqWith=function(n,t){return t=typeof t=="function"?t:T,n&&n.length?br(n,T,t):[]},An.unset=function(n,t){return null==n||xr(n,t)},An.unzip=He,An.unzipWith=Je,An.update=function(n,t,r){return null==n?n:lr(n,t,kr(r)(kt(n,t)),void 0)},An.updateWith=function(n,t,r,e){ -return e=typeof e=="function"?e:T,null!=n&&(n=lr(n,t,kr(r)(kt(n,t)),e)),n},An.values=Uu,An.valuesIn=function(n){return null==n?[]:S(n,Bu(n))},An.without=Bo,An.words=Mu,An.wrap=function(n,t){return nf(kr(t),n)},An.xor=Lo,An.xorBy=Uo,An.xorWith=Co,An.zip=Do,An.zipObject=function(n,t){return Ar(n||[],t||[],ot)},An.zipObjectDeep=function(n,t){return Ar(n||[],t||[],lr)},An.zipWith=Mo,An.entries=zf,An.entriesIn=Wf,An.extend=yf,An.extendWith=bf,Nu(An,An),An.add=Qf,An.attempt=Ff,An.camelCase=Bf,An.capitalize=Cu, -An.ceil=Xf,An.clamp=function(n,t,r){return r===T&&(r=t,t=T),r!==T&&(r=Su(r),r=r===r?r:0),t!==T&&(t=Su(t),t=t===t?t:0),pt(Su(n),t,r)},An.clone=function(n){return _t(n,4)},An.cloneDeep=function(n){return _t(n,5)},An.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,5,t)},An.cloneWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,4,t)},An.conformsTo=function(n,t){return null==t||gt(n,t,Wu(t))},An.deburr=Du,An.defaultTo=function(n,t){return null==n||n!==n?t:n},An.divide=nc,An.endsWith=function(n,t,r){ -n=Iu(n),t=yr(t);var e=n.length,e=r=r===T?e:pt(Eu(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},An.eq=lu,An.escape=function(n){return(n=Iu(n))&&H.test(n)?n.replace(K,nt):n},An.escapeRegExp=function(n){return(n=Iu(n))&&en.test(n)?n.replace(rn,"\\$&"):n},An.every=function(n,t,r){var e=ff(n)?u:bt;return r&&Oe(n,t,r)&&(t=T),e(n,ye(t,3))},An.find=Fo,An.findIndex=Ne,An.findKey=function(n,t){return p(n,ye(t,3),mt)},An.findLast=No,An.findLastIndex=Pe,An.findLastKey=function(n,t){return p(n,ye(t,3),At); -},An.floor=tc,An.forEach=nu,An.forEachRight=tu,An.forIn=function(n,t){return null==n?n:oo(n,ye(t,3),Bu)},An.forInRight=function(n,t){return null==n?n:fo(n,ye(t,3),Bu)},An.forOwn=function(n,t){return n&&mt(n,ye(t,3))},An.forOwnRight=function(n,t){return n&&At(n,ye(t,3))},An.get=Ru,An.gt=ef,An.gte=uf,An.has=function(n,t){return null!=n&&we(n,t,Rt)},An.hasIn=zu,An.head=qe,An.identity=$u,An.includes=function(n,t,r,e){return n=su(n)?n:Uu(n),r=r&&!e?Eu(r):0,e=n.length,0>r&&(r=Ui(e+r,0)),ju(n)?r<=e&&-1r&&(r=Ui(e+r,0)),v(n,t,r)):-1},An.inRange=function(n,t,r){return t=Au(t),r===T?(r=t,t=0):r=Au(r),n=Su(n),n>=Ci(t,r)&&n=n},An.isSet=pf,An.isString=ju,An.isSymbol=wu,An.isTypedArray=_f,An.isUndefined=function(n){return n===T},An.isWeakMap=function(n){return yu(n)&&"[object WeakMap]"==vo(n)},An.isWeakSet=function(n){return yu(n)&&"[object WeakSet]"==Ot(n)},An.join=function(n,t){return null==n?"":Bi.call(n,t)},An.kebabCase=Lf,An.last=Ve,An.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==T&&(u=Eu(r),u=0>u?Ui(e+u,0):Ci(u,e-1)), -t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=_(n,d,u,true);return n},An.lowerCase=Uf,An.lowerFirst=Cf,An.lt=vf,An.lte=gf,An.max=function(n){return n&&n.length?xt(n,$u,It):T},An.maxBy=function(n,t){return n&&n.length?xt(n,ye(t,2),It):T},An.mean=function(n){return y(n,$u)},An.meanBy=function(n,t){return y(n,ye(t,2))},An.min=function(n){return n&&n.length?xt(n,$u,Kt):T},An.minBy=function(n,t){return n&&n.length?xt(n,ye(t,2),Kt):T},An.stubArray=qu,An.stubFalse=Vu,An.stubObject=function(){return{}},An.stubString=function(){ -return""},An.stubTrue=function(){return true},An.multiply=rc,An.nth=function(n,t){return n&&n.length?Qt(n,Eu(t)):T},An.noConflict=function(){return $n._===this&&($n._=si),this},An.noop=Pu,An.now=Go,An.pad=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return!t||e>=t?n:(t=(t-e)/2,ne(Ii(t),r)+n+ne(Oi(t),r))},An.padEnd=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return t&&et){var e=n;n=t,t=e}return r||n%1||t%1?(r=Ti(),Ci(n+r*(t-n+Cn("1e-"+((r+"").length-1))),t)):ir(n,t)},An.reduce=function(n,t,r){var e=ff(n)?l:j,u=3>arguments.length;return e(n,ye(t,4),r,u,uo)},An.reduceRight=function(n,t,r){var e=ff(n)?s:j,u=3>arguments.length; -return e(n,ye(t,4),r,u,io)},An.repeat=function(n,t,r){return t=(r?Oe(n,t,r):t===T)?1:Eu(t),or(Iu(n),t)},An.replace=function(){var n=arguments,t=Iu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},An.result=function(n,t,r){t=Sr(t,n);var e=-1,u=t.length;for(u||(u=1,n=T);++en||9007199254740991=i)return n;if(i=r-D(e),1>i)return e;if(r=o?Or(o,0,i).join(""):n.slice(0,i),u===T)return r+e;if(o&&(i+=r.length-i),hf(u)){if(n.slice(i).search(u)){ -var f=r;for(u.global||(u=Xu(u.source,Iu(_n.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===T?i:c)}}else n.indexOf(yr(u),i)!=i&&(u=r.lastIndexOf(u),-1e.__dir__?"Right":"")}),e},Un.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){ -var r=t+1,e=1==r||3==r;Un.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:ye(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){var r="take"+(t?"Right":"");Un.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Un.prototype[n]=function(){return this.__filtered__?new Un(this):this[r](1)}}),Un.prototype.compact=function(){return this.filter($u)},Un.prototype.find=function(n){ -return this.filter(n).head()},Un.prototype.findLast=function(n){return this.reverse().find(n)},Un.prototype.invokeMap=fr(function(n,t){return typeof n=="function"?new Un(this):this.map(function(r){return Lt(r,n,t)})}),Un.prototype.reject=function(n){return this.filter(au(ye(n)))},Un.prototype.slice=function(n,t){n=Eu(n);var r=this;return r.__filtered__&&(0t)?new Un(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==T&&(t=Eu(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Un.prototype.takeRightWhile=function(n){ -return this.reverse().takeWhile(n).reverse()},Un.prototype.toArray=function(){return this.take(4294967295)},mt(Un.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=An[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(An.prototype[t]=function(){function t(n){return n=u.apply(An,a([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Un,l=f[0],s=c||ff(o);s&&r&&typeof l=="function"&&1!=l.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,l=i&&!h,c=c&&!p; -return!i&&s?(o=c?o:new Un(this),o=n.apply(o,f),o.__actions__.push({func:Qe,args:[t],thisArg:T}),new On(o,h)):l&&c?n.apply(this,f):(o=this.thru(t),l?e?o.value()[0]:o.value():o)})}),r("pop push shift sort splice unshift".split(" "),function(n){var t=ri[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);An.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(ff(u)?u:[],n)}return this[r](function(r){return t.apply(ff(r)?r:[],n)}); -}}),mt(Un.prototype,function(n,t){var r=An[t];if(r){var e=r.name+"";oi.call(Gi,e)||(Gi[e]=[]),Gi[e].push({name:t,func:r})}}),Gi[Jr(T,2).name]=[{name:"wrapper",func:T}],Un.prototype.clone=function(){var n=new Un(this.__wrapped__);return n.__actions__=Ur(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Ur(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Ur(this.__views__),n},Un.prototype.reverse=function(){if(this.__filtered__){var n=new Un(this); -n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Un.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=ff(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c=this.__values__.length;return{done:n,value:n?T:this.__values__[this.__index__++]}},An.prototype.plant=function(n){ -for(var t,r=this;r instanceof En;){var e=Fe(r);e.__index__=0,e.__values__=T,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},An.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Un?(this.__actions__.length&&(n=new Un(this)),n=n.reverse(),n.__actions__.push({func:Qe,args:[Ge],thisArg:T}),new On(n,this.__chain__)):this.thru(Ge)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return wr(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head, -wi&&(An.prototype[wi]=Xe),An}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($n._=rt, define(function(){return rt})):Nn?((Nn.exports=rt)._=rt,Fn._=rt):$n._=rt}).call(this); \ No newline at end of file +(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e-1;);return r}function W(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}function C(n){return"\\"+Gr[n]}function U(n,t){ +return null==n?Y:n[t]}function B(n){return Dr.test(n)}function T(n){return Mr.test(n)}function $(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function D(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function M(n,t){return function(r){return n(t(r))}}function F(n,t){for(var r=-1,e=n.length,u=0,i=[];++r>>1,Un=[["ary",dn],["bind",sn],["bindKey",hn],["curry",_n],["curryRight",vn],["flip",wn],["partial",gn],["partialRight",yn],["rearg",bn]],Bn="[object Arguments]",Tn="[object Array]",$n="[object AsyncFunction]",Dn="[object Boolean]",Mn="[object Date]",Fn="[object DOMException]",Nn="[object Error]",Pn="[object Function]",qn="[object GeneratorFunction]",Zn="[object Map]",Kn="[object Number]",Vn="[object Null]",Gn="[object Object]",Hn="[object Promise]",Jn="[object Proxy]",Yn="[object RegExp]",Qn="[object Set]",Xn="[object String]",nt="[object Symbol]",tt="[object Undefined]",rt="[object WeakMap]",et="[object WeakSet]",ut="[object ArrayBuffer]",it="[object DataView]",ot="[object Float32Array]",ft="[object Float64Array]",ct="[object Int8Array]",at="[object Int16Array]",lt="[object Int32Array]",st="[object Uint8Array]",ht="[object Uint8ClampedArray]",pt="[object Uint16Array]",_t="[object Uint32Array]",vt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39);/g,bt=/[&<>"']/g,wt=RegExp(dt.source),mt=RegExp(bt.source),xt=/<%-([\s\S]+?)%>/g,jt=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,It=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/[\\^$.*+?()[\]{}|]/g,zt=RegExp(Rt.source),Et=/^\s+|\s+$/g,St=/^\s+/,Wt=/\s+$/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ct=/\{\n\/\* \[wrapped with (.+)\] \*/,Ut=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tt=/\\(\\)?/g,$t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,Mt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Nt=/^\[object .+?Constructor\]$/,Pt=/^0o[0-7]+$/i,qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Vt=/['\n\r\u2028\u2029\\]/g,Gt="\\ud800-\\udfff",Ht="\\u0300-\\u036f",Jt="\\ufe20-\\ufe2f",Yt="\\u20d0-\\u20ff",Qt=Ht+Jt+Yt,Xt="\\u2700-\\u27bf",nr="a-z\\xdf-\\xf6\\xf8-\\xff",tr="\\xac\\xb1\\xd7\\xf7",rr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",er="\\u2000-\\u206f",ur=" \\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",ir="A-Z\\xc0-\\xd6\\xd8-\\xde",or="\\ufe0e\\ufe0f",fr=tr+rr+er+ur,cr="['\u2019]",ar="["+Gt+"]",lr="["+fr+"]",sr="["+Qt+"]",hr="\\d+",pr="["+Xt+"]",_r="["+nr+"]",vr="[^"+Gt+fr+hr+Xt+nr+ir+"]",gr="\\ud83c[\\udffb-\\udfff]",yr="(?:"+sr+"|"+gr+")",dr="[^"+Gt+"]",br="(?:\\ud83c[\\udde6-\\uddff]){2}",wr="[\\ud800-\\udbff][\\udc00-\\udfff]",mr="["+ir+"]",xr="\\u200d",jr="(?:"+_r+"|"+vr+")",Ar="(?:"+mr+"|"+vr+")",kr="(?:"+cr+"(?:d|ll|m|re|s|t|ve))?",Or="(?:"+cr+"(?:D|LL|M|RE|S|T|VE))?",Ir=yr+"?",Rr="["+or+"]?",zr="(?:"+xr+"(?:"+[dr,br,wr].join("|")+")"+Rr+Ir+")*",Er="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wr=Rr+Ir+zr,Lr="(?:"+[pr,br,wr].join("|")+")"+Wr,Cr="(?:"+[dr+sr+"?",sr,br,wr,ar].join("|")+")",Ur=RegExp(cr,"g"),Br=RegExp(sr,"g"),Tr=RegExp(gr+"(?="+gr+")|"+Cr+Wr,"g"),$r=RegExp([mr+"?"+_r+"+"+kr+"(?="+[lr,mr,"$"].join("|")+")",Ar+"+"+Or+"(?="+[lr,mr+jr,"$"].join("|")+")",mr+"?"+jr+"+"+kr,mr+"+"+Or,Sr,Er,hr,Lr].join("|"),"g"),Dr=RegExp("["+xr+Gt+Qt+or+"]"),Mr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nr=-1,Pr={}; +Pr[ot]=Pr[ft]=Pr[ct]=Pr[at]=Pr[lt]=Pr[st]=Pr[ht]=Pr[pt]=Pr[_t]=!0,Pr[Bn]=Pr[Tn]=Pr[ut]=Pr[Dn]=Pr[it]=Pr[Mn]=Pr[Nn]=Pr[Pn]=Pr[Zn]=Pr[Kn]=Pr[Gn]=Pr[Yn]=Pr[Qn]=Pr[Xn]=Pr[rt]=!1;var qr={};qr[Bn]=qr[Tn]=qr[ut]=qr[it]=qr[Dn]=qr[Mn]=qr[ot]=qr[ft]=qr[ct]=qr[at]=qr[lt]=qr[Zn]=qr[Kn]=qr[Gn]=qr[Yn]=qr[Qn]=qr[Xn]=qr[nt]=qr[st]=qr[ht]=qr[pt]=qr[_t]=!0,qr[Nn]=qr[Pn]=qr[rt]=!1;var Zr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a", +"\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae", +"\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g", +"\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O", +"\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w", +"\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},Kr={"&":"&","<":"<",">":">",'"':""","'":"'"},Vr={"&":"&","<":"<",">":">",""":'"',"'":"'"},Gr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Hr=parseFloat,Jr=parseInt,Yr="object"==typeof global&&global&&global.Object===Object&&global,Qr="object"==typeof self&&self&&self.Object===Object&&self,Xr=Yr||Qr||Function("return this")(),ne="object"==typeof exports&&exports&&!exports.nodeType&&exports,te=ne&&"object"==typeof module&&module&&!module.nodeType&&module,re=te&&te.exports===ne,ee=re&&Yr.process,ue=function(){ +try{var n=te&&te.require&&te.require("util").types;return n?n:ee&&ee.binding&&ee.binding("util")}catch(n){}}(),ie=ue&&ue.isArrayBuffer,oe=ue&&ue.isDate,fe=ue&&ue.isMap,ce=ue&&ue.isRegExp,ae=ue&&ue.isSet,le=ue&&ue.isTypedArray,se=m("length"),he=x(Zr),pe=x(Kr),_e=x(Vr),ve=function p(x){function q(n){if(oc(n)&&!yh(n)&&!(n instanceof Bt)){if(n instanceof H)return n;if(yl.call(n,"__wrapped__"))return to(n)}return new H(n)}function G(){}function H(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t, +this.__index__=0,this.__values__=Y}function Bt(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Wn,this.__views__=[]}function Gt(){var n=new Bt(this.__wrapped__);return n.__actions__=Uu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Uu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Uu(this.__views__),n}function Ht(){if(this.__filtered__){var n=new Bt(this);n.__dir__=-1, +n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Jt(){var n=this.__wrapped__.value(),t=this.__dir__,r=yh(n),e=t<0,u=r?n.length:0,i=Ai(0,u,this.__views__),o=i.start,f=i.end,c=f-o,a=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Vl(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return du(n,this.__actions__);var _=[];n:for(;c--&&h-1}function cr(n,t){var r=this.__data__,e=Er(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function ar(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function Dr(n,t,e,u,i,o){var f,c=t&on,a=t&fn,l=t&cn;if(e&&(f=i?e(n,u,i,o):e(n)),f!==Y)return f;if(!ic(n))return n;var s=yh(n);if(s){if(f=Ii(n),!c)return Uu(n,f)}else{var h=Is(n),p=h==Pn||h==qn;if(bh(n))return ku(n,c);if(h==Gn||h==Bn||p&&!i){if(f=a||p?{}:Ri(n),!c)return a?$u(n,Lr(f,n)):Tu(n,Wr(f,n))}else{if(!qr[h])return i?n:{};f=zi(n,h,c)}}o||(o=new dr);var _=o.get(n);if(_)return _;o.set(n,f),jh(n)?n.forEach(function(r){f.add(Dr(r,t,e,r,n,o))}):mh(n)&&n.forEach(function(r,u){ +f.set(u,Dr(r,t,e,u,n,o))});var v=l?a?gi:vi:a?Nc:Fc,g=s?Y:v(n);return r(g||n,function(r,u){g&&(u=r,r=n[u]),zr(f,u,Dr(r,t,e,u,n,o))}),f}function Mr(n){var t=Fc(n);return function(r){return Zr(r,n,t)}}function Zr(n,t,r){var e=r.length;if(null==n)return!e;for(n=cl(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===Y&&!(u in n)||!i(o))return!1}return!0}function Kr(n,t,r){if("function"!=typeof n)throw new sl(tn);return Es(function(){n.apply(Y,r)},t)}function Vr(n,t,r,e){var u=-1,i=o,a=!0,l=n.length,s=[],h=t.length; +if(!l)return s;r&&(t=c(t,R(r))),e?(i=f,a=!1):t.length>=X&&(i=E,a=!1,t=new vr(t));n:for(;++uu?0:u+r), +e=e===Y||e>u?u:jc(e),e<0&&(e+=u),e=r>e?0:Ac(e);r0&&r(f)?t>1?te(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function ee(n,t){return n&&ys(n,t,Fc)}function ue(n,t){return n&&ds(n,t,Fc)}function se(n,t){return i(t,function(t){return rc(n[t])})}function ve(n,t){t=ju(t,n);for(var r=0,e=t.length;null!=n&&rt}function we(n,t){return null!=n&&yl.call(n,t)}function me(n,t){return null!=n&&t in cl(n)}function xe(n,t,r){return n>=Vl(t,r)&&n=120&&p.length>=120)?new vr(a&&p):Y}p=n[0]; +var _=-1,v=l[0];n:for(;++_-1;)f!==n&&Sl.call(f,a,1),Sl.call(n,a,1);return n}function Qe(n,t){for(var r=n?t.length:0,e=r-1;r--;){ +var u=t[r];if(r==e||u!==i){var i=u;Wi(u)?Sl.call(n,u,1):vu(n,u)}}return n}function Xe(n,t){return n+Ml(Jl()*(t-n+1))}function nu(n,t,r,e){for(var u=-1,i=Kl(Dl((t-n)/(r||1)),0),o=el(i);i--;)o[e?i:++u]=n,n+=r;return o}function tu(n,t){var r="";if(!n||t<1||t>zn)return r;do t%2&&(r+=n),t=Ml(t/2),t&&(n+=n);while(t);return r}function ru(n,t){return Ss(Zi(n,t,Sa),n+"")}function eu(n){return kr(na(n))}function uu(n,t){var r=na(n);return Yi(r,$r(t,0,r.length))}function iu(n,t,r,e){if(!ic(n))return n;t=ju(t,n); +for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++uu?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=el(u);++e>>1,o=n[i];null!==o&&!yc(o)&&(r?o<=t:o=X){var s=t?null:js(n);if(s)return N(s);c=!1,u=E,l=new vr}else l=t?[]:a;n:for(;++e=e?n:fu(n,t,r)}function ku(n,t){if(t)return n.slice();var r=n.length,e=Il?Il(r):new n.constructor(r); +return n.copy(e),e}function Ou(n){var t=new n.constructor(n.byteLength);return new Ol(t).set(new Ol(n)),t}function Iu(n,t){return new n.constructor(t?Ou(n.buffer):n.buffer,n.byteOffset,n.byteLength)}function Ru(n){var t=new n.constructor(n.source,Dt.exec(n));return t.lastIndex=n.lastIndex,t}function zu(n){return hs?cl(hs.call(n)):{}}function Eu(n,t){return new n.constructor(t?Ou(n.buffer):n.buffer,n.byteOffset,n.length)}function Su(n,t){if(n!==t){var r=n!==Y,e=null===n,u=n===n,i=yc(n),o=t!==Y,f=null===t,c=t===t,a=yc(t); +if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n=f)return c;return c*("desc"==r[e]?-1:1)}}return n.index-t.index}function Lu(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Kl(i-o,0),l=el(c+a),s=!e;++f1?r[u-1]:Y,o=u>2?r[2]:Y;for(i=n.length>3&&"function"==typeof i?(u--,i):Y,o&&Li(r[0],r[1],o)&&(i=u<3?Y:i,u=1),t=cl(t);++e-1?u[i?t[o]:o]:Y}}function Hu(n){return _i(function(t){var r=t.length,e=r,u=H.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new sl(tn);if(u&&!o&&"wrapper"==yi(i))var o=new H([],!0)}for(e=o?e:r;++e1&&d.reverse(),s&&cf))return!1;var a=i.get(n),l=i.get(t);if(a&&l)return a==t&&l==n;var s=-1,p=!0,_=r&ln?new vr:Y;for(i.set(n,t),i.set(t,n);++s1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Lt,"{\n/* [wrapped with "+t+"] */\n")}function Si(n){return yh(n)||gh(n)||!!(Wl&&n&&n[Wl])}function Wi(n,t){var r=typeof n; +return t=null==t?zn:t,!!t&&("number"==r||"symbol"!=r&&qt.test(n))&&n>-1&&n%1==0&&n0){if(++t>=jn)return arguments[0]}else t=0; +return n.apply(Y,arguments)}}function Yi(n,t){var r=-1,e=n.length,u=e-1;for(t=t===Y?e:t;++r=this.__values__.length;return{done:n,value:n?Y:this.__values__[this.__index__++]}}function rf(){return this}function ef(n){for(var t,r=this;r instanceof G;){var e=to(r);e.__index__=0,e.__values__=Y,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function uf(){var n=this.__wrapped__;if(n instanceof Bt){var t=n;return this.__actions__.length&&(t=new Bt(this)),t=t.reverse(),t.__actions__.push({func:Qo,args:[Ro],thisArg:Y}),new H(t,this.__chain__)}return this.thru(Ro); +}function of(){return du(this.__wrapped__,this.__actions__)}function ff(n,t,r){var e=yh(n)?u:Gr;return r&&Li(n,t,r)&&(t=Y),e(n,bi(t,3))}function cf(n,t){return(yh(n)?i:ne)(n,bi(t,3))}function af(n,t){return te(vf(n,t),1)}function lf(n,t){return te(vf(n,t),Rn)}function sf(n,t,r){return r=r===Y?1:jc(r),te(vf(n,t),r)}function hf(n,t){return(yh(n)?r:vs)(n,bi(t,3))}function pf(n,t){return(yh(n)?e:gs)(n,bi(t,3))}function _f(n,t,r,e){n=Vf(n)?n:na(n),r=r&&!e?jc(r):0;var u=n.length;return r<0&&(r=Kl(u+r,0)), +gc(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function vf(n,t){return(yh(n)?c:Fe)(n,bi(t,3))}function gf(n,t,r,e){return null==n?[]:(yh(t)||(t=null==t?[]:[t]),r=e?Y:r,yh(r)||(r=null==r?[]:[r]),Ve(n,t,r))}function yf(n,t,r){var e=yh(n)?l:j,u=arguments.length<3;return e(n,bi(t,4),r,u,vs)}function df(n,t,r){var e=yh(n)?s:j,u=arguments.length<3;return e(n,bi(t,4),r,u,gs)}function bf(n,t){return(yh(n)?i:ne)(n,Lf(bi(t,3)))}function wf(n){return(yh(n)?kr:eu)(n)}function mf(n,t,r){return t=(r?Li(n,t,r):t===Y)?1:jc(t), +(yh(n)?Or:uu)(n,t)}function xf(n){return(yh(n)?Ir:ou)(n)}function jf(n){if(null==n)return 0;if(Vf(n))return gc(n)?K(n):n.length;var t=Is(n);return t==Zn||t==Qn?n.size:$e(n).length}function Af(n,t,r){var e=yh(n)?h:cu;return r&&Li(n,t,r)&&(t=Y),e(n,bi(t,3))}function kf(n,t){if("function"!=typeof t)throw new sl(tn);return n=jc(n),function(){if(--n<1)return t.apply(this,arguments)}}function Of(n,t,r){return t=r?Y:t,t=n&&null==t?n.length:t,fi(n,dn,Y,Y,Y,Y,t)}function If(n,t){var r;if("function"!=typeof t)throw new sl(tn); +return n=jc(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=Y),r}}function Rf(n,t,r){t=r?Y:t;var e=fi(n,_n,Y,Y,Y,Y,Y,t);return e.placeholder=Rf.placeholder,e}function zf(n,t,r){t=r?Y:t;var e=fi(n,vn,Y,Y,Y,Y,Y,t);return e.placeholder=zf.placeholder,e}function Ef(n,t,r){function e(t){var r=h,e=p;return h=p=Y,d=t,v=n.apply(e,r)}function u(n){return d=n,g=Es(f,t),b?e(n):v}function i(n){var r=n-y,e=n-d,u=t-r;return w?Vl(u,_-e):u}function o(n){var r=n-y,e=n-d;return y===Y||r>=t||r<0||w&&e>=_; +}function f(){var n=ih();return o(n)?c(n):(g=Es(f,i(n)),Y)}function c(n){return g=Y,m&&h?e(n):(h=p=Y,v)}function a(){g!==Y&&xs(g),d=0,h=y=p=g=Y}function l(){return g===Y?v:c(ih())}function s(){var n=ih(),r=o(n);if(h=arguments,p=this,y=n,r){if(g===Y)return u(y);if(w)return xs(g),g=Es(f,t),e(y)}return g===Y&&(g=Es(f,t)),v}var h,p,_,v,g,y,d=0,b=!1,w=!1,m=!0;if("function"!=typeof n)throw new sl(tn);return t=kc(t)||0,ic(r)&&(b=!!r.leading,w="maxWait"in r,_=w?Kl(kc(r.maxWait)||0,t):_,m="trailing"in r?!!r.trailing:m), +s.cancel=a,s.flush=l,s}function Sf(n){return fi(n,wn)}function Wf(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new sl(tn);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Wf.Cache||ar),r}function Lf(n){if("function"!=typeof n)throw new sl(tn);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2: +return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Cf(n){return If(2,n)}function Uf(n,t){if("function"!=typeof n)throw new sl(tn);return t=t===Y?t:jc(t),ru(n,t)}function Bf(t,r){if("function"!=typeof t)throw new sl(tn);return r=null==r?0:Kl(jc(r),0),ru(function(e){var u=e[r],i=Au(e,0,r);return u&&a(i,u),n(t,this,i)})}function Tf(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new sl(tn);return ic(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u), +Ef(n,t,{leading:e,maxWait:t,trailing:u})}function $f(n){return Of(n,1)}function Df(n,t){return sh(xu(t),n)}function Mf(){if(!arguments.length)return[];var n=arguments[0];return yh(n)?n:[n]}function Ff(n){return Dr(n,cn)}function Nf(n,t){return t="function"==typeof t?t:Y,Dr(n,cn,t)}function Pf(n){return Dr(n,on|cn)}function qf(n,t){return t="function"==typeof t?t:Y,Dr(n,on|cn,t)}function Zf(n,t){return null==t||Zr(n,t,Fc(t))}function Kf(n,t){return n===t||n!==n&&t!==t}function Vf(n){return null!=n&&uc(n.length)&&!rc(n); +}function Gf(n){return oc(n)&&Vf(n)}function Hf(n){return n===!0||n===!1||oc(n)&&de(n)==Dn}function Jf(n){return oc(n)&&1===n.nodeType&&!_c(n)}function Yf(n){if(null==n)return!0;if(Vf(n)&&(yh(n)||"string"==typeof n||"function"==typeof n.splice||bh(n)||Ah(n)||gh(n)))return!n.length;var t=Is(n);if(t==Zn||t==Qn)return!n.size;if($i(n))return!$e(n).length;for(var r in n)if(yl.call(n,r))return!1;return!0}function Qf(n,t){return ze(n,t)}function Xf(n,t,r){r="function"==typeof r?r:Y;var e=r?r(n,t):Y;return e===Y?ze(n,t,Y,r):!!e; +}function nc(n){if(!oc(n))return!1;var t=de(n);return t==Nn||t==Fn||"string"==typeof n.message&&"string"==typeof n.name&&!_c(n)}function tc(n){return"number"==typeof n&&Pl(n)}function rc(n){if(!ic(n))return!1;var t=de(n);return t==Pn||t==qn||t==$n||t==Jn}function ec(n){return"number"==typeof n&&n==jc(n)}function uc(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=zn}function ic(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function oc(n){return null!=n&&"object"==typeof n}function fc(n,t){ +return n===t||We(n,t,mi(t))}function cc(n,t,r){return r="function"==typeof r?r:Y,We(n,t,mi(t),r)}function ac(n){return pc(n)&&n!=+n}function lc(n){if(Rs(n))throw new il(nn);return Le(n)}function sc(n){return null===n}function hc(n){return null==n}function pc(n){return"number"==typeof n||oc(n)&&de(n)==Kn}function _c(n){if(!oc(n)||de(n)!=Gn)return!1;var t=Rl(n);if(null===t)return!0;var r=yl.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&gl.call(r)==ml}function vc(n){ +return ec(n)&&n>=-zn&&n<=zn}function gc(n){return"string"==typeof n||!yh(n)&&oc(n)&&de(n)==Xn}function yc(n){return"symbol"==typeof n||oc(n)&&de(n)==nt}function dc(n){return n===Y}function bc(n){return oc(n)&&Is(n)==rt}function wc(n){return oc(n)&&de(n)==et}function mc(n){if(!n)return[];if(Vf(n))return gc(n)?V(n):Uu(n);if(Ll&&n[Ll])return $(n[Ll]());var t=Is(n);return(t==Zn?D:t==Qn?N:na)(n)}function xc(n){if(!n)return 0===n?n:0;if(n=kc(n),n===Rn||n===-Rn){return(n<0?-1:1)*En}return n===n?n:0}function jc(n){ +var t=xc(n),r=t%1;return t===t?r?t-r:t:0}function Ac(n){return n?$r(jc(n),0,Wn):0}function kc(n){if("number"==typeof n)return n;if(yc(n))return Sn;if(ic(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=ic(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(Et,"");var r=Ft.test(n);return r||Pt.test(n)?Jr(n.slice(2),r?2:8):Mt.test(n)?Sn:+n}function Oc(n){return Bu(n,Nc(n))}function Ic(n){return n?$r(jc(n),-zn,zn):0===n?n:0}function Rc(n){return null==n?"":pu(n)}function zc(n,t){var r=_s(n); +return null==t?r:Wr(r,t)}function Ec(n,t){return v(n,bi(t,3),ee)}function Sc(n,t){return v(n,bi(t,3),ue)}function Wc(n,t){return null==n?n:ys(n,bi(t,3),Nc)}function Lc(n,t){return null==n?n:ds(n,bi(t,3),Nc)}function Cc(n,t){return n&&ee(n,bi(t,3))}function Uc(n,t){return n&&ue(n,bi(t,3))}function Bc(n){return null==n?[]:se(n,Fc(n))}function Tc(n){return null==n?[]:se(n,Nc(n))}function $c(n,t,r){var e=null==n?Y:ve(n,t);return e===Y?r:e}function Dc(n,t){return null!=n&&Oi(n,t,we)}function Mc(n,t){return null!=n&&Oi(n,t,me); +}function Fc(n){return Vf(n)?Ar(n):$e(n)}function Nc(n){return Vf(n)?Ar(n,!0):De(n)}function Pc(n,t){var r={};return t=bi(t,3),ee(n,function(n,e,u){Cr(r,t(n,e,u),n)}),r}function qc(n,t){var r={};return t=bi(t,3),ee(n,function(n,e,u){Cr(r,e,t(n,e,u))}),r}function Zc(n,t){return Kc(n,Lf(bi(t)))}function Kc(n,t){if(null==n)return{};var r=c(gi(n),function(n){return[n]});return t=bi(t),He(n,r,function(n,r){return t(n,r[0])})}function Vc(n,t,r){t=ju(t,n);var e=-1,u=t.length;for(u||(u=1,n=Y);++et){ +var e=n;n=t,t=e}if(r||n%1||t%1){var u=Jl();return Vl(n+u*(t-n+Hr("1e-"+((u+"").length-1))),t)}return Xe(n,t)}function ia(n){return Jh(Rc(n).toLowerCase())}function oa(n){return n=Rc(n),n&&n.replace(Zt,he).replace(Br,"")}function fa(n,t,r){n=Rc(n),t=pu(t);var e=n.length;r=r===Y?e:$r(jc(r),0,e);var u=r;return r-=t.length,r>=0&&n.slice(r,u)==t}function ca(n){return n=Rc(n),n&&mt.test(n)?n.replace(bt,pe):n}function aa(n){return n=Rc(n),n&&zt.test(n)?n.replace(Rt,"\\$&"):n}function la(n,t,r){n=Rc(n),t=jc(t); +var e=t?K(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return ni(Ml(u),r)+n+ni(Dl(u),r)}function sa(n,t,r){n=Rc(n),t=jc(t);var e=t?K(n):0;return t&&e>>0)?(n=Rc(n),n&&("string"==typeof t||null!=t&&!xh(t))&&(t=pu(t),!t&&B(n))?Au(V(n),0,r):n.split(t,r)):[]}function ya(n,t,r){return n=Rc(n),r=null==r?0:$r(jc(r),0,n.length),t=pu(t),n.slice(r,r+t.length)==t}function da(n,t,r){var e=q.templateSettings;r&&Li(n,t,r)&&(t=Y),n=Rc(n),t=zh({},t,e,ci);var u,i,o=zh({},t.imports,e.imports,ci),f=Fc(o),c=z(o,f),a=0,l=t.interpolate||Kt,s="__p += '",h=al((t.escape||Kt).source+"|"+l.source+"|"+(l===At?$t:Kt).source+"|"+(t.evaluate||Kt).source+"|$","g"),p="//# sourceURL="+(yl.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Nr+"]")+"\n"; +n.replace(h,function(t,r,e,o,f,c){return e||(e=o),s+=n.slice(a,c).replace(Vt,C),r&&(u=!0,s+="' +\n__e("+r+") +\n'"),f&&(i=!0,s+="';\n"+f+";\n__p += '"),e&&(s+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),a=c+t.length,t}),s+="';\n";var _=yl.call(t,"variable")&&t.variable;_||(s="with (obj) {\n"+s+"\n}\n"),s=(i?s.replace(vt,""):s).replace(gt,"$1").replace(yt,"$1;"),s="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+s+"return __p\n}"; +var v=Yh(function(){return ol(f,p+"return "+s).apply(Y,c)});if(v.source=s,nc(v))throw v;return v}function ba(n){return Rc(n).toLowerCase()}function wa(n){return Rc(n).toUpperCase()}function ma(n,t,r){if(n=Rc(n),n&&(r||t===Y))return n.replace(Et,"");if(!n||!(t=pu(t)))return n;var e=V(n),u=V(t);return Au(e,S(e,u),W(e,u)+1).join("")}function xa(n,t,r){if(n=Rc(n),n&&(r||t===Y))return n.replace(Wt,"");if(!n||!(t=pu(t)))return n;var e=V(n);return Au(e,0,W(e,V(t))+1).join("")}function ja(n,t,r){if(n=Rc(n), +n&&(r||t===Y))return n.replace(St,"");if(!n||!(t=pu(t)))return n;var e=V(n);return Au(e,S(e,V(t))).join("")}function Aa(n,t){var r=mn,e=xn;if(ic(t)){var u="separator"in t?t.separator:u;r="length"in t?jc(t.length):r,e="omission"in t?pu(t.omission):e}n=Rc(n);var i=n.length;if(B(n)){var o=V(n);i=o.length}if(r>=i)return n;var f=r-K(e);if(f<1)return e;var c=o?Au(o,0,f).join(""):n.slice(0,f);if(u===Y)return c+e;if(o&&(f+=c.length-f),xh(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=al(u.source,Rc(Dt.exec(u))+"g")), +u.lastIndex=0;a=u.exec(l);)var s=a.index;c=c.slice(0,s===Y?f:s)}}else if(n.indexOf(pu(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function ka(n){return n=Rc(n),n&&wt.test(n)?n.replace(dt,_e):n}function Oa(n,t,r){return n=Rc(n),t=r?Y:t,t===Y?T(n)?J(n):_(n):n.match(t)||[]}function Ia(t){var r=null==t?0:t.length,e=bi();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new sl(tn);return[e(n[0]),n[1]]}):[],ru(function(e){for(var u=-1;++uzn)return[];var r=Wn,e=Vl(n,Wn);t=bi(t),n-=Wn;for(var u=O(e,t);++r1?n[t-1]:Y;return r="function"==typeof r?(n.pop(), +r):Y,Vo(n,r)}),Js=_i(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Tr(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Bt&&Wi(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:Qo,args:[u],thisArg:Y}),new H(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(Y),n})):this.thru(u)}),Ys=Du(function(n,t,r){yl.call(n,r)?++n[r]:Cr(n,r,1)}),Qs=Gu(lo),Xs=Gu(so),nh=Du(function(n,t,r){yl.call(n,r)?n[r].push(t):Cr(n,r,[t])}),th=ru(function(t,r,e){var u=-1,i="function"==typeof r,o=Vf(t)?el(t.length):[]; +return vs(t,function(t){o[++u]=i?n(r,t,e):ke(t,r,e)}),o}),rh=Du(function(n,t,r){Cr(n,r,t)}),eh=Du(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),uh=ru(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Li(n,t[0],t[1])?t=[]:r>2&&Li(t[0],t[1],t[2])&&(t=[t[0]]),Ve(n,te(t,1),[])}),ih=Tl||function(){return Xr.Date.now()},oh=ru(function(n,t,r){var e=sn;if(r.length){var u=F(r,di(oh));e|=gn}return fi(n,e,t,r,u)}),fh=ru(function(n,t,r){var e=sn|hn;if(r.length){var u=F(r,di(fh));e|=gn; +}return fi(t,e,n,r,u)}),ch=ru(function(n,t){return Kr(n,1,t)}),ah=ru(function(n,t,r){return Kr(n,kc(t)||0,r)});Wf.Cache=ar;var lh=ms(function(t,r){r=1==r.length&&yh(r[0])?c(r[0],R(bi())):c(te(r,1),R(bi()));var e=r.length;return ru(function(u){for(var i=-1,o=Vl(u.length,e);++i=t}),gh=Oe(function(){return arguments}())?Oe:function(n){return oc(n)&&yl.call(n,"callee")&&!El.call(n,"callee")},yh=el.isArray,dh=ie?R(ie):Ie,bh=Nl||Na,wh=oe?R(oe):Re,mh=fe?R(fe):Se,xh=ce?R(ce):Ce,jh=ae?R(ae):Ue,Ah=le?R(le):Be,kh=ei(Me),Oh=ei(function(n,t){return n<=t}),Ih=Mu(function(n,t){if($i(t)||Vf(t))return Bu(t,Fc(t),n),Y;for(var r in t)yl.call(t,r)&&zr(n,r,t[r])}),Rh=Mu(function(n,t){Bu(t,Nc(t),n)}),zh=Mu(function(n,t,r,e){Bu(t,Nc(t),n,e)}),Eh=Mu(function(n,t,r,e){Bu(t,Fc(t),n,e); +}),Sh=_i(Tr),Wh=ru(function(n,t){n=cl(n);var r=-1,e=t.length,u=e>2?t[2]:Y;for(u&&Li(t[0],t[1],u)&&(e=1);++r1),t}),Bu(n,gi(n),r),e&&(r=Dr(r,on|fn|cn,li));for(var u=t.length;u--;)vu(r,t[u]);return r}),Mh=_i(function(n,t){return null==n?{}:Ge(n,t)}),Fh=oi(Fc),Nh=oi(Nc),Ph=Zu(function(n,t,r){return t=t.toLowerCase(),n+(r?ia(t):t)}),qh=Zu(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Zh=Zu(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Kh=qu("toLowerCase"),Vh=Zu(function(n,t,r){ +return n+(r?"_":"")+t.toLowerCase()}),Gh=Zu(function(n,t,r){return n+(r?" ":"")+Jh(t)}),Hh=Zu(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Jh=qu("toUpperCase"),Yh=ru(function(t,r){try{return n(t,Y,r)}catch(n){return nc(n)?n:new il(n)}}),Qh=_i(function(n,t){return r(t,function(t){t=Qi(t),Cr(n,t,oh(n[t],n))}),n}),Xh=Hu(),np=Hu(!0),tp=ru(function(n,t){return function(r){return ke(r,n,t)}}),rp=ru(function(n,t){return function(r){return ke(n,r,t)}}),ep=Xu(c),up=Xu(u),ip=Xu(h),op=ri(),fp=ri(!0),cp=Qu(function(n,t){ +return n+t},0),ap=ii("ceil"),lp=Qu(function(n,t){return n/t},1),sp=ii("floor"),hp=Qu(function(n,t){return n*t},1),pp=ii("round"),_p=Qu(function(n,t){return n-t},0);return q.after=kf,q.ary=Of,q.assign=Ih,q.assignIn=Rh,q.assignInWith=zh,q.assignWith=Eh,q.at=Sh,q.before=If,q.bind=oh,q.bindAll=Qh,q.bindKey=fh,q.castArray=Mf,q.chain=Jo,q.chunk=ro,q.compact=eo,q.concat=uo,q.cond=Ia,q.conforms=Ra,q.constant=za,q.countBy=Ys,q.create=zc,q.curry=Rf,q.curryRight=zf,q.debounce=Ef,q.defaults=Wh,q.defaultsDeep=Lh, +q.defer=ch,q.delay=ah,q.difference=Ls,q.differenceBy=Cs,q.differenceWith=Us,q.drop=io,q.dropRight=oo,q.dropRightWhile=fo,q.dropWhile=co,q.fill=ao,q.filter=cf,q.flatMap=af,q.flatMapDeep=lf,q.flatMapDepth=sf,q.flatten=ho,q.flattenDeep=po,q.flattenDepth=_o,q.flip=Sf,q.flow=Xh,q.flowRight=np,q.fromPairs=vo,q.functions=Bc,q.functionsIn=Tc,q.groupBy=nh,q.initial=bo,q.intersection=Bs,q.intersectionBy=Ts,q.intersectionWith=$s,q.invert=Ch,q.invertBy=Uh,q.invokeMap=th,q.iteratee=Wa,q.keyBy=rh,q.keys=Fc,q.keysIn=Nc, +q.map=vf,q.mapKeys=Pc,q.mapValues=qc,q.matches=La,q.matchesProperty=Ca,q.memoize=Wf,q.merge=Th,q.mergeWith=$h,q.method=tp,q.methodOf=rp,q.mixin=Ua,q.negate=Lf,q.nthArg=$a,q.omit=Dh,q.omitBy=Zc,q.once=Cf,q.orderBy=gf,q.over=ep,q.overArgs=lh,q.overEvery=up,q.overSome=ip,q.partial=sh,q.partialRight=hh,q.partition=eh,q.pick=Mh,q.pickBy=Kc,q.property=Da,q.propertyOf=Ma,q.pull=Ds,q.pullAll=Ao,q.pullAllBy=ko,q.pullAllWith=Oo,q.pullAt=Ms,q.range=op,q.rangeRight=fp,q.rearg=ph,q.reject=bf,q.remove=Io,q.rest=Uf, +q.reverse=Ro,q.sampleSize=mf,q.set=Gc,q.setWith=Hc,q.shuffle=xf,q.slice=zo,q.sortBy=uh,q.sortedUniq=Bo,q.sortedUniqBy=To,q.split=ga,q.spread=Bf,q.tail=$o,q.take=Do,q.takeRight=Mo,q.takeRightWhile=Fo,q.takeWhile=No,q.tap=Yo,q.throttle=Tf,q.thru=Qo,q.toArray=mc,q.toPairs=Fh,q.toPairsIn=Nh,q.toPath=Va,q.toPlainObject=Oc,q.transform=Jc,q.unary=$f,q.union=Fs,q.unionBy=Ns,q.unionWith=Ps,q.uniq=Po,q.uniqBy=qo,q.uniqWith=Zo,q.unset=Yc,q.unzip=Ko,q.unzipWith=Vo,q.update=Qc,q.updateWith=Xc,q.values=na,q.valuesIn=ta, +q.without=qs,q.words=Oa,q.wrap=Df,q.xor=Zs,q.xorBy=Ks,q.xorWith=Vs,q.zip=Gs,q.zipObject=Go,q.zipObjectDeep=Ho,q.zipWith=Hs,q.entries=Fh,q.entriesIn=Nh,q.extend=Rh,q.extendWith=zh,Ua(q,q),q.add=cp,q.attempt=Yh,q.camelCase=Ph,q.capitalize=ia,q.ceil=ap,q.clamp=ra,q.clone=Ff,q.cloneDeep=Pf,q.cloneDeepWith=qf,q.cloneWith=Nf,q.conformsTo=Zf,q.deburr=oa,q.defaultTo=Ea,q.divide=lp,q.endsWith=fa,q.eq=Kf,q.escape=ca,q.escapeRegExp=aa,q.every=ff,q.find=Qs,q.findIndex=lo,q.findKey=Ec,q.findLast=Xs,q.findLastIndex=so, +q.findLastKey=Sc,q.floor=sp,q.forEach=hf,q.forEachRight=pf,q.forIn=Wc,q.forInRight=Lc,q.forOwn=Cc,q.forOwnRight=Uc,q.get=$c,q.gt=_h,q.gte=vh,q.has=Dc,q.hasIn=Mc,q.head=go,q.identity=Sa,q.includes=_f,q.indexOf=yo,q.inRange=ea,q.invoke=Bh,q.isArguments=gh,q.isArray=yh,q.isArrayBuffer=dh,q.isArrayLike=Vf,q.isArrayLikeObject=Gf,q.isBoolean=Hf,q.isBuffer=bh,q.isDate=wh,q.isElement=Jf,q.isEmpty=Yf,q.isEqual=Qf,q.isEqualWith=Xf,q.isError=nc,q.isFinite=tc,q.isFunction=rc,q.isInteger=ec,q.isLength=uc,q.isMap=mh, +q.isMatch=fc,q.isMatchWith=cc,q.isNaN=ac,q.isNative=lc,q.isNil=hc,q.isNull=sc,q.isNumber=pc,q.isObject=ic,q.isObjectLike=oc,q.isPlainObject=_c,q.isRegExp=xh,q.isSafeInteger=vc,q.isSet=jh,q.isString=gc,q.isSymbol=yc,q.isTypedArray=Ah,q.isUndefined=dc,q.isWeakMap=bc,q.isWeakSet=wc,q.join=wo,q.kebabCase=qh,q.last=mo,q.lastIndexOf=xo,q.lowerCase=Zh,q.lowerFirst=Kh,q.lt=kh,q.lte=Oh,q.max=Ha,q.maxBy=Ja,q.mean=Ya,q.meanBy=Qa,q.min=Xa,q.minBy=nl,q.stubArray=Fa,q.stubFalse=Na,q.stubObject=Pa,q.stubString=qa, +q.stubTrue=Za,q.multiply=hp,q.nth=jo,q.noConflict=Ba,q.noop=Ta,q.now=ih,q.pad=la,q.padEnd=sa,q.padStart=ha,q.parseInt=pa,q.random=ua,q.reduce=yf,q.reduceRight=df,q.repeat=_a,q.replace=va,q.result=Vc,q.round=pp,q.runInContext=p,q.sample=wf,q.size=jf,q.snakeCase=Vh,q.some=Af,q.sortedIndex=Eo,q.sortedIndexBy=So,q.sortedIndexOf=Wo,q.sortedLastIndex=Lo,q.sortedLastIndexBy=Co,q.sortedLastIndexOf=Uo,q.startCase=Gh,q.startsWith=ya,q.subtract=_p,q.sum=tl,q.sumBy=rl,q.template=da,q.times=Ka,q.toFinite=xc,q.toInteger=jc, +q.toLength=Ac,q.toLower=ba,q.toNumber=kc,q.toSafeInteger=Ic,q.toString=Rc,q.toUpper=wa,q.trim=ma,q.trimEnd=xa,q.trimStart=ja,q.truncate=Aa,q.unescape=ka,q.uniqueId=Ga,q.upperCase=Hh,q.upperFirst=Jh,q.each=hf,q.eachRight=pf,q.first=go,Ua(q,function(){var n={};return ee(q,function(t,r){yl.call(q.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),q.VERSION=Q,r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){q[n].placeholder=q}),r(["drop","take"],function(n,t){Bt.prototype[n]=function(r){ +r=r===Y?1:Kl(jc(r),0);var e=this.__filtered__&&!t?new Bt(this):this.clone();return e.__filtered__?e.__takeCount__=Vl(r,e.__takeCount__):e.__views__.push({size:Vl(r,Wn),type:n+(e.__dir__<0?"Right":"")}),e},Bt.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==kn||r==In;Bt.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:bi(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){ +var r="take"+(t?"Right":"");Bt.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Bt.prototype[n]=function(){return this.__filtered__?new Bt(this):this[r](1)}}),Bt.prototype.compact=function(){return this.filter(Sa)},Bt.prototype.find=function(n){return this.filter(n).head()},Bt.prototype.findLast=function(n){return this.reverse().find(n)},Bt.prototype.invokeMap=ru(function(n,t){return"function"==typeof n?new Bt(this):this.map(function(r){ +return ke(r,n,t)})}),Bt.prototype.reject=function(n){return this.filter(Lf(bi(n)))},Bt.prototype.slice=function(n,t){n=jc(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Bt(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==Y&&(t=jc(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},Bt.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Bt.prototype.toArray=function(){return this.take(Wn)},ee(Bt.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=q[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t); +u&&(q.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Bt,c=o[0],l=f||yh(t),s=function(n){var t=u.apply(q,a([n],o));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(f=l=!1);var h=this.__chain__,p=!!this.__actions__.length,_=i&&!h,v=f&&!p;if(!i&&l){t=v?t:new Bt(this);var g=n.apply(t,o);return g.__actions__.push({func:Qo,args:[s],thisArg:Y}),new H(g,h)}return _&&v?n.apply(this,o):(g=this.thru(s),_?e?g.value()[0]:g.value():g)})}),r(["pop","push","shift","sort","splice","unshift"],function(n){ +var t=hl[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);q.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(yh(u)?u:[],n)}return this[r](function(r){return t.apply(yh(r)?r:[],n)})}}),ee(Bt.prototype,function(n,t){var r=q[t];if(r){var e=r.name+"";yl.call(is,e)||(is[e]=[]),is[e].push({name:t,func:r})}}),is[Ju(Y,hn).name]=[{name:"wrapper",func:Y}],Bt.prototype.clone=Gt,Bt.prototype.reverse=Ht,Bt.prototype.value=Jt,q.prototype.at=Js, +q.prototype.chain=Xo,q.prototype.commit=nf,q.prototype.next=tf,q.prototype.plant=ef,q.prototype.reverse=uf,q.prototype.toJSON=q.prototype.valueOf=q.prototype.value=of,q.prototype.first=q.prototype.head,Ll&&(q.prototype[Ll]=rf),q},ge=ve();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Xr._=ge,define(function(){return ge})):te?((te.exports=ge)._=ge,ne._=ge):Xr._=ge}).call(this); \ No newline at end of file From 1144918f3578a84fcc4986da9b806e63a6175cbb Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Wed, 8 Jul 2020 09:58:16 +0200 Subject: [PATCH 09/22] Rebuild lodash and docs --- dist/lodash.core.js | 2 +- dist/lodash.core.min.js | 4 +- dist/lodash.js | 2 +- dist/lodash.min.js | 2 +- doc/README.md | 671 +++++++++++++++++++++------------------- lodash.js | 2 +- package-lock.json | 2 +- package.json | 2 +- 8 files changed, 360 insertions(+), 327 deletions(-) diff --git a/dist/lodash.core.js b/dist/lodash.core.js index 89c77ded06..8ff97b9f50 100644 --- a/dist/lodash.core.js +++ b/dist/lodash.core.js @@ -13,7 +13,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.15'; + var VERSION = '4.17.16'; /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; diff --git a/dist/lodash.core.min.js b/dist/lodash.core.min.js index bb543ff54a..18cc6ae197 100644 --- a/dist/lodash.core.min.js +++ b/dist/lodash.core.min.js @@ -25,5 +25,5 @@ return G(2,n)},o.pick=$n,o.slice=function(n,t,r){var e=null==n?0:n.length;return return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return M(n)?n.length?A(n):[]:W(n)},o.values=W,o.extend=Bn,Y(o,o),o.clone=function(n){return V(n)?Nn(n)?A(n):k(n,_n(n)):n},o.escape=function(n){return(n=Q(n))&&rn.test(n)?n.replace(tn,fn):n},o.every=function(n,t,r){return t=r?Z:t,f(n,g(t))},o.find=An,o.forEach=z,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=q,o.identity=X,o.indexOf=P,o.isArguments=n,o.isArray=Nn,o.isBoolean=function(n){return true===n||false===n||H(n)&&"[object Boolean]"==hn.call(n); },o.isDate=function(n){return H(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return M(t)&&(Nn(t)||L(t)||U(t.splice)||n(t))?!t.length:!_n(t).length},o.isEqual=function(n,t){return b(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=U,o.isNaN=function(n){return K(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=K,o.isObject=V,o.isRegExp=function(n){return H(n)&&"[object RegExp]"==hn.call(n)},o.isString=L,o.isUndefined=function(n){return n===Z},o.last=function(n){ var t=null==n?0:n.length;return t?n[t-1]:Z},o.max=function(n){return n&&n.length?a(n,X,v):Z},o.min=function(n){return n&&n.length?a(n,X,_):Z},o.noConflict=function(){return on._===this&&(on._=vn),this},o.noop=function(){},o.reduce=C,o.result=function(n,t,r){return t=null==n?Z:n[t],t===Z&&(t=r),U(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=M(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?Z:t,E(n,g(t))},o.uniqueId=function(n){var t=++sn;return Q(n)+t},o.each=z,o.first=q,Y(o,function(){ -var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.15",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n); -})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return w(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o, define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this); \ No newline at end of file +var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.16",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n); +})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return w(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o, define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this); diff --git a/dist/lodash.js b/dist/lodash.js index 8b0caea3f6..b0b2dcbec0 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -12,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.15'; + var VERSION = '4.17.16'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; diff --git a/dist/lodash.min.js b/dist/lodash.min.js index 6618dd7c11..0c565322a5 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -12,7 +12,7 @@ return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;) for(var u=r-1,i=n.length;++u-1;);return r}function W(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}function C(n){return"\\"+Gr[n]}function U(n,t){ return null==n?Y:n[t]}function B(n){return Dr.test(n)}function T(n){return Mr.test(n)}function $(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function D(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function M(n,t){return function(r){return n(t(r))}}function F(n,t){for(var r=-1,e=n.length,u=0,i=[];++r>>1,Un=[["ary",dn],["bind",sn],["bindKey",hn],["curry",_n],["curryRight",vn],["flip",wn],["partial",gn],["partialRight",yn],["rearg",bn]],Bn="[object Arguments]",Tn="[object Array]",$n="[object AsyncFunction]",Dn="[object Boolean]",Mn="[object Date]",Fn="[object DOMException]",Nn="[object Error]",Pn="[object Function]",qn="[object GeneratorFunction]",Zn="[object Map]",Kn="[object Number]",Vn="[object Null]",Gn="[object Object]",Hn="[object Promise]",Jn="[object Proxy]",Yn="[object RegExp]",Qn="[object Set]",Xn="[object String]",nt="[object Symbol]",tt="[object Undefined]",rt="[object WeakMap]",et="[object WeakSet]",ut="[object ArrayBuffer]",it="[object DataView]",ot="[object Float32Array]",ft="[object Float64Array]",ct="[object Int8Array]",at="[object Int16Array]",lt="[object Int32Array]",st="[object Uint8Array]",ht="[object Uint8ClampedArray]",pt="[object Uint16Array]",_t="[object Uint32Array]",vt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39);/g,bt=/[&<>"']/g,wt=RegExp(dt.source),mt=RegExp(bt.source),xt=/<%-([\s\S]+?)%>/g,jt=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,It=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/[\\^$.*+?()[\]{}|]/g,zt=RegExp(Rt.source),Et=/^\s+|\s+$/g,St=/^\s+/,Wt=/\s+$/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ct=/\{\n\/\* \[wrapped with (.+)\] \*/,Ut=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tt=/\\(\\)?/g,$t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,Mt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Nt=/^\[object .+?Constructor\]$/,Pt=/^0o[0-7]+$/i,qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Vt=/['\n\r\u2028\u2029\\]/g,Gt="\\ud800-\\udfff",Ht="\\u0300-\\u036f",Jt="\\ufe20-\\ufe2f",Yt="\\u20d0-\\u20ff",Qt=Ht+Jt+Yt,Xt="\\u2700-\\u27bf",nr="a-z\\xdf-\\xf6\\xf8-\\xff",tr="\\xac\\xb1\\xd7\\xf7",rr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",er="\\u2000-\\u206f",ur=" \\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",ir="A-Z\\xc0-\\xd6\\xd8-\\xde",or="\\ufe0e\\ufe0f",fr=tr+rr+er+ur,cr="['\u2019]",ar="["+Gt+"]",lr="["+fr+"]",sr="["+Qt+"]",hr="\\d+",pr="["+Xt+"]",_r="["+nr+"]",vr="[^"+Gt+fr+hr+Xt+nr+ir+"]",gr="\\ud83c[\\udffb-\\udfff]",yr="(?:"+sr+"|"+gr+")",dr="[^"+Gt+"]",br="(?:\\ud83c[\\udde6-\\uddff]){2}",wr="[\\ud800-\\udbff][\\udc00-\\udfff]",mr="["+ir+"]",xr="\\u200d",jr="(?:"+_r+"|"+vr+")",Ar="(?:"+mr+"|"+vr+")",kr="(?:"+cr+"(?:d|ll|m|re|s|t|ve))?",Or="(?:"+cr+"(?:D|LL|M|RE|S|T|VE))?",Ir=yr+"?",Rr="["+or+"]?",zr="(?:"+xr+"(?:"+[dr,br,wr].join("|")+")"+Rr+Ir+")*",Er="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wr=Rr+Ir+zr,Lr="(?:"+[pr,br,wr].join("|")+")"+Wr,Cr="(?:"+[dr+sr+"?",sr,br,wr,ar].join("|")+")",Ur=RegExp(cr,"g"),Br=RegExp(sr,"g"),Tr=RegExp(gr+"(?="+gr+")|"+Cr+Wr,"g"),$r=RegExp([mr+"?"+_r+"+"+kr+"(?="+[lr,mr,"$"].join("|")+")",Ar+"+"+Or+"(?="+[lr,mr+jr,"$"].join("|")+")",mr+"?"+jr+"+"+kr,mr+"+"+Or,Sr,Er,hr,Lr].join("|"),"g"),Dr=RegExp("["+xr+Gt+Qt+or+"]"),Mr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nr=-1,Pr={}; +var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function q(n,t,r){for(var e=r-1,u=n.length;++e>>1,Un=[["ary",dn],["bind",sn],["bindKey",hn],["curry",_n],["curryRight",vn],["flip",wn],["partial",gn],["partialRight",yn],["rearg",bn]],Bn="[object Arguments]",Tn="[object Array]",$n="[object AsyncFunction]",Dn="[object Boolean]",Mn="[object Date]",Fn="[object DOMException]",Nn="[object Error]",Pn="[object Function]",qn="[object GeneratorFunction]",Zn="[object Map]",Kn="[object Number]",Vn="[object Null]",Gn="[object Object]",Hn="[object Promise]",Jn="[object Proxy]",Yn="[object RegExp]",Qn="[object Set]",Xn="[object String]",nt="[object Symbol]",tt="[object Undefined]",rt="[object WeakMap]",et="[object WeakSet]",ut="[object ArrayBuffer]",it="[object DataView]",ot="[object Float32Array]",ft="[object Float64Array]",ct="[object Int8Array]",at="[object Int16Array]",lt="[object Int32Array]",st="[object Uint8Array]",ht="[object Uint8ClampedArray]",pt="[object Uint16Array]",_t="[object Uint32Array]",vt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39);/g,bt=/[&<>"']/g,wt=RegExp(dt.source),mt=RegExp(bt.source),xt=/<%-([\s\S]+?)%>/g,jt=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,It=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/[\\^$.*+?()[\]{}|]/g,zt=RegExp(Rt.source),Et=/^\s+|\s+$/g,St=/^\s+/,Wt=/\s+$/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ct=/\{\n\/\* \[wrapped with (.+)\] \*/,Ut=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tt=/\\(\\)?/g,$t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,Mt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Nt=/^\[object .+?Constructor\]$/,Pt=/^0o[0-7]+$/i,qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Vt=/['\n\r\u2028\u2029\\]/g,Gt="\\ud800-\\udfff",Ht="\\u0300-\\u036f",Jt="\\ufe20-\\ufe2f",Yt="\\u20d0-\\u20ff",Qt=Ht+Jt+Yt,Xt="\\u2700-\\u27bf",nr="a-z\\xdf-\\xf6\\xf8-\\xff",tr="\\xac\\xb1\\xd7\\xf7",rr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",er="\\u2000-\\u206f",ur=" \\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",ir="A-Z\\xc0-\\xd6\\xd8-\\xde",or="\\ufe0e\\ufe0f",fr=tr+rr+er+ur,cr="['\u2019]",ar="["+Gt+"]",lr="["+fr+"]",sr="["+Qt+"]",hr="\\d+",pr="["+Xt+"]",_r="["+nr+"]",vr="[^"+Gt+fr+hr+Xt+nr+ir+"]",gr="\\ud83c[\\udffb-\\udfff]",yr="(?:"+sr+"|"+gr+")",dr="[^"+Gt+"]",br="(?:\\ud83c[\\udde6-\\uddff]){2}",wr="[\\ud800-\\udbff][\\udc00-\\udfff]",mr="["+ir+"]",xr="\\u200d",jr="(?:"+_r+"|"+vr+")",Ar="(?:"+mr+"|"+vr+")",kr="(?:"+cr+"(?:d|ll|m|re|s|t|ve))?",Or="(?:"+cr+"(?:D|LL|M|RE|S|T|VE))?",Ir=yr+"?",Rr="["+or+"]?",zr="(?:"+xr+"(?:"+[dr,br,wr].join("|")+")"+Rr+Ir+")*",Er="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wr=Rr+Ir+zr,Lr="(?:"+[pr,br,wr].join("|")+")"+Wr,Cr="(?:"+[dr+sr+"?",sr,br,wr,ar].join("|")+")",Ur=RegExp(cr,"g"),Br=RegExp(sr,"g"),Tr=RegExp(gr+"(?="+gr+")|"+Cr+Wr,"g"),$r=RegExp([mr+"?"+_r+"+"+kr+"(?="+[lr,mr,"$"].join("|")+")",Ar+"+"+Or+"(?="+[lr,mr+jr,"$"].join("|")+")",mr+"?"+jr+"+"+kr,mr+"+"+Or,Sr,Er,hr,Lr].join("|"),"g"),Dr=RegExp("["+xr+Gt+Qt+or+"]"),Mr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nr=-1,Pr={}; Pr[ot]=Pr[ft]=Pr[ct]=Pr[at]=Pr[lt]=Pr[st]=Pr[ht]=Pr[pt]=Pr[_t]=!0,Pr[Bn]=Pr[Tn]=Pr[ut]=Pr[Dn]=Pr[it]=Pr[Mn]=Pr[Nn]=Pr[Pn]=Pr[Zn]=Pr[Kn]=Pr[Gn]=Pr[Yn]=Pr[Qn]=Pr[Xn]=Pr[rt]=!1;var qr={};qr[Bn]=qr[Tn]=qr[ut]=qr[it]=qr[Dn]=qr[Mn]=qr[ot]=qr[ft]=qr[ct]=qr[at]=qr[lt]=qr[Zn]=qr[Kn]=qr[Gn]=qr[Yn]=qr[Qn]=qr[Xn]=qr[nt]=qr[st]=qr[ht]=qr[pt]=qr[_t]=!0,qr[Nn]=qr[Pn]=qr[rt]=!1;var Zr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a", "\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae", "\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g", diff --git a/doc/README.md b/doc/README.md index 332017c6ab..634c4cdd9e 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,4 @@ -# lodash v4.17.15 +# lodash v4.17.16 @@ -415,7 +415,7 @@

_.chunk(array, [size=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L6839 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L6861 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package") [Ⓣ][1] 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 @@ -446,7 +446,7 @@ _.chunk(['a', 'b', 'c', 'd'], 3);

_.compact(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L6874 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L6896 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package") [Ⓣ][1] Creates an array with all falsey values removed. The values `false`, `null`, `0`, `""`, `undefined`, and `NaN` are falsey. @@ -472,7 +472,7 @@ _.compact([0, 1, false, 2, '', 3]);

_.concat(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L6911 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.concat "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L6933 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.concat "See the npm package") [Ⓣ][1] Creates a new array concatenating `array` with any additional arrays and/or values. @@ -505,7 +505,7 @@ console.log(array);

_.difference(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L6947 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L6969 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package") [Ⓣ][1] Creates an array of `array` values not included in the other given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -537,7 +537,7 @@ _.difference([2, 1], [2, 3]);

_.differenceBy(array, [values], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L6979 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differenceby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7001 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differenceby "See the npm package") [Ⓣ][1] This method is like `_.difference` except that it accepts `iteratee` which is invoked for each element of `array` and `values` to generate the criterion @@ -575,7 +575,7 @@ _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');

_.differenceWith(array, [values], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7012 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differencewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7034 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differencewith "See the npm package") [Ⓣ][1] This method is like `_.difference` except that it accepts `comparator` which is invoked to compare elements of `array` to `values`. The order and @@ -610,7 +610,7 @@ _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);

_.drop(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7047 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7069 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements dropped from the beginning. @@ -645,7 +645,7 @@ _.drop([1, 2, 3], 0);

_.dropRight(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7081 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7103 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements dropped from the end. @@ -680,7 +680,7 @@ _.dropRight([1, 2, 3], 0);

_.dropRightWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7126 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7148 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package") [Ⓣ][1] Creates a slice of `array` excluding elements dropped from the end. Elements are dropped until `predicate` returns falsey. The predicate is @@ -726,7 +726,7 @@ _.dropRightWhile(users, 'active');

_.dropWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7167 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7189 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package") [Ⓣ][1] Creates a slice of `array` excluding elements dropped from the beginning. Elements are dropped until `predicate` returns falsey. The predicate is @@ -772,7 +772,7 @@ _.dropWhile(users, 'active');

_.fill(array, value, [start=0], [end=array.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7202 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package") [Ⓣ][1] Fills elements of `array` with `value` from `start` up to, but not including, `end`. @@ -813,7 +813,7 @@ _.fill([4, 6, 8, 10], '*', 1, 3);

_.findIndex(array, [predicate=_.identity], [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7249 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7271 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package") [Ⓣ][1] This method is like `_.find` except that it returns the index of the first element `predicate` returns truthy for instead of the element itself. @@ -859,7 +859,7 @@ _.findIndex(users, 'active');

_.findLastIndex(array, [predicate=_.identity], [fromIndex=array.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7296 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7318 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package") [Ⓣ][1] This method is like `_.findIndex` except that it iterates over elements of `collection` from right to left. @@ -905,7 +905,7 @@ _.findLastIndex(users, 'active');

_.flatten(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7325 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7347 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package") [Ⓣ][1] Flattens `array` a single level deep. @@ -930,7 +930,7 @@ _.flatten([1, [2, [3, [4]], 5]]);

_.flattenDeep(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7344 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7366 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") [Ⓣ][1] Recursively flattens `array`. @@ -955,7 +955,7 @@ _.flattenDeep([1, [2, [3, [4]], 5]]);

_.flattenDepth(array, [depth=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7369 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7391 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") [Ⓣ][1] Recursively flatten `array` up to `depth` times. @@ -986,7 +986,7 @@ _.flattenDepth(array, 2);

_.fromPairs(pairs)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7393 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.frompairs "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7415 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.frompairs "See the npm package") [Ⓣ][1] The inverse of `_.toPairs`; this method returns an object composed from key-value `pairs`. @@ -1012,7 +1012,7 @@ _.fromPairs([['a', 1], ['b', 2]]);

_.head(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7423 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7445 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package") [Ⓣ][1] Gets the first element of `array`. @@ -1043,7 +1043,7 @@ _.head([]);

_.indexOf(array, value, [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7450 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7472 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package") [Ⓣ][1] Gets the index at which the first occurrence of `value` is found in `array` using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -1077,7 +1077,7 @@ _.indexOf([1, 2, 1, 2], 2, 2);

_.initial(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7476 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7498 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package") [Ⓣ][1] Gets all but the last element of `array`. @@ -1102,7 +1102,7 @@ _.initial([1, 2, 3]);

_.intersection([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7498 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7520 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package") [Ⓣ][1] Creates an array of unique values that are included in all given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -1130,7 +1130,7 @@ _.intersection([2, 1], [2, 3]);

_.intersectionBy([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7528 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7550 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionby "See the npm package") [Ⓣ][1] This method is like `_.intersection` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion @@ -1164,7 +1164,7 @@ _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');

_.intersectionWith([arrays], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7563 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7585 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package") [Ⓣ][1] This method is like `_.intersection` except that it accepts `comparator` which is invoked to compare elements of `arrays`. The order and references @@ -1196,7 +1196,7 @@ _.intersectionWith(objects, others, _.isEqual);

_.join(array, [separator=','])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7591 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.join "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7613 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.join "See the npm package") [Ⓣ][1] Converts all elements in `array` into a string separated by `separator`. @@ -1222,7 +1222,7 @@ _.join(['a', 'b', 'c'], '~');

_.last(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7609 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7631 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") [Ⓣ][1] Gets the last element of `array`. @@ -1247,7 +1247,7 @@ _.last([1, 2, 3]);

_.lastIndexOf(array, value, [fromIndex=array.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7635 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7657 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package") [Ⓣ][1] This method is like `_.indexOf` except that it iterates over elements of `array` from right to left. @@ -1279,7 +1279,7 @@ _.lastIndexOf([1, 2, 1, 2], 2, 2);

_.nth(array, [n=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7671 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.nth "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7693 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.nth "See the npm package") [Ⓣ][1] Gets the element at index `n` of `array`. If `n` is negative, the nth element from the end is returned. @@ -1311,7 +1311,7 @@ _.nth(array, -2);

_.pull(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7698 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7720 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package") [Ⓣ][1] Removes all given values from `array` using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -1346,7 +1346,7 @@ console.log(array);

_.pullAll(array, values)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7720 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullall "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7742 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullall "See the npm package") [Ⓣ][1] This method is like `_.pull` except that it accepts an array of values to remove.
@@ -1378,7 +1378,7 @@ console.log(array);

_.pullAllBy(array, values, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7749 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7771 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallby "See the npm package") [Ⓣ][1] This method is like `_.pullAll` except that it accepts `iteratee` which is invoked for each element of `array` and `values` to generate the criterion @@ -1413,7 +1413,7 @@ console.log(array);

_.pullAllWith(array, values, [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7778 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7800 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallwith "See the npm package") [Ⓣ][1] This method is like `_.pullAll` except that it accepts `comparator` which is invoked to compare elements of `array` to `values`. The comparator is @@ -1448,7 +1448,7 @@ console.log(array);

_.pullAt(array, [indexes])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7808 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7830 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package") [Ⓣ][1] Removes elements from `array` corresponding to `indexes` and returns an array of removed elements. @@ -1484,7 +1484,7 @@ console.log(pulled);

_.remove(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7847 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7869 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package") [Ⓣ][1] Removes all elements from `array` that `predicate` returns truthy for and returns an array of the removed elements. The predicate is invoked @@ -1524,7 +1524,7 @@ console.log(evens);

_.reverse(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7891 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reverse "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7913 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reverse "See the npm package") [Ⓣ][1] Reverses `array` so that the first element becomes the last, the second element becomes the second to last, and so on. @@ -1559,7 +1559,7 @@ console.log(array);

_.slice(array, [start=0], [end=array.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7911 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7933 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package") [Ⓣ][1] Creates a slice of `array` from `start` up to, but not including, `end`.
@@ -1586,7 +1586,7 @@ returned.

_.sortedIndex(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7944 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7966 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package") [Ⓣ][1] Uses a binary search to determine the lowest index at which `value` should be inserted into `array` in order to maintain its sort order. @@ -1613,7 +1613,7 @@ _.sortedIndex([30, 50], 40);

_.sortedIndexBy(array, value, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7973 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7995 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package") [Ⓣ][1] This method is like `_.sortedIndex` except that it accepts `iteratee` which is invoked for `value` and each element of `array` to compute their @@ -1648,7 +1648,7 @@ _.sortedIndexBy(objects, { 'x': 4 }, 'x');

_.sortedIndexOf(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L7993 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8015 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package") [Ⓣ][1] This method is like `_.indexOf` except that it performs a binary search on a sorted `array`. @@ -1675,7 +1675,7 @@ _.sortedIndexOf([4, 5, 5, 5, 6], 5);

_.sortedLastIndex(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8022 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8044 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package") [Ⓣ][1] This method is like `_.sortedIndex` except that it returns the highest index at which `value` should be inserted into `array` in order to @@ -1703,7 +1703,7 @@ _.sortedLastIndex([4, 5, 5, 5, 6], 5);

_.sortedLastIndexBy(array, value, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8051 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8073 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package") [Ⓣ][1] This method is like `_.sortedLastIndex` except that it accepts `iteratee` which is invoked for `value` and each element of `array` to compute their @@ -1738,7 +1738,7 @@ _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');

_.sortedLastIndexOf(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8071 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8093 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package") [Ⓣ][1] This method is like `_.lastIndexOf` except that it performs a binary search on a sorted `array`. @@ -1765,7 +1765,7 @@ _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);

_.sortedUniq(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8097 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8119 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package") [Ⓣ][1] This method is like `_.uniq` except that it's designed and optimized for sorted arrays. @@ -1791,7 +1791,7 @@ _.sortedUniq([1, 1, 2]);

_.sortedUniqBy(array, [iteratee])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8119 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8141 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package") [Ⓣ][1] This method is like `_.uniqBy` except that it's designed and optimized for sorted arrays. @@ -1818,7 +1818,7 @@ _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);

_.tail(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8139 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tail "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8161 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tail "See the npm package") [Ⓣ][1] Gets all but the first element of `array`. @@ -1843,7 +1843,7 @@ _.tail([1, 2, 3]);

_.take(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8169 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8191 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements taken from the beginning. @@ -1878,7 +1878,7 @@ _.take([1, 2, 3], 0);

_.takeRight(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8202 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements taken from the end. @@ -1913,7 +1913,7 @@ _.takeRight([1, 2, 3], 0);

_.takeRightWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8247 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8269 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package") [Ⓣ][1] Creates a slice of `array` with elements taken from the end. Elements are taken until `predicate` returns falsey. The predicate is invoked with @@ -1959,7 +1959,7 @@ _.takeRightWhile(users, 'active');

_.takeWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8288 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8310 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package") [Ⓣ][1] Creates a slice of `array` with elements taken from the beginning. Elements are taken until `predicate` returns falsey. The predicate is invoked with @@ -2005,7 +2005,7 @@ _.takeWhile(users, 'active');

_.union([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8310 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8332 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package") [Ⓣ][1] Creates an array of unique values, in order, from all given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -2032,7 +2032,7 @@ _.union([2], [1, 2]);

_.unionBy([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8337 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8359 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionby "See the npm package") [Ⓣ][1] This method is like `_.union` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion by @@ -2066,7 +2066,7 @@ _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');

_.unionWith([arrays], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8366 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8388 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionwith "See the npm package") [Ⓣ][1] This method is like `_.union` except that it accepts `comparator` which is invoked to compare elements of `arrays`. Result values are chosen from @@ -2098,7 +2098,7 @@ _.unionWith(objects, others, _.isEqual);

_.uniq(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8390 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8412 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package") [Ⓣ][1] Creates a duplicate-free version of an array, using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -2127,7 +2127,7 @@ _.uniq([2, 1, 2]);

_.uniqBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8417 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8439 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqby "See the npm package") [Ⓣ][1] This method is like `_.uniq` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -2161,7 +2161,7 @@ _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');

_.uniqWith(array, [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8441 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8463 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqwith "See the npm package") [Ⓣ][1] This method is like `_.uniq` except that it accepts `comparator` which is invoked to compare elements of `array`. The order of result values is @@ -2192,7 +2192,7 @@ _.uniqWith(objects, _.isEqual);

_.unzip(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8465 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8487 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package") [Ⓣ][1] 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 @@ -2222,7 +2222,7 @@ _.unzip(zipped);

_.unzipWith(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8502 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzipwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8524 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzipwith "See the npm package") [Ⓣ][1] This method is like `_.unzip` except that it accepts `iteratee` to specify how regrouped values should be combined. The iteratee is invoked with the @@ -2253,7 +2253,7 @@ _.unzipWith(zipped, _.add);

_.without(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8535 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8557 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package") [Ⓣ][1] Creates an array excluding all given values using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -2284,7 +2284,7 @@ _.without([2, 1, 2, 3], 1, 2);

_.xor([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8559 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8581 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package") [Ⓣ][1] Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) @@ -2312,7 +2312,7 @@ _.xor([2, 1], [2, 3]);

_.xorBy([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8586 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8608 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorby "See the npm package") [Ⓣ][1] This method is like `_.xor` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion by @@ -2346,7 +2346,7 @@ _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');

_.xorWith([arrays], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8615 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8637 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorwith "See the npm package") [Ⓣ][1] This method is like `_.xor` except that it accepts `comparator` which is invoked to compare elements of `arrays`. The order of result values is @@ -2378,7 +2378,7 @@ _.xorWith(objects, others, _.isEqual);

_.zip([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8637 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8659 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package") [Ⓣ][1] Creates an array of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the @@ -2405,7 +2405,7 @@ _.zip(['a', 'b'], [1, 2], [true, false]);

_.zipObject([props=[]], [values=[]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8655 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8677 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package") [Ⓣ][1] This method is like `_.fromPairs` except that it accepts two arrays, one of property identifiers and one of corresponding values. @@ -2432,7 +2432,7 @@ _.zipObject(['a', 'b'], [1, 2]);

_.zipObjectDeep([props=[]], [values=[]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8674 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8696 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package") [Ⓣ][1] This method is like `_.zipObject` except that it supports property paths. @@ -2458,7 +2458,7 @@ _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);

_.zipWith([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8698 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8720 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipwith "See the npm package") [Ⓣ][1] This method is like `_.zip` except that it accepts `iteratee` to specify how grouped values should be combined. The iteratee is invoked with the @@ -2494,7 +2494,7 @@ _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {

_.countBy(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9077 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9099 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package") [Ⓣ][1] Creates an object composed of keys generated from the results of running each element of `collection` thru `iteratee`. The corresponding value of @@ -2527,7 +2527,7 @@ _.countBy(['one', 'two', 'three'], 'length');

_.every(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9126 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9148 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package") [Ⓣ][1] Checks if `predicate` returns truthy for **all** elements of `collection`. Iteration is stopped once `predicate` returns falsey. The predicate is @@ -2578,7 +2578,7 @@ _.every(users, 'active');

_.filter(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9171 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9197 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package") [Ⓣ][1] Iterates over elements of `collection`, returning an array of all elements `predicate` returns truthy for. The predicate is invoked with three @@ -2618,6 +2618,10 @@ _.filter(users, ['active', false]); // The `_.property` iteratee shorthand. _.filter(users, 'active'); // => objects for ['barney'] + +// Combining several predicates using `_.overEvery` or `_.overSome`. +_.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); +// => objects for ['fred', 'barney'] ``` --- @@ -2626,7 +2630,7 @@ _.filter(users, 'active');

_.find(collection, [predicate=_.identity], [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9212 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9238 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package") [Ⓣ][1] Iterates over elements of `collection`, returning the first element `predicate` returns truthy for. The predicate is invoked with three @@ -2673,7 +2677,7 @@ _.find(users, 'active');

_.findLast(collection, [predicate=_.identity], [fromIndex=collection.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9233 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9259 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package") [Ⓣ][1] This method is like `_.find` except that it iterates over elements of `collection` from right to left. @@ -2703,7 +2707,7 @@ _.findLast([1, 2, 3, 4], function(n) {

_.flatMap(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9256 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9282 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmap "See the npm package") [Ⓣ][1] Creates a flattened array of values by running each element in `collection` thru `iteratee` and flattening the mapped results. The iteratee is invoked @@ -2735,7 +2739,7 @@ _.flatMap([1, 2], duplicate);

_.flatMapDeep(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9280 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9306 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package") [Ⓣ][1] This method is like `_.flatMap` except that it recursively flattens the mapped results. @@ -2766,7 +2770,7 @@ _.flatMapDeep([1, 2], duplicate);

_.flatMapDepth(collection, [iteratee=_.identity], [depth=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9305 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9331 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package") [Ⓣ][1] This method is like `_.flatMap` except that it recursively flattens the mapped results up to `depth` times. @@ -2798,7 +2802,7 @@ _.flatMapDepth([1, 2], duplicate, 2);

_.forEach(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9340 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9366 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package") [Ⓣ][1] Iterates over elements of `collection` and invokes `iteratee` for each element. The iteratee is invoked with three arguments: *(value, index|key, collection)*. @@ -2841,7 +2845,7 @@ _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {

_.forEachRight(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9365 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9391 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package") [Ⓣ][1] This method is like `_.forEach` except that it iterates over elements of `collection` from right to left. @@ -2873,7 +2877,7 @@ _.forEachRight([1, 2], function(value) {

_.groupBy(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9393 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9419 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package") [Ⓣ][1] Creates an object composed of keys generated from the results of running each element of `collection` thru `iteratee`. The order of grouped values @@ -2907,7 +2911,7 @@ _.groupBy(['one', 'two', 'three'], 'length');

_.includes(collection, value, [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9431 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9457 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package") [Ⓣ][1] Checks if `value` is in `collection`. If `collection` is a string, it's checked for a substring of `value`, otherwise @@ -2947,7 +2951,7 @@ _.includes('abcd', 'bc');

_.invokeMap(collection, path, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9467 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invokemap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9493 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invokemap "See the npm package") [Ⓣ][1] Invokes the method at `path` of each element in `collection`, returning an array of the results of each invoked method. Any additional arguments @@ -2980,7 +2984,7 @@ _.invokeMap([123, 456], String.prototype.split, '');

_.keyBy(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9506 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keyby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9532 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keyby "See the npm package") [Ⓣ][1] Creates an object composed of keys generated from the results of running each element of `collection` thru `iteratee`. The corresponding value of @@ -3019,7 +3023,7 @@ _.keyBy(array, 'dir');

_.map(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9552 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9578 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package") [Ⓣ][1] Creates an array of values by running each element in `collection` thru `iteratee`. The iteratee is invoked with three arguments:
@@ -3074,7 +3078,7 @@ _.map(users, 'user');

_.orderBy(collection, [iteratees=[_.identity]], [orders])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9586 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.orderby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9612 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.orderby "See the npm package") [Ⓣ][1] 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 @@ -3112,7 +3116,7 @@ _.orderBy(users, ['user', 'age'], ['asc', 'desc']);

_.partition(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9636 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9662 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package") [Ⓣ][1] Creates an array of elements split into two groups, the first of which contains elements `predicate` returns truthy for, the second of which @@ -3159,7 +3163,7 @@ _.partition(users, 'active');

_.reduce(collection, [iteratee=_.identity], [accumulator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9677 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9703 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package") [Ⓣ][1] Reduces `collection` to a value which is the accumulated result of running each element in `collection` thru `iteratee`, where each successive @@ -3208,7 +3212,7 @@ _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {

_.reduceRight(collection, [iteratee=_.identity], [accumulator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9706 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9732 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package") [Ⓣ][1] This method is like `_.reduce` except that it iterates over elements of `collection` from right to left. @@ -3240,7 +3244,7 @@ _.reduceRight(array, function(flattened, other) {

_.reject(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9747 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9773 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package") [Ⓣ][1] The opposite of `_.filter`; this method returns the elements of `collection` that `predicate` does **not** return truthy for. @@ -3284,7 +3288,7 @@ _.reject(users, 'active');

_.sample(collection)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9766 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9792 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package") [Ⓣ][1] Gets a random element from `collection`. @@ -3309,7 +3313,7 @@ _.sample([1, 2, 3, 4]);

_.sampleSize(collection, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9791 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.samplesize "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9817 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.samplesize "See the npm package") [Ⓣ][1] Gets `n` random elements at unique keys from `collection` up to the size of `collection`. @@ -3339,7 +3343,7 @@ _.sampleSize([1, 2, 3], 4);

_.shuffle(collection)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9816 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9842 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package") [Ⓣ][1] Creates an array of shuffled values, using a version of the [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). @@ -3365,7 +3369,7 @@ _.shuffle([1, 2, 3, 4]);

_.size(collection)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9842 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9868 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package") [Ⓣ][1] Gets the size of `collection` by returning its length for array-like values or the number of own enumerable string keyed properties for objects. @@ -3397,7 +3401,7 @@ _.size('pebbles');

_.some(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9892 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9918 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package") [Ⓣ][1] Checks if `predicate` returns truthy for **any** element of `collection`. Iteration is stopped once `predicate` returns truthy. The predicate is @@ -3442,7 +3446,7 @@ _.some(users, 'active');

_.sortBy(collection, [iteratees=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9929 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9955 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package") [Ⓣ][1] Creates an array of elements, sorted in ascending order by the results of running each element in a collection thru each iteratee. This method @@ -3464,15 +3468,15 @@ equal elements. The iteratees are invoked with one argument: *(value)*. var users = [ { 'user': 'fred', 'age': 48 }, { 'user': 'barney', 'age': 36 }, - { 'user': 'fred', 'age': 40 }, + { 'user': 'fred', 'age': 30 }, { 'user': 'barney', 'age': 34 } ]; _.sortBy(users, [function(o) { return o.user; }]); -// => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] +// => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] _.sortBy(users, ['user', 'age']); -// => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] +// => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] ``` --- @@ -3487,7 +3491,7 @@ _.sortBy(users, ['user', 'age']);

_.now()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9960 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9986 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package") [Ⓣ][1] Gets the timestamp of the number of milliseconds that have elapsed since the Unix epoch *(1 January `1970 00`:00:00 UTC)*. @@ -3518,7 +3522,7 @@ _.defer(function(stamp) {

_.after(n, func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9990 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10016 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package") [Ⓣ][1] The opposite of `_.before`; this method creates a function that invokes `func` once it's called `n` or more times. @@ -3553,7 +3557,7 @@ _.forEach(saves, function(type) {

_.ary(func, [n=func.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10019 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10045 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package") [Ⓣ][1] Creates a function that invokes `func`, with up to `n` arguments, ignoring any additional arguments. @@ -3580,7 +3584,7 @@ _.map(['6', '8', '10'], _.ary(parseInt, 1));

_.before(n, func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10042 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10068 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package") [Ⓣ][1] 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 @@ -3608,7 +3612,7 @@ jQuery(element).on('click', _.before(5, addContactToList));

_.bind(func, thisArg, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10094 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10120 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the `this` binding of `thisArg` and `partials` prepended to the arguments it receives. @@ -3656,7 +3660,7 @@ bound('hi');

_.bindKey(object, key, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10148 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10174 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package") [Ⓣ][1] Creates a function that invokes the method at `object[key]` with `partials` prepended to the arguments it receives. @@ -3714,7 +3718,7 @@ bound('hi');

_.curry(func, [arity=func.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10198 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package") [Ⓣ][1] Creates a function that accepts arguments of `func` and either invokes `func` returning its result, if at least `arity` number of arguments have @@ -3767,7 +3771,7 @@ curried(1)(_, 3)(2);

_.curryRight(func, [arity=func.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10243 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10269 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package") [Ⓣ][1] This method is like `_.curry` except that arguments are applied to `func` in the manner of `_.partialRight` instead of `_.partial`. @@ -3817,7 +3821,7 @@ curried(3)(1, _)(2);

_.debounce(func, [wait=0], [options={}])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10304 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10330 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package") [Ⓣ][1] Creates a debounced function that delays invoking `func` until after `wait` milliseconds have elapsed since the last time the debounced function was @@ -3882,7 +3886,7 @@ jQuery(window).on('popstate', debounced.cancel);

_.defer(func, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10447 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10473 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package") [Ⓣ][1] Defers invoking the `func` until the current call stack has cleared. Any additional arguments are provided to `func` when it's invoked. @@ -3911,7 +3915,7 @@ _.defer(function(text) {

_.delay(func, wait, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10470 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10496 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package") [Ⓣ][1] Invokes `func` after `wait` milliseconds. Any additional arguments are provided to `func` when it's invoked. @@ -3941,7 +3945,7 @@ _.delay(function(text) {

_.flip(func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10492 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10518 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with arguments reversed. @@ -3970,7 +3974,7 @@ flipped('a', 'b', 'c', 'd');

_.memoize(func, [resolver])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10540 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10566 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package") [Ⓣ][1] 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 @@ -4026,7 +4030,7 @@ _.memoize.Cache = WeakMap;

_.negate(predicate)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10583 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10609 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package") [Ⓣ][1] Creates a function that negates the result of the predicate `func`. The `func` predicate is invoked with the `this` binding and arguments of the @@ -4057,7 +4061,7 @@ _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));

_.once(func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10617 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10643 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package") [Ⓣ][1] 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 @@ -4086,7 +4090,7 @@ initialize();

_.overArgs(func, [transforms=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10652 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overargs "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10678 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overargs "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with its arguments transformed. @@ -4127,7 +4131,7 @@ func(10, 5);

_.partial(func, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10702 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10728 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with `partials` prepended to the arguments it receives. This method is like `_.bind` except it does **not** @@ -4173,7 +4177,7 @@ greetFred('hi');

_.partialRight(func, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10739 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10765 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package") [Ⓣ][1] This method is like `_.partial` except that partially applied arguments are appended to the arguments it receives. @@ -4218,7 +4222,7 @@ sayHelloTo('fred');

_.rearg(func, indexes)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10766 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10792 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with arguments arranged according to the specified `indexes` where the argument value at the first index is @@ -4251,7 +4255,7 @@ rearged('b', 'c', 'a')

_.rest(func, [start=func.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10795 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10821 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the `this` binding of the created function and arguments from `start` and beyond provided as @@ -4288,7 +4292,7 @@ say('hello', 'fred', 'barney', 'pebbles');

_.spread(func, [start=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10837 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10863 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the `this` binding of the create function and an array of arguments much like @@ -4334,7 +4338,7 @@ numbers.then(_.spread(function(x, y) {

_.throttle(func, [wait=0], [options={}])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10897 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10923 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package") [Ⓣ][1] Creates a throttled function that only invokes `func` at most once per every `wait` milliseconds. The throttled function comes with a `cancel` @@ -4390,7 +4394,7 @@ jQuery(window).on('popstate', throttled.cancel);

_.unary(func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10930 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unary "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10956 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unary "See the npm package") [Ⓣ][1] Creates a function that accepts up to one argument, ignoring any additional arguments. @@ -4416,7 +4420,7 @@ _.map(['6', '8', '10'], _.unary(parseInt));

_.wrap(value, [wrapper=identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10956 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10982 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package") [Ⓣ][1] Creates a function that provides `value` to `wrapper` as its first argument. Any additional arguments provided to the function are appended @@ -4455,7 +4459,7 @@ p('fred, barney, & pebbles');

_.castArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L10995 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.castarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11021 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.castarray "See the npm package") [Ⓣ][1] Casts `value` as an array if it's not one. @@ -4499,7 +4503,7 @@ console.log(_.castArray(array) === array);

_.clone(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11029 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11055 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package") [Ⓣ][1] Creates a shallow clone of `value`.
@@ -4536,7 +4540,7 @@ console.log(shallow[0] === objects[0]);

_.cloneDeep(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11087 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11113 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package") [Ⓣ][1] This method is like `_.clone` except that it recursively clones `value`. @@ -4564,7 +4568,7 @@ console.log(deep[0] === objects[0]);

_.cloneDeepWith(value, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11119 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11145 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package") [Ⓣ][1] This method is like `_.cloneWith` except that it recursively clones `value`. @@ -4602,7 +4606,7 @@ console.log(el.childNodes.length);

_.cloneWith(value, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11064 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11090 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonewith "See the npm package") [Ⓣ][1] This method is like `_.clone` except that it accepts `customizer` which is invoked to produce the cloned value. If `customizer` returns `undefined`, @@ -4643,7 +4647,7 @@ console.log(el.childNodes.length);

_.conformsTo(object, source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11148 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conformsto "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11174 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conformsto "See the npm package") [Ⓣ][1] Checks if `object` conforms to `source` by invoking the predicate properties of `source` with the corresponding property values of `object`. @@ -4679,7 +4683,7 @@ _.conformsTo(object, { 'b': function(n) { return n > 2; } });

_.eq(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11184 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.eq "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11210 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.eq "See the npm package") [Ⓣ][1] Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -4722,7 +4726,7 @@ _.eq(NaN, NaN);

_.gt(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11211 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11237 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package") [Ⓣ][1] Checks if `value` is greater than `other`. @@ -4754,7 +4758,7 @@ _.gt(1, 3);

_.gte(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11236 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gte "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11262 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gte "See the npm package") [Ⓣ][1] Checks if `value` is greater than or equal to `other`. @@ -4786,7 +4790,7 @@ _.gte(1, 3);

_.isArguments(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11258 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11284 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") [Ⓣ][1] Checks if `value` is likely an `arguments` object. @@ -4814,7 +4818,7 @@ _.isArguments([1, 2, 3]);

_.isArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11286 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11312 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") [Ⓣ][1] Checks if `value` is classified as an `Array` object. @@ -4848,7 +4852,7 @@ _.isArray(_.noop);

_.isArrayBuffer(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11305 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11331 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package") [Ⓣ][1] Checks if `value` is classified as an `ArrayBuffer` object. @@ -4876,7 +4880,7 @@ _.isArrayBuffer(new Array(2));

_.isArrayLike(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11332 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylike "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11358 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylike "See the npm package") [Ⓣ][1] 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 @@ -4912,7 +4916,7 @@ _.isArrayLike(_.noop);

_.isArrayLikeObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11361 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11387 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package") [Ⓣ][1] This method is like `_.isArrayLike` except that it also checks if `value` is an object. @@ -4947,7 +4951,7 @@ _.isArrayLikeObject(_.noop);

_.isBoolean(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11382 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11408 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package") [Ⓣ][1] Checks if `value` is classified as a boolean primitive or object. @@ -4975,7 +4979,7 @@ _.isBoolean(null);

_.isBuffer(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11404 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11430 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package") [Ⓣ][1] Checks if `value` is a buffer. @@ -5003,7 +5007,7 @@ _.isBuffer(new Uint8Array(2));

_.isDate(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11423 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11449 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Date` object. @@ -5031,7 +5035,7 @@ _.isDate('Mon April 23 2012');

_.isElement(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11442 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11468 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") [Ⓣ][1] Checks if `value` is likely a DOM element. @@ -5059,7 +5063,7 @@ _.isElement('');

_.isEmpty(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11479 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11505 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package") [Ⓣ][1] Checks if `value` is an empty object, collection, map, or set.
@@ -5105,7 +5109,7 @@ _.isEmpty({ 'a': 1 });

_.isEqual(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11531 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11557 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package") [Ⓣ][1] Performs a deep comparison between two values to determine if they are equivalent. @@ -5145,7 +5149,7 @@ object === other;

_.isEqualWith(value, other, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11567 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequalwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11593 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequalwith "See the npm package") [Ⓣ][1] This method is like `_.isEqual` except that it accepts `customizer` which is invoked to compare values. If `customizer` returns `undefined`, comparisons @@ -5188,7 +5192,7 @@ _.isEqualWith(array, other, customizer);

_.isError(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11591 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11617 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package") [Ⓣ][1] Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`, `TypeError`, or `URIError` object. @@ -5217,7 +5221,7 @@ _.isError(Error);

_.isFinite(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11626 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11652 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") [Ⓣ][1] Checks if `value` is a finite primitive number.
@@ -5255,7 +5259,7 @@ _.isFinite('3');

_.isFunction(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11647 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11673 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Function` object. @@ -5283,7 +5287,7 @@ _.isFunction(/abc/);

_.isInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11683 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11709 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package") [Ⓣ][1] Checks if `value` is an integer.
@@ -5321,7 +5325,7 @@ _.isInteger('3');

_.isLength(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11713 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11739 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package") [Ⓣ][1] Checks if `value` is a valid array-like length.
@@ -5359,7 +5363,7 @@ _.isLength('3');

_.isMap(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11793 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11819 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Map` object. @@ -5387,7 +5391,7 @@ _.isMap(new WeakMap);

_.isMatch(object, source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11823 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11849 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package") [Ⓣ][1] Performs a partial deep comparison between `object` and `source` to determine if `object` contains equivalent property values. @@ -5428,7 +5432,7 @@ _.isMatch(object, { 'b': 1 });

_.isMatchWith(object, source, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11859 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11885 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package") [Ⓣ][1] This method is like `_.isMatch` except that it accepts `customizer` which is invoked to compare values. If `customizer` returns `undefined`, comparisons @@ -5471,7 +5475,7 @@ _.isMatchWith(object, source, customizer);

_.isNaN(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11892 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11918 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") [Ⓣ][1] Checks if `value` is `NaN`.
@@ -5511,7 +5515,7 @@ _.isNaN(undefined);

_.isNative(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11925 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11951 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") [Ⓣ][1] Checks if `value` is a pristine native function.
@@ -5548,7 +5552,7 @@ _.isNative(_);

_.isNil(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11973 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11999 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package") [Ⓣ][1] Checks if `value` is `null` or `undefined`. @@ -5579,7 +5583,7 @@ _.isNil(NaN);

_.isNull(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11949 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11975 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") [Ⓣ][1] Checks if `value` is `null`. @@ -5607,7 +5611,7 @@ _.isNull(void 0);

_.isNumber(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12003 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12029 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Number` primitive or object.
@@ -5645,7 +5649,7 @@ _.isNumber('3');

_.isObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11743 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11769 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") [Ⓣ][1] Checks if `value` is the [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) @@ -5681,7 +5685,7 @@ _.isObject(null);

_.isObjectLike(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11772 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11798 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package") [Ⓣ][1] Checks if `value` is object-like. A value is object-like if it's not `null` and has a `typeof` result of "object". @@ -5716,7 +5720,7 @@ _.isObjectLike(null);

_.isPlainObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12036 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12062 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package") [Ⓣ][1] Checks if `value` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`. @@ -5755,7 +5759,7 @@ _.isPlainObject(Object.create(null));

_.isRegExp(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12066 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12092 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `RegExp` object. @@ -5783,7 +5787,7 @@ _.isRegExp('/abc/');

_.isSafeInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12095 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12121 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package") [Ⓣ][1] 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. @@ -5822,7 +5826,7 @@ _.isSafeInteger('3');

_.isSet(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12116 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12142 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Set` object. @@ -5850,7 +5854,7 @@ _.isSet(new WeakSet);

_.isString(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12135 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12161 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `String` primitive or object. @@ -5878,7 +5882,7 @@ _.isString(1);

_.isSymbol(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12157 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issymbol "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12183 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issymbol "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Symbol` primitive or object. @@ -5906,7 +5910,7 @@ _.isSymbol('abc');

_.isTypedArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12179 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12205 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") [Ⓣ][1] Checks if `value` is classified as a typed array. @@ -5934,7 +5938,7 @@ _.isTypedArray([]);

_.isUndefined(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12198 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") [Ⓣ][1] Checks if `value` is `undefined`. @@ -5962,7 +5966,7 @@ _.isUndefined(null);

_.isWeakMap(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12219 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12245 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `WeakMap` object. @@ -5990,7 +5994,7 @@ _.isWeakMap(new Map);

_.isWeakSet(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12240 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12266 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `WeakSet` object. @@ -6018,7 +6022,7 @@ _.isWeakSet(new Set);

_.lt(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12267 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12293 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package") [Ⓣ][1] Checks if `value` is less than `other`. @@ -6050,7 +6054,7 @@ _.lt(3, 1);

_.lte(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12292 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lte "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12318 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lte "See the npm package") [Ⓣ][1] Checks if `value` is less than or equal to `other`. @@ -6082,7 +6086,7 @@ _.lte(3, 1);

_.toArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12319 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12345 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") [Ⓣ][1] Converts `value` to an array. @@ -6116,7 +6120,7 @@ _.toArray(null);

_.toFinite(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12358 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tofinite "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12384 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tofinite "See the npm package") [Ⓣ][1] Converts `value` to a finite number. @@ -6150,7 +6154,7 @@ _.toFinite('3.2');

_.toInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12396 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12422 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package") [Ⓣ][1] Converts `value` to an integer.
@@ -6188,7 +6192,7 @@ _.toInteger('3.2');

_.toLength(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12430 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolength "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12456 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolength "See the npm package") [Ⓣ][1] Converts `value` to an integer suitable for use as the length of an array-like object. @@ -6227,7 +6231,7 @@ _.toLength('3.2');

_.toNumber(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12457 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12483 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package") [Ⓣ][1] Converts `value` to a number. @@ -6261,7 +6265,7 @@ _.toNumber('3.2');

_.toPlainObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12502 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12528 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package") [Ⓣ][1] Converts `value` to a plain object flattening inherited enumerable string keyed properties of `value` to own properties of the plain object. @@ -6296,7 +6300,7 @@ _.assign({ 'a': 1 }, _.toPlainObject(new Foo));

_.toSafeInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12530 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12556 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package") [Ⓣ][1] Converts `value` to a safe integer. A safe integer can be compared and represented correctly. @@ -6331,7 +6335,7 @@ _.toSafeInteger('3.2');

_.toString(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12557 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tostring "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12583 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tostring "See the npm package") [Ⓣ][1] Converts `value` to a string. An empty string is returned for `null` and `undefined` values. The sign of `-0` is preserved. @@ -6369,7 +6373,7 @@ _.toString([1, 2, 3]);

_.add(augend, addend)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16192 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16241 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") [Ⓣ][1] Adds two numbers. @@ -6395,7 +6399,7 @@ _.add(6, 4);

_.ceil(number, [precision=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16217 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16266 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package") [Ⓣ][1] Computes `number` rounded up to `precision`. @@ -6427,7 +6431,7 @@ _.ceil(6040, -2);

_.divide(dividend, divisor)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16234 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.divide "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16283 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.divide "See the npm package") [Ⓣ][1] Divide two numbers. @@ -6453,7 +6457,7 @@ _.divide(6, 4);

_.floor(number, [precision=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16259 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16308 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package") [Ⓣ][1] Computes `number` rounded down to `precision`. @@ -6485,7 +6489,7 @@ _.floor(4060, -2);

_.max(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16279 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16328 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package") [Ⓣ][1] Computes the maximum value of `array`. If `array` is empty or falsey, `undefined` is returned. @@ -6514,7 +6518,7 @@ _.max([]);

_.maxBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16308 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.maxby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16357 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.maxby "See the npm package") [Ⓣ][1] This method is like `_.max` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -6548,7 +6552,7 @@ _.maxBy(objects, 'n');

_.mean(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16328 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16377 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package") [Ⓣ][1] Computes the mean of the values in `array`. @@ -6573,7 +6577,7 @@ _.mean([4, 2, 8, 6]);

_.meanBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16355 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.meanby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16404 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.meanby "See the npm package") [Ⓣ][1] 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. @@ -6607,7 +6611,7 @@ _.meanBy(objects, 'n');

_.min(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16377 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16426 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package") [Ⓣ][1] Computes the minimum value of `array`. If `array` is empty or falsey, `undefined` is returned. @@ -6636,7 +6640,7 @@ _.min([]);

_.minBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16406 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.minby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16455 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.minby "See the npm package") [Ⓣ][1] This method is like `_.min` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -6670,7 +6674,7 @@ _.minBy(objects, 'n');

_.multiply(multiplier, multiplicand)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16427 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.multiply "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16476 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.multiply "See the npm package") [Ⓣ][1] Multiply two numbers. @@ -6696,7 +6700,7 @@ _.multiply(6, 4);

_.round(number, [precision=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16452 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16501 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package") [Ⓣ][1] Computes `number` rounded to `precision`. @@ -6728,7 +6732,7 @@ _.round(4060, -2);

_.subtract(minuend, subtrahend)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16469 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16518 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package") [Ⓣ][1] Subtract two numbers. @@ -6754,7 +6758,7 @@ _.subtract(6, 4);

_.sum(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16487 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16536 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") [Ⓣ][1] Computes the sum of the values in `array`. @@ -6779,7 +6783,7 @@ _.sum([4, 2, 8, 6]);

_.sumBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16516 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sumby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16565 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sumby "See the npm package") [Ⓣ][1] 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. @@ -6819,7 +6823,7 @@ _.sumBy(objects, 'n');

_.clamp(number, [lower], upper)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13981 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14007 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package") [Ⓣ][1] Clamps `number` within the inclusive `lower` and `upper` bounds. @@ -6849,7 +6853,7 @@ _.clamp(10, -5, 5);

_.inRange(number, [start=0], end)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14035 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14061 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package") [Ⓣ][1] 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`. @@ -6897,7 +6901,7 @@ _.inRange(-3, -2, -6);

_.random([lower=0], [upper=1], [floating])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14078 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14104 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package") [Ⓣ][1] 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 @@ -6946,7 +6950,7 @@ _.random(1.2, 5.2);

_.assign(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12595 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12621 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package") [Ⓣ][1] Assigns own enumerable string keyed properties of source objects to the destination object. Source objects are applied from left to right. @@ -6989,7 +6993,7 @@ _.assign({ 'a': 0 }, new Foo, new Bar);

_.assignIn(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12638 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12664 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignin "See the npm package") [Ⓣ][1] This method is like `_.assign` except that it iterates over own and inherited source properties. @@ -7033,7 +7037,7 @@ _.assignIn({ 'a': 0 }, new Foo, new Bar);

_.assignInWith(object, sources, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12671 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assigninwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12697 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assigninwith "See the npm package") [Ⓣ][1] This method is like `_.assignIn` except that it accepts `customizer` which is invoked to produce the assigned values. If `customizer` returns @@ -7075,7 +7079,7 @@ defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });

_.assignWith(object, sources, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12703 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12729 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignwith "See the npm package") [Ⓣ][1] This method is like `_.assign` except that it accepts `customizer` which is invoked to produce the assigned values. If `customizer` returns @@ -7114,7 +7118,7 @@ defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });

_.at(object, [paths])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12724 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12750 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package") [Ⓣ][1] Creates an array of values corresponding to `paths` of `object`. @@ -7142,7 +7146,7 @@ _.at(object, ['a[0].b.c', 'a[1]']);

_.create(prototype, [properties])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12760 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12786 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package") [Ⓣ][1] Creates an object that inherits from the `prototype` object. If a `properties` object is given, its own enumerable string keyed properties @@ -7187,7 +7191,7 @@ circle instanceof Shape;

_.defaults(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12786 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12812 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package") [Ⓣ][1] Assigns own and inherited enumerable string keyed properties of source objects to the destination object for all destination properties that @@ -7219,7 +7223,7 @@ _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });

_.defaultsDeep(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12836 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12862 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package") [Ⓣ][1] This method is like `_.defaults` except that it recursively assigns default properties. @@ -7249,7 +7253,7 @@ _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });

_.findKey(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12876 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12902 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package") [Ⓣ][1] This method is like `_.find` except that it returns the key of the first element `predicate` returns truthy for instead of the element itself. @@ -7294,7 +7298,7 @@ _.findKey(users, 'active');

_.findLastKey(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12915 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12941 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package") [Ⓣ][1] This method is like `_.findKey` except that it iterates over elements of a collection in the opposite order. @@ -7339,7 +7343,7 @@ _.findLastKey(users, 'active');

_.forIn(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12947 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12973 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package") [Ⓣ][1] Iterates over own and inherited enumerable string keyed properties of an object and invokes `iteratee` for each property. The iteratee is invoked @@ -7377,7 +7381,7 @@ _.forIn(new Foo, function(value, key) {

_.forInRight(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L12979 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13005 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package") [Ⓣ][1] This method is like `_.forIn` except that it iterates over properties of `object` in the opposite order. @@ -7413,7 +7417,7 @@ _.forInRight(new Foo, function(value, key) {

_.forOwn(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13013 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13039 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package") [Ⓣ][1] Iterates over own enumerable string keyed properties of an object and invokes `iteratee` for each property. The iteratee is invoked with three @@ -7451,7 +7455,7 @@ _.forOwn(new Foo, function(value, key) {

_.forOwnRight(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13043 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13069 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package") [Ⓣ][1] This method is like `_.forOwn` except that it iterates over properties of `object` in the opposite order. @@ -7487,7 +7491,7 @@ _.forOwnRight(new Foo, function(value, key) {

_.functions(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13070 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13096 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package") [Ⓣ][1] Creates an array of function property names from own enumerable properties of `object`. @@ -7520,7 +7524,7 @@ _.functions(new Foo);

_.functionsIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13097 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functionsin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13123 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functionsin "See the npm package") [Ⓣ][1] Creates an array of function property names from own and inherited enumerable properties of `object`. @@ -7553,7 +7557,7 @@ _.functionsIn(new Foo);

_.get(object, path, [defaultValue])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13126 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13152 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package") [Ⓣ][1] Gets the value at `path` of `object`. If the resolved value is `undefined`, the `defaultValue` is returned in its place. @@ -7589,7 +7593,7 @@ _.get(object, 'a.b.c', 'default');

_.has(object, path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13158 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13184 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") [Ⓣ][1] Checks if `path` is a direct property of `object`. @@ -7627,7 +7631,7 @@ _.has(other, 'a');

_.hasIn(object, path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13188 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.hasin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13214 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.hasin "See the npm package") [Ⓣ][1] Checks if `path` is a direct or inherited property of `object`. @@ -7664,7 +7668,7 @@ _.hasIn(object, 'b');

_.invert(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13210 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13236 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package") [Ⓣ][1] Creates an object composed of the inverted keys and values of `object`. If `object` contains duplicate values, subsequent values overwrite @@ -7693,7 +7697,7 @@ _.invert(object);

_.invertBy(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13245 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invertby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13271 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invertby "See the npm package") [Ⓣ][1] This method is like `_.invert` except that the inverted object is generated from the results of running each element of `object` thru `iteratee`. The @@ -7730,7 +7734,7 @@ _.invertBy(object, function(value) {

_.invoke(object, path, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13276 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13302 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package") [Ⓣ][1] Invokes the method at `path` of `object`. @@ -7759,7 +7763,7 @@ _.invoke(object, 'a[0].b.c.slice', 1, 3);

_.keys(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13306 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13332 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package") [Ⓣ][1] Creates an array of the own enumerable property names of `object`.
@@ -7799,7 +7803,7 @@ _.keys('hi');

_.keysIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13333 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13359 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package") [Ⓣ][1] Creates an array of the own and inherited enumerable property names of `object`.
@@ -7834,7 +7838,7 @@ _.keysIn(new Foo);

_.mapKeys(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13358 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapkeys "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13384 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapkeys "See the npm package") [Ⓣ][1] The opposite of `_.mapValues`; this method creates an object with the same values as `object` and keys generated by running each own enumerable @@ -7865,7 +7869,7 @@ _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {

_.mapValues(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13396 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13422 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package") [Ⓣ][1] Creates an object with the same keys as `object` and values generated by running each own enumerable string keyed property of `object` thru @@ -7903,7 +7907,7 @@ _.mapValues(users, 'age');

_.merge(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13437 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13463 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package") [Ⓣ][1] This method is like `_.assign` except that it recursively merges own and inherited enumerable string keyed properties of source objects into the @@ -7946,7 +7950,7 @@ _.merge(object, other);

_.mergeWith(object, sources, customizer)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13472 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mergewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13498 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mergewith "See the npm package") [Ⓣ][1] This method is like `_.merge` except that it accepts `customizer` which is invoked to produce the merged values of the destination and source @@ -7989,7 +7993,7 @@ _.mergeWith(object, other, customizer);

_.omit(object, [paths])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13496 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13522 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package") [Ⓣ][1] The opposite of `_.pick`; this method creates an object composed of the own and inherited enumerable property paths of `object` that are not omitted. @@ -8021,7 +8025,7 @@ _.omit(object, ['a', 'c']);

_.omitBy(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13538 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omitby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13564 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omitby "See the npm package") [Ⓣ][1] The opposite of `_.pickBy`; this method creates an object composed of the own and inherited enumerable string keyed properties of `object` that @@ -8052,7 +8056,7 @@ _.omitBy(object, _.isNumber);

_.pick(object, [paths])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13559 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13585 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package") [Ⓣ][1] Creates an object composed of the picked `object` properties. @@ -8080,7 +8084,7 @@ _.pick(object, ['a', 'c']);

_.pickBy(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13581 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pickby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13607 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pickby "See the npm package") [Ⓣ][1] Creates an object composed of the `object` properties `predicate` returns truthy for. The predicate is invoked with two arguments: *(value, key)*. @@ -8109,7 +8113,7 @@ _.pickBy(object, _.isNumber);

_.result(object, path, [defaultValue])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13623 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13649 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package") [Ⓣ][1] 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 @@ -8149,7 +8153,7 @@ _.result(object, 'a[0].b.c3', _.constant('default'));

_.set(object, path, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13673 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13699 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package") [Ⓣ][1] 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 @@ -8189,7 +8193,7 @@ console.log(object.x[0].y.z);

_.setWith(object, path, value, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13701 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.setwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13727 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.setwith "See the npm package") [Ⓣ][1] This method is like `_.set` except that it accepts `customizer` which is invoked to produce the objects of `path`. If `customizer` returns `undefined` @@ -8225,7 +8229,7 @@ _.setWith(object, '[0][1]', 'a', Object);

_.toPairs(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13730 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairs "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13756 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairs "See the npm package") [Ⓣ][1] Creates an array of own enumerable string keyed-value pairs for `object` which can be consumed by `_.fromPairs`. If `object` is a map or set, its @@ -8262,7 +8266,7 @@ _.toPairs(new Foo);

_.toPairsIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13756 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairsin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13782 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairsin "See the npm package") [Ⓣ][1] Creates an array of own and inherited enumerable string keyed-value pairs for `object` which can be consumed by `_.fromPairs`. If `object` is a map @@ -8299,7 +8303,7 @@ _.toPairsIn(new Foo);

_.transform(object, [iteratee=_.identity], [accumulator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13788 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13814 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package") [Ⓣ][1] An alternative to `_.reduce`; this method transforms `object` to a new `accumulator` object which is the result of running each of its own @@ -8340,7 +8344,7 @@ _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {

_.unset(object, path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13838 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13864 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package") [Ⓣ][1] Removes the property at `path` of `object`.
@@ -8379,7 +8383,7 @@ console.log(object);

_.update(object, path, updater)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13869 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.update "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13895 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.update "See the npm package") [Ⓣ][1] This method is like `_.set` except that accepts `updater` to produce the value to set. Use `_.updateWith` to customize `path` creation. The `updater` @@ -8418,7 +8422,7 @@ console.log(object.x[0].y.z);

_.updateWith(object, path, updater, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13897 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.updatewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13923 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.updatewith "See the npm package") [Ⓣ][1] This method is like `_.update` except that it accepts `customizer` which is invoked to produce the objects of `path`. If `customizer` returns `undefined` @@ -8454,7 +8458,7 @@ _.updateWith(object, '[0][1]', _.constant('a'), Object);

_.values(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13928 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13954 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package") [Ⓣ][1] Creates an array of the own enumerable string keyed property values of `object`.
@@ -8492,7 +8496,7 @@ _.values('hi');

_.valuesIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L13956 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13982 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package") [Ⓣ][1] Creates an array of the own and inherited enumerable string keyed property values of `object`. @@ -8534,7 +8538,7 @@ _.valuesIn(new Foo);

_(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L1648 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1648 "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, @@ -8670,7 +8674,7 @@ _.isArray(squares.value());

_.chain(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8737 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8759 "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 @@ -8710,7 +8714,7 @@ var youngest = _

_.tap(value, interceptor)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8766 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8788 "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 @@ -8744,7 +8748,7 @@ _([1, 2, 3])

_.thru(value, interceptor)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8794 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8816 "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 @@ -8778,7 +8782,7 @@ _(' abc ')

_.prototype[Symbol.iterator]()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8949 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8971 "View in source") [Ⓣ][1] Enables the wrapper to be iterable. @@ -8805,7 +8809,7 @@ Array.from(wrapped);

_.prototype.at([paths])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8814 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8836 "View in source") [Ⓣ][1] This method is the wrapper version of `_.at`. @@ -8832,7 +8836,7 @@ _(object).at(['a[0].b.c', 'a[1]']).value();

_.prototype.chain()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8865 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8887 "View in source") [Ⓣ][1] Creates a `lodash` wrapper instance with explicit method chain sequences enabled. @@ -8868,7 +8872,7 @@ _(users)

_.prototype.commit()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8895 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8917 "View in source") [Ⓣ][1] Executes the chain sequence and returns the wrapped result. @@ -8903,7 +8907,7 @@ console.log(array);

_.prototype.next()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8921 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8943 "View in source") [Ⓣ][1] Gets the next value on a wrapped object following the [iterator protocol](https://mdn.io/iteration_protocols#iterator). @@ -8934,7 +8938,7 @@ wrapped.next();

_.prototype.plant(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L8977 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8999 "View in source") [Ⓣ][1] Creates a clone of the chain sequence planting `value` as the wrapped value. @@ -8969,7 +8973,7 @@ wrapped.value();

_.prototype.reverse()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9017 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9039 "View in source") [Ⓣ][1] This method is the wrapper version of `_.reverse`.
@@ -8999,7 +9003,7 @@ console.log(array);

_.prototype.value()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9049 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9071 "View in source") [Ⓣ][1] Executes the chain sequence to resolve the unwrapped value. @@ -9030,7 +9034,7 @@ _([1, 2, 3]).value();

_.camelCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14139 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14165 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package") [Ⓣ][1] Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). @@ -9061,7 +9065,7 @@ _.camelCase('__FOO_BAR__');

_.capitalize([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14159 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14185 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package") [Ⓣ][1] Converts the first character of `string` to upper case and the remaining to lower case. @@ -9087,7 +9091,7 @@ _.capitalize('FRED');

_.deburr([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14181 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14207 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package") [Ⓣ][1] Deburrs `string` by converting [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) @@ -9116,7 +9120,7 @@ _.deburr('déjà vu');

_.endsWith([string=''], [target], [position=string.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14209 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14235 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") [Ⓣ][1] Checks if `string` ends with the given target string. @@ -9149,7 +9153,7 @@ _.endsWith('abc', 'b', 2);

_.escape([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14251 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14277 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package") [Ⓣ][1] Converts the characters "&", "<", ">", '"', and "'" in `string` to their corresponding HTML entities. @@ -9191,7 +9195,7 @@ _.escape('fred, barney, & pebbles');

_.escapeRegExp([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14273 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14299 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") [Ⓣ][1] Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. @@ -9217,7 +9221,7 @@ _.escapeRegExp('[lodash](https://lodash.com/)');

_.kebabCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14301 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14327 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package") [Ⓣ][1] Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). @@ -9249,7 +9253,7 @@ _.kebabCase('__FOO_BAR__');

_.lowerCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14325 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14351 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package") [Ⓣ][1] Converts `string`, as space separated words, to lower case. @@ -9280,7 +9284,7 @@ _.lowerCase('__FOO_BAR__');

_.lowerFirst([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14346 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14372 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") [Ⓣ][1] Converts the first character of `string` to lower case. @@ -9308,7 +9312,7 @@ _.lowerFirst('FRED');

_.pad([string=''], [length=0], [chars=' '])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14371 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14397 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package") [Ⓣ][1] 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`. @@ -9342,7 +9346,7 @@ _.pad('abc', 3);

_.padEnd([string=''], [length=0], [chars=' '])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14410 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padend "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14436 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padend "See the npm package") [Ⓣ][1] Pads `string` on the right side if it's shorter than `length`. Padding characters are truncated if they exceed `length`. @@ -9376,7 +9380,7 @@ _.padEnd('abc', 3);

_.padStart([string=''], [length=0], [chars=' '])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14443 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padstart "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14469 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padstart "See the npm package") [Ⓣ][1] Pads `string` on the left side if it's shorter than `length`. Padding characters are truncated if they exceed `length`. @@ -9410,7 +9414,7 @@ _.padStart('abc', 3);

_.parseInt(string, [radix=10])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14477 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14503 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package") [Ⓣ][1] 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 @@ -9445,7 +9449,7 @@ _.map(['6', '08', '10'], _.parseInt);

_.repeat([string=''], [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14508 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14534 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") [Ⓣ][1] Repeats the given string `n` times. @@ -9477,7 +9481,7 @@ _.repeat('abc', 0);

_.replace([string=''], pattern, replacement)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14536 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14562 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package") [Ⓣ][1] Replaces matches for `pattern` in `string` with `replacement`.
@@ -9508,7 +9512,7 @@ _.replace('Hi Fred', 'Fred', 'Barney');

_.snakeCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14564 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14590 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package") [Ⓣ][1] Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case). @@ -9540,7 +9544,7 @@ _.snakeCase('--FOO-BAR--');

_.split([string=''], separator, [limit])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14587 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14613 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package") [Ⓣ][1] Splits `string` by `separator`.
@@ -9571,7 +9575,7 @@ _.split('a-b-c', '-', 2);

_.startCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14629 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14655 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package") [Ⓣ][1] Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). @@ -9603,7 +9607,7 @@ _.startCase('__FOO_BAR__');

_.startsWith([string=''], [target], [position=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14656 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14682 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") [Ⓣ][1] Checks if `string` starts with the given target string. @@ -9636,7 +9640,7 @@ _.startsWith('abc', 'b', 1);

_.template([string=''], [options={}])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14770 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14796 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package") [Ⓣ][1] Creates a compiled template function that can interpolate data properties in "interpolate" delimiters, HTML-escape interpolated data properties in @@ -9747,7 +9751,7 @@ fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\

_.toLower([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14904 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolower "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14928 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolower "See the npm package") [Ⓣ][1] Converts `string`, as a whole, to lower case just like [String#toLowerCase](https://mdn.io/toLowerCase). @@ -9779,7 +9783,7 @@ _.toLower('__FOO_BAR__');

_.toUpper([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14929 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toupper "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14953 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toupper "See the npm package") [Ⓣ][1] Converts `string`, as a whole, to upper case just like [String#toUpperCase](https://mdn.io/toUpperCase). @@ -9811,7 +9815,7 @@ _.toUpper('__foo_bar__');

_.trim([string=''], [chars=whitespace])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14955 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14979 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package") [Ⓣ][1] Removes leading and trailing whitespace or specified characters from `string`. @@ -9843,7 +9847,7 @@ _.map([' foo ', ' bar '], _.trim);

_.trimEnd([string=''], [chars=whitespace])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L14990 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15014 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package") [Ⓣ][1] Removes trailing whitespace or specified characters from `string`. @@ -9872,7 +9876,7 @@ _.trimEnd('-_-abc-_-', '_-');

_.trimStart([string=''], [chars=whitespace])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15023 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15047 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package") [Ⓣ][1] Removes leading whitespace or specified characters from `string`. @@ -9901,7 +9905,7 @@ _.trimStart('-_-abc-_-', '_-');

_.truncate([string=''], [options={}])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15074 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.truncate "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15098 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.truncate "See the npm package") [Ⓣ][1] Truncates `string` if it's longer than the given maximum string length. The last characters of the truncated string are replaced with the omission @@ -9949,7 +9953,7 @@ _.truncate('hi-diddly-ho there, neighborino', {

_.unescape([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15149 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15173 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package") [Ⓣ][1] The inverse of `_.escape`; this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to @@ -9980,7 +9984,7 @@ _.unescape('fred, barney, & pebbles');

_.upperCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15176 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15200 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package") [Ⓣ][1] Converts `string`, as space separated words, to upper case. @@ -10011,7 +10015,7 @@ _.upperCase('__foo_bar__');

_.upperFirst([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15197 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15221 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") [Ⓣ][1] Converts the first character of `string` to upper case. @@ -10039,7 +10043,7 @@ _.upperFirst('FRED');

_.words([string=''], [pattern])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15218 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15242 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") [Ⓣ][1] Splits `string` into an array of its words. @@ -10074,7 +10078,7 @@ _.words('fred, barney, & pebbles', /[^, ]+/g);

_.attempt(func, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15252 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15276 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package") [Ⓣ][1] Attempts to invoke `func`, returning either the result or the caught error object. Any additional arguments are provided to `func` when it's invoked. @@ -10107,7 +10111,7 @@ if (_.isError(elements)) {

_.bindAll(object, methodNames)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15286 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15310 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package") [Ⓣ][1] Binds methods of an object to the object itself, overwriting the existing method. @@ -10145,7 +10149,7 @@ jQuery(element).on('click', view.click);

_.cond(pairs)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15323 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.cond "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15347 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.cond "See the npm package") [Ⓣ][1] Creates a function that iterates over `pairs` and invokes the corresponding function of the first predicate to return truthy. The predicate-function @@ -10185,7 +10189,7 @@ func({ 'a': '1', 'b': '2' });

_.conforms(source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15369 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conforms "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15393 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conforms "See the npm package") [Ⓣ][1] Creates a function that invokes the predicate properties of `source` with the corresponding property values of a given object, returning `true` if @@ -10221,7 +10225,7 @@ _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));

_.constant(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15392 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15416 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") [Ⓣ][1] Creates a function that returns `value`. @@ -10251,7 +10255,7 @@ console.log(objects[0] === objects[1]);

_.defaultTo(value, defaultValue)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15418 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultto "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15442 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultto "See the npm package") [Ⓣ][1] Checks `value` to determine whether a default value should be returned in its place. The `defaultValue` is returned if `value` is `NaN`, `null`, @@ -10282,7 +10286,7 @@ _.defaultTo(undefined, 10);

_.flow([funcs])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15444 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15468 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package") [Ⓣ][1] Creates a function that returns the result of invoking the given functions with the `this` binding of the created function, where each successive @@ -10314,7 +10318,7 @@ addSquare(1, 2);

_.flowRight([funcs])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15467 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15491 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package") [Ⓣ][1] This method is like `_.flow` except that it creates a function that invokes the given functions from right to left. @@ -10345,7 +10349,7 @@ addSquare(1, 2);

_.identity(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15485 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15509 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") [Ⓣ][1] This method returns the first argument it receives. @@ -10372,7 +10376,7 @@ console.log(_.identity(object) === object);

_.iteratee([func=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15531 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iteratee "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15555 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iteratee "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the arguments of the created function. If `func` is a property name, the created function returns the @@ -10425,7 +10429,7 @@ _.filter(['abc', 'def'], /ef/);

_.matches(source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15563 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15594 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package") [Ⓣ][1] Creates a function that performs a partial deep comparison between a given object and `source`, returning `true` if the given object has equivalent @@ -10439,6 +10443,10 @@ partially applied. Partial comparisons will match empty array and empty object `source` values against any array or object value, respectively. See `_.isEqual` for a list of supported value comparisons. +
+
+**Note:** Multiple values can be checked by combining several matchers +using `_.overSome` #### Since 3.0.0 @@ -10458,6 +10466,10 @@ var objects = [ _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); // => [{ 'a': 4, 'b': 5, 'c': 6 }] + +// Checking for several possible values +_.filter(users, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); +// => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] ``` --- @@ -10466,7 +10478,7 @@ _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));

_.matchesProperty(path, srcValue)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15593 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15631 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") [Ⓣ][1] Creates a function that performs a partial deep comparison between the value at `path` of a given object to `srcValue`, returning `true` if the @@ -10476,6 +10488,10 @@ object value is equivalent, else `false`. **Note:** Partial comparisons will match empty array and empty object `srcValue` values against any array or object value, respectively. See `_.isEqual` for a list of supported value comparisons. +
+
+**Note:** Multiple values can be checked by combining several matchers +using `_.overSome` #### Since 3.2.0 @@ -10496,6 +10512,10 @@ var objects = [ _.find(objects, _.matchesProperty('a', 4)); // => { 'a': 4, 'b': 5, 'c': 6 } + +// Checking for several possible values +_.filter(users, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)])); +// => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] ``` --- @@ -10504,7 +10524,7 @@ _.find(objects, _.matchesProperty('a', 4));

_.method(path, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15621 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15659 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package") [Ⓣ][1] Creates a function that invokes the method at `path` of a given object. Any additional arguments are provided to the invoked method. @@ -10539,7 +10559,7 @@ _.map(objects, _.method(['a', 'b']));

_.methodOf(object, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15650 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15688 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package") [Ⓣ][1] The opposite of `_.method`; this method creates a function that invokes the method at a given path of `object`. Any additional arguments are @@ -10573,7 +10593,7 @@ _.map([['a', '2'], ['c', '0']], _.methodOf(object));

_.mixin([object=lodash], source, [options={}])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15692 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15730 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package") [Ⓣ][1] Adds all own enumerable string keyed function properties of a source object to the destination object. If `object` is a function, then methods @@ -10621,7 +10641,7 @@ _('fred').vowels();

_.noConflict()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15741 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15779 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package") [Ⓣ][1] Reverts the `_` variable to its previous value and returns a reference to the `lodash` function. @@ -10643,7 +10663,7 @@ var lodash = _.noConflict();

_.noop()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15760 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15798 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package") [Ⓣ][1] This method returns `undefined`. @@ -10662,7 +10682,7 @@ _.times(2, _.noop);

_.nthArg([n=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15784 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15822 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package") [Ⓣ][1] Creates a function that gets the argument at index `n`. If `n` is negative, the nth argument from the end is returned. @@ -10693,7 +10713,7 @@ func('a', 'b', 'c', 'd');

_.over([iteratees=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15809 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15847 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package") [Ⓣ][1] Creates a function that invokes `iteratees` with the arguments it receives and returns their results. @@ -10721,10 +10741,15 @@ func(1, 2, 3, 4);

_.overEvery([predicates=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15835 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overevery "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15877 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overevery "See the npm package") [Ⓣ][1] Creates a function that checks if **all** of the `predicates` return truthy when invoked with the arguments it receives. +
+
+Following shorthands are possible for providing predicates. +Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. +Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. #### Since 4.0.0 @@ -10755,10 +10780,15 @@ func(NaN);

_.overSome([predicates=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15861 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.oversome "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15910 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.oversome "See the npm package") [Ⓣ][1] Creates a function that checks if **any** of the `predicates` return truthy when invoked with the arguments it receives. +
+
+Following shorthands are possible for providing predicates. +Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. +Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. #### Since 4.0.0 @@ -10781,6 +10811,9 @@ func(null); func(NaN); // => false + +var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }]) +var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]]) ``` --- @@ -10789,7 +10822,7 @@ func(NaN);

_.property(path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15885 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15934 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package") [Ⓣ][1] Creates a function that returns the value at `path` of a given object. @@ -10822,7 +10855,7 @@ _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');

_.propertyOf(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15910 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15959 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package") [Ⓣ][1] The opposite of `_.property`; this method creates a function that returns the value at a given path of `object`. @@ -10854,7 +10887,7 @@ _.map([['a', '2'], ['c', '0']], _.propertyOf(object));

_.range([start=0], end, [step=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15957 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16006 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package") [Ⓣ][1] 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 @@ -10906,7 +10939,7 @@ _.range(0);

_.rangeRight([start=0], end, [step=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L15995 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rangeright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16044 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rangeright "See the npm package") [Ⓣ][1] This method is like `_.range` except that it populates values in descending order. @@ -10952,7 +10985,7 @@ _.rangeRight(0);

_.runInContext([context=root])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L1406 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1406 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package") [Ⓣ][1] Create a new pristine `lodash` function using the `context` object. @@ -10992,7 +11025,7 @@ var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;

_.stubArray()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16015 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16064 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubarray "See the npm package") [Ⓣ][1] This method returns a new empty array. @@ -11019,7 +11052,7 @@ console.log(arrays[0] === arrays[1]);

_.stubFalse()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16032 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubfalse "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16081 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubfalse "See the npm package") [Ⓣ][1] This method returns `false`. @@ -11041,7 +11074,7 @@ _.times(2, _.stubFalse);

_.stubObject()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16054 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16103 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubobject "See the npm package") [Ⓣ][1] This method returns a new empty object. @@ -11068,7 +11101,7 @@ console.log(objects[0] === objects[1]);

_.stubString()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16071 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubstring "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16120 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubstring "See the npm package") [Ⓣ][1] This method returns an empty string. @@ -11090,7 +11123,7 @@ _.times(2, _.stubString);

_.stubTrue()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16088 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubtrue "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16137 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubtrue "See the npm package") [Ⓣ][1] This method returns `true`. @@ -11112,7 +11145,7 @@ _.times(2, _.stubTrue);

_.times(n, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16111 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16160 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package") [Ⓣ][1] Invokes the iteratee `n` times, returning an array of the results of each invocation. The iteratee is invoked with one argument; *(index)*. @@ -11142,7 +11175,7 @@ _.times(3, String);

_.toPath(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16146 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16195 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package") [Ⓣ][1] Converts `value` to a property path array. @@ -11170,7 +11203,7 @@ _.toPath('a[0].b.c');

_.uniqueId([prefix=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16170 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16219 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package") [Ⓣ][1] Generates a unique ID. If `prefix` is given, the ID is appended to it. @@ -11204,7 +11237,7 @@ _.uniqueId();

_.VERSION

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L16861 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16910 "View in source") [Ⓣ][1] (string): The semantic version number. @@ -11215,7 +11248,7 @@ _.uniqueId();

_.templateSettings

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L1717 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1717 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package") [Ⓣ][1] (Object): By default, the template delimiters used by lodash are like those in embedded Ruby *(ERB)* as well as ES2015 template strings. Change the @@ -11228,7 +11261,7 @@ following template settings to use alternative delimiters.

_.templateSettings.escape

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L1725 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1725 "View in source") [Ⓣ][1] (RegExp): Used to detect `data` property values to be HTML-escaped. @@ -11239,7 +11272,7 @@ following template settings to use alternative delimiters.

_.templateSettings.evaluate

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L1733 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1733 "View in source") [Ⓣ][1] (RegExp): Used to detect code to be evaluated. @@ -11250,7 +11283,7 @@ following template settings to use alternative delimiters.

_.templateSettings.imports

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L1757 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1757 "View in source") [Ⓣ][1] (Object): Used to import variables into the compiled template. @@ -11261,7 +11294,7 @@ following template settings to use alternative delimiters.

_.templateSettings.interpolate

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L1741 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1741 "View in source") [Ⓣ][1] (RegExp): Used to detect `data` property values to inject. @@ -11272,7 +11305,7 @@ following template settings to use alternative delimiters.

_.templateSettings.variable

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L1749 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1749 "View in source") [Ⓣ][1] (string): Used to reference the data object in the template text. @@ -11289,7 +11322,7 @@ following template settings to use alternative delimiters.

_.templateSettings.imports._

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L1765 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1765 "View in source") [Ⓣ][1] A reference to the `lodash` function. diff --git a/lodash.js b/lodash.js index 8b0caea3f6..b0b2dcbec0 100644 --- a/lodash.js +++ b/lodash.js @@ -12,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.15'; + var VERSION = '4.17.16'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; diff --git a/package-lock.json b/package-lock.json index 750f35ab94..24d94807b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "4.17.15", + "version": "4.17.16", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0fc6b66f2e..51b68db520 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "4.17.15", + "version": "4.17.16", "license": "MIT", "private": true, "main": "lodash.js", From a370ac81408de2da77a82b3c4b61a01a3b9c2fac Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Wed, 8 Jul 2020 14:00:48 +0200 Subject: [PATCH 10/22] Bump to v4.17.17 --- README.md | 8 +- dist/lodash.js | 2 +- dist/lodash.min.js | 2 +- doc/README.md | 632 ++++++++++++++++++++++----------------------- lodash.js | 2 +- package-lock.json | 2 +- package.json | 2 +- 7 files changed, 325 insertions(+), 325 deletions(-) diff --git a/README.md b/README.md index e41f0323f2..7e48862038 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v4.17.16 +# lodash v4.17.17 [Site](https://lodash.com/) | [Docs](https://lodash.com/docs) | @@ -20,11 +20,11 @@ $ lodash core -o ./dist/lodash.core.js ## Download - * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.17.16/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.16/dist/lodash.core.min.js)) - * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.17.16/dist/lodash.js) ([~24 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.16/dist/lodash.min.js)) + * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.17.17/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.17/dist/lodash.core.min.js)) + * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.17.17/dist/lodash.js) ([~24 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.17/dist/lodash.min.js)) * [CDN copies](https://www.jsdelivr.com/projects/lodash) -Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.17.16/LICENSE) & supports modern environments.
+Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.17.17/LICENSE) & supports modern environments.
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you. ## Installation diff --git a/dist/lodash.js b/dist/lodash.js index b0b2dcbec0..732812be00 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -12,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.16'; + var VERSION = '4.17.17'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; diff --git a/dist/lodash.min.js b/dist/lodash.min.js index 0c565322a5..eb62aa3758 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -12,7 +12,7 @@ return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;) for(var u=r-1,i=n.length;++u-1;);return r}function W(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}function C(n){return"\\"+Gr[n]}function U(n,t){ return null==n?Y:n[t]}function B(n){return Dr.test(n)}function T(n){return Mr.test(n)}function $(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function D(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function M(n,t){return function(r){return n(t(r))}}function F(n,t){for(var r=-1,e=n.length,u=0,i=[];++r>>1,Un=[["ary",dn],["bind",sn],["bindKey",hn],["curry",_n],["curryRight",vn],["flip",wn],["partial",gn],["partialRight",yn],["rearg",bn]],Bn="[object Arguments]",Tn="[object Array]",$n="[object AsyncFunction]",Dn="[object Boolean]",Mn="[object Date]",Fn="[object DOMException]",Nn="[object Error]",Pn="[object Function]",qn="[object GeneratorFunction]",Zn="[object Map]",Kn="[object Number]",Vn="[object Null]",Gn="[object Object]",Hn="[object Promise]",Jn="[object Proxy]",Yn="[object RegExp]",Qn="[object Set]",Xn="[object String]",nt="[object Symbol]",tt="[object Undefined]",rt="[object WeakMap]",et="[object WeakSet]",ut="[object ArrayBuffer]",it="[object DataView]",ot="[object Float32Array]",ft="[object Float64Array]",ct="[object Int8Array]",at="[object Int16Array]",lt="[object Int32Array]",st="[object Uint8Array]",ht="[object Uint8ClampedArray]",pt="[object Uint16Array]",_t="[object Uint32Array]",vt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39);/g,bt=/[&<>"']/g,wt=RegExp(dt.source),mt=RegExp(bt.source),xt=/<%-([\s\S]+?)%>/g,jt=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,It=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/[\\^$.*+?()[\]{}|]/g,zt=RegExp(Rt.source),Et=/^\s+|\s+$/g,St=/^\s+/,Wt=/\s+$/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ct=/\{\n\/\* \[wrapped with (.+)\] \*/,Ut=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tt=/\\(\\)?/g,$t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,Mt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Nt=/^\[object .+?Constructor\]$/,Pt=/^0o[0-7]+$/i,qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Vt=/['\n\r\u2028\u2029\\]/g,Gt="\\ud800-\\udfff",Ht="\\u0300-\\u036f",Jt="\\ufe20-\\ufe2f",Yt="\\u20d0-\\u20ff",Qt=Ht+Jt+Yt,Xt="\\u2700-\\u27bf",nr="a-z\\xdf-\\xf6\\xf8-\\xff",tr="\\xac\\xb1\\xd7\\xf7",rr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",er="\\u2000-\\u206f",ur=" \\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",ir="A-Z\\xc0-\\xd6\\xd8-\\xde",or="\\ufe0e\\ufe0f",fr=tr+rr+er+ur,cr="['\u2019]",ar="["+Gt+"]",lr="["+fr+"]",sr="["+Qt+"]",hr="\\d+",pr="["+Xt+"]",_r="["+nr+"]",vr="[^"+Gt+fr+hr+Xt+nr+ir+"]",gr="\\ud83c[\\udffb-\\udfff]",yr="(?:"+sr+"|"+gr+")",dr="[^"+Gt+"]",br="(?:\\ud83c[\\udde6-\\uddff]){2}",wr="[\\ud800-\\udbff][\\udc00-\\udfff]",mr="["+ir+"]",xr="\\u200d",jr="(?:"+_r+"|"+vr+")",Ar="(?:"+mr+"|"+vr+")",kr="(?:"+cr+"(?:d|ll|m|re|s|t|ve))?",Or="(?:"+cr+"(?:D|LL|M|RE|S|T|VE))?",Ir=yr+"?",Rr="["+or+"]?",zr="(?:"+xr+"(?:"+[dr,br,wr].join("|")+")"+Rr+Ir+")*",Er="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wr=Rr+Ir+zr,Lr="(?:"+[pr,br,wr].join("|")+")"+Wr,Cr="(?:"+[dr+sr+"?",sr,br,wr,ar].join("|")+")",Ur=RegExp(cr,"g"),Br=RegExp(sr,"g"),Tr=RegExp(gr+"(?="+gr+")|"+Cr+Wr,"g"),$r=RegExp([mr+"?"+_r+"+"+kr+"(?="+[lr,mr,"$"].join("|")+")",Ar+"+"+Or+"(?="+[lr,mr+jr,"$"].join("|")+")",mr+"?"+jr+"+"+kr,mr+"+"+Or,Sr,Er,hr,Lr].join("|"),"g"),Dr=RegExp("["+xr+Gt+Qt+or+"]"),Mr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nr=-1,Pr={}; +var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function q(n,t,r){for(var e=r-1,u=n.length;++e>>1,Un=[["ary",dn],["bind",sn],["bindKey",hn],["curry",_n],["curryRight",vn],["flip",wn],["partial",gn],["partialRight",yn],["rearg",bn]],Bn="[object Arguments]",Tn="[object Array]",$n="[object AsyncFunction]",Dn="[object Boolean]",Mn="[object Date]",Fn="[object DOMException]",Nn="[object Error]",Pn="[object Function]",qn="[object GeneratorFunction]",Zn="[object Map]",Kn="[object Number]",Vn="[object Null]",Gn="[object Object]",Hn="[object Promise]",Jn="[object Proxy]",Yn="[object RegExp]",Qn="[object Set]",Xn="[object String]",nt="[object Symbol]",tt="[object Undefined]",rt="[object WeakMap]",et="[object WeakSet]",ut="[object ArrayBuffer]",it="[object DataView]",ot="[object Float32Array]",ft="[object Float64Array]",ct="[object Int8Array]",at="[object Int16Array]",lt="[object Int32Array]",st="[object Uint8Array]",ht="[object Uint8ClampedArray]",pt="[object Uint16Array]",_t="[object Uint32Array]",vt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39);/g,bt=/[&<>"']/g,wt=RegExp(dt.source),mt=RegExp(bt.source),xt=/<%-([\s\S]+?)%>/g,jt=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,It=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/[\\^$.*+?()[\]{}|]/g,zt=RegExp(Rt.source),Et=/^\s+|\s+$/g,St=/^\s+/,Wt=/\s+$/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ct=/\{\n\/\* \[wrapped with (.+)\] \*/,Ut=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tt=/\\(\\)?/g,$t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,Mt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Nt=/^\[object .+?Constructor\]$/,Pt=/^0o[0-7]+$/i,qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Vt=/['\n\r\u2028\u2029\\]/g,Gt="\\ud800-\\udfff",Ht="\\u0300-\\u036f",Jt="\\ufe20-\\ufe2f",Yt="\\u20d0-\\u20ff",Qt=Ht+Jt+Yt,Xt="\\u2700-\\u27bf",nr="a-z\\xdf-\\xf6\\xf8-\\xff",tr="\\xac\\xb1\\xd7\\xf7",rr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",er="\\u2000-\\u206f",ur=" \\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",ir="A-Z\\xc0-\\xd6\\xd8-\\xde",or="\\ufe0e\\ufe0f",fr=tr+rr+er+ur,cr="['\u2019]",ar="["+Gt+"]",lr="["+fr+"]",sr="["+Qt+"]",hr="\\d+",pr="["+Xt+"]",_r="["+nr+"]",vr="[^"+Gt+fr+hr+Xt+nr+ir+"]",gr="\\ud83c[\\udffb-\\udfff]",yr="(?:"+sr+"|"+gr+")",dr="[^"+Gt+"]",br="(?:\\ud83c[\\udde6-\\uddff]){2}",wr="[\\ud800-\\udbff][\\udc00-\\udfff]",mr="["+ir+"]",xr="\\u200d",jr="(?:"+_r+"|"+vr+")",Ar="(?:"+mr+"|"+vr+")",kr="(?:"+cr+"(?:d|ll|m|re|s|t|ve))?",Or="(?:"+cr+"(?:D|LL|M|RE|S|T|VE))?",Ir=yr+"?",Rr="["+or+"]?",zr="(?:"+xr+"(?:"+[dr,br,wr].join("|")+")"+Rr+Ir+")*",Er="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wr=Rr+Ir+zr,Lr="(?:"+[pr,br,wr].join("|")+")"+Wr,Cr="(?:"+[dr+sr+"?",sr,br,wr,ar].join("|")+")",Ur=RegExp(cr,"g"),Br=RegExp(sr,"g"),Tr=RegExp(gr+"(?="+gr+")|"+Cr+Wr,"g"),$r=RegExp([mr+"?"+_r+"+"+kr+"(?="+[lr,mr,"$"].join("|")+")",Ar+"+"+Or+"(?="+[lr,mr+jr,"$"].join("|")+")",mr+"?"+jr+"+"+kr,mr+"+"+Or,Sr,Er,hr,Lr].join("|"),"g"),Dr=RegExp("["+xr+Gt+Qt+or+"]"),Mr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nr=-1,Pr={}; Pr[ot]=Pr[ft]=Pr[ct]=Pr[at]=Pr[lt]=Pr[st]=Pr[ht]=Pr[pt]=Pr[_t]=!0,Pr[Bn]=Pr[Tn]=Pr[ut]=Pr[Dn]=Pr[it]=Pr[Mn]=Pr[Nn]=Pr[Pn]=Pr[Zn]=Pr[Kn]=Pr[Gn]=Pr[Yn]=Pr[Qn]=Pr[Xn]=Pr[rt]=!1;var qr={};qr[Bn]=qr[Tn]=qr[ut]=qr[it]=qr[Dn]=qr[Mn]=qr[ot]=qr[ft]=qr[ct]=qr[at]=qr[lt]=qr[Zn]=qr[Kn]=qr[Gn]=qr[Yn]=qr[Qn]=qr[Xn]=qr[nt]=qr[st]=qr[ht]=qr[pt]=qr[_t]=!0,qr[Nn]=qr[Pn]=qr[rt]=!1;var Zr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a", "\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae", "\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g", diff --git a/doc/README.md b/doc/README.md index 634c4cdd9e..d0a29594ab 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,4 @@ -# lodash v4.17.16 +# lodash v4.17.17 @@ -415,7 +415,7 @@

_.chunk(array, [size=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L6861 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L6861 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package") [Ⓣ][1] 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 @@ -446,7 +446,7 @@ _.chunk(['a', 'b', 'c', 'd'], 3);

_.compact(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L6896 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L6896 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package") [Ⓣ][1] Creates an array with all falsey values removed. The values `false`, `null`, `0`, `""`, `undefined`, and `NaN` are falsey. @@ -472,7 +472,7 @@ _.compact([0, 1, false, 2, '', 3]);

_.concat(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L6933 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.concat "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L6933 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.concat "See the npm package") [Ⓣ][1] Creates a new array concatenating `array` with any additional arrays and/or values. @@ -505,7 +505,7 @@ console.log(array);

_.difference(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L6969 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L6969 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package") [Ⓣ][1] Creates an array of `array` values not included in the other given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -537,7 +537,7 @@ _.difference([2, 1], [2, 3]);

_.differenceBy(array, [values], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7001 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differenceby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7001 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differenceby "See the npm package") [Ⓣ][1] This method is like `_.difference` except that it accepts `iteratee` which is invoked for each element of `array` and `values` to generate the criterion @@ -575,7 +575,7 @@ _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');

_.differenceWith(array, [values], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7034 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differencewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7034 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differencewith "See the npm package") [Ⓣ][1] This method is like `_.difference` except that it accepts `comparator` which is invoked to compare elements of `array` to `values`. The order and @@ -610,7 +610,7 @@ _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);

_.drop(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7069 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7069 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements dropped from the beginning. @@ -645,7 +645,7 @@ _.drop([1, 2, 3], 0);

_.dropRight(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7103 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7103 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements dropped from the end. @@ -680,7 +680,7 @@ _.dropRight([1, 2, 3], 0);

_.dropRightWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7148 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7148 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package") [Ⓣ][1] Creates a slice of `array` excluding elements dropped from the end. Elements are dropped until `predicate` returns falsey. The predicate is @@ -726,7 +726,7 @@ _.dropRightWhile(users, 'active');

_.dropWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7189 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7189 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package") [Ⓣ][1] Creates a slice of `array` excluding elements dropped from the beginning. Elements are dropped until `predicate` returns falsey. The predicate is @@ -772,7 +772,7 @@ _.dropWhile(users, 'active');

_.fill(array, value, [start=0], [end=array.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package") [Ⓣ][1] Fills elements of `array` with `value` from `start` up to, but not including, `end`. @@ -813,7 +813,7 @@ _.fill([4, 6, 8, 10], '*', 1, 3);

_.findIndex(array, [predicate=_.identity], [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7271 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7271 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package") [Ⓣ][1] This method is like `_.find` except that it returns the index of the first element `predicate` returns truthy for instead of the element itself. @@ -859,7 +859,7 @@ _.findIndex(users, 'active');

_.findLastIndex(array, [predicate=_.identity], [fromIndex=array.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7318 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7318 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package") [Ⓣ][1] This method is like `_.findIndex` except that it iterates over elements of `collection` from right to left. @@ -905,7 +905,7 @@ _.findLastIndex(users, 'active');

_.flatten(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7347 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7347 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package") [Ⓣ][1] Flattens `array` a single level deep. @@ -930,7 +930,7 @@ _.flatten([1, [2, [3, [4]], 5]]);

_.flattenDeep(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7366 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7366 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") [Ⓣ][1] Recursively flattens `array`. @@ -955,7 +955,7 @@ _.flattenDeep([1, [2, [3, [4]], 5]]);

_.flattenDepth(array, [depth=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7391 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7391 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") [Ⓣ][1] Recursively flatten `array` up to `depth` times. @@ -986,7 +986,7 @@ _.flattenDepth(array, 2);

_.fromPairs(pairs)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7415 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.frompairs "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7415 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.frompairs "See the npm package") [Ⓣ][1] The inverse of `_.toPairs`; this method returns an object composed from key-value `pairs`. @@ -1012,7 +1012,7 @@ _.fromPairs([['a', 1], ['b', 2]]);

_.head(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7445 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7445 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package") [Ⓣ][1] Gets the first element of `array`. @@ -1043,7 +1043,7 @@ _.head([]);

_.indexOf(array, value, [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7472 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7472 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package") [Ⓣ][1] Gets the index at which the first occurrence of `value` is found in `array` using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -1077,7 +1077,7 @@ _.indexOf([1, 2, 1, 2], 2, 2);

_.initial(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7498 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7498 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package") [Ⓣ][1] Gets all but the last element of `array`. @@ -1102,7 +1102,7 @@ _.initial([1, 2, 3]);

_.intersection([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7520 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7520 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package") [Ⓣ][1] Creates an array of unique values that are included in all given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -1130,7 +1130,7 @@ _.intersection([2, 1], [2, 3]);

_.intersectionBy([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7550 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7550 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionby "See the npm package") [Ⓣ][1] This method is like `_.intersection` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion @@ -1164,7 +1164,7 @@ _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');

_.intersectionWith([arrays], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7585 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7585 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package") [Ⓣ][1] This method is like `_.intersection` except that it accepts `comparator` which is invoked to compare elements of `arrays`. The order and references @@ -1196,7 +1196,7 @@ _.intersectionWith(objects, others, _.isEqual);

_.join(array, [separator=','])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7613 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.join "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7613 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.join "See the npm package") [Ⓣ][1] Converts all elements in `array` into a string separated by `separator`. @@ -1222,7 +1222,7 @@ _.join(['a', 'b', 'c'], '~');

_.last(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7631 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7631 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") [Ⓣ][1] Gets the last element of `array`. @@ -1247,7 +1247,7 @@ _.last([1, 2, 3]);

_.lastIndexOf(array, value, [fromIndex=array.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7657 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7657 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package") [Ⓣ][1] This method is like `_.indexOf` except that it iterates over elements of `array` from right to left. @@ -1279,7 +1279,7 @@ _.lastIndexOf([1, 2, 1, 2], 2, 2);

_.nth(array, [n=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7693 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.nth "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7693 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.nth "See the npm package") [Ⓣ][1] Gets the element at index `n` of `array`. If `n` is negative, the nth element from the end is returned. @@ -1311,7 +1311,7 @@ _.nth(array, -2);

_.pull(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7720 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7720 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package") [Ⓣ][1] Removes all given values from `array` using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -1346,7 +1346,7 @@ console.log(array);

_.pullAll(array, values)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7742 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullall "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7742 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullall "See the npm package") [Ⓣ][1] This method is like `_.pull` except that it accepts an array of values to remove.
@@ -1378,7 +1378,7 @@ console.log(array);

_.pullAllBy(array, values, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7771 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7771 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallby "See the npm package") [Ⓣ][1] This method is like `_.pullAll` except that it accepts `iteratee` which is invoked for each element of `array` and `values` to generate the criterion @@ -1413,7 +1413,7 @@ console.log(array);

_.pullAllWith(array, values, [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7800 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7800 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallwith "See the npm package") [Ⓣ][1] This method is like `_.pullAll` except that it accepts `comparator` which is invoked to compare elements of `array` to `values`. The comparator is @@ -1448,7 +1448,7 @@ console.log(array);

_.pullAt(array, [indexes])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7830 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7830 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package") [Ⓣ][1] Removes elements from `array` corresponding to `indexes` and returns an array of removed elements. @@ -1484,7 +1484,7 @@ console.log(pulled);

_.remove(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7869 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7869 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package") [Ⓣ][1] Removes all elements from `array` that `predicate` returns truthy for and returns an array of the removed elements. The predicate is invoked @@ -1524,7 +1524,7 @@ console.log(evens);

_.reverse(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7913 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reverse "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7913 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reverse "See the npm package") [Ⓣ][1] Reverses `array` so that the first element becomes the last, the second element becomes the second to last, and so on. @@ -1559,7 +1559,7 @@ console.log(array);

_.slice(array, [start=0], [end=array.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7933 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7933 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package") [Ⓣ][1] Creates a slice of `array` from `start` up to, but not including, `end`.
@@ -1586,7 +1586,7 @@ returned.

_.sortedIndex(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7966 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7966 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package") [Ⓣ][1] Uses a binary search to determine the lowest index at which `value` should be inserted into `array` in order to maintain its sort order. @@ -1613,7 +1613,7 @@ _.sortedIndex([30, 50], 40);

_.sortedIndexBy(array, value, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L7995 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7995 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package") [Ⓣ][1] This method is like `_.sortedIndex` except that it accepts `iteratee` which is invoked for `value` and each element of `array` to compute their @@ -1648,7 +1648,7 @@ _.sortedIndexBy(objects, { 'x': 4 }, 'x');

_.sortedIndexOf(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8015 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8015 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package") [Ⓣ][1] This method is like `_.indexOf` except that it performs a binary search on a sorted `array`. @@ -1675,7 +1675,7 @@ _.sortedIndexOf([4, 5, 5, 5, 6], 5);

_.sortedLastIndex(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8044 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8044 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package") [Ⓣ][1] This method is like `_.sortedIndex` except that it returns the highest index at which `value` should be inserted into `array` in order to @@ -1703,7 +1703,7 @@ _.sortedLastIndex([4, 5, 5, 5, 6], 5);

_.sortedLastIndexBy(array, value, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8073 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8073 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package") [Ⓣ][1] This method is like `_.sortedLastIndex` except that it accepts `iteratee` which is invoked for `value` and each element of `array` to compute their @@ -1738,7 +1738,7 @@ _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');

_.sortedLastIndexOf(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8093 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8093 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package") [Ⓣ][1] This method is like `_.lastIndexOf` except that it performs a binary search on a sorted `array`. @@ -1765,7 +1765,7 @@ _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);

_.sortedUniq(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8119 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8119 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package") [Ⓣ][1] This method is like `_.uniq` except that it's designed and optimized for sorted arrays. @@ -1791,7 +1791,7 @@ _.sortedUniq([1, 1, 2]);

_.sortedUniqBy(array, [iteratee])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8141 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8141 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package") [Ⓣ][1] This method is like `_.uniqBy` except that it's designed and optimized for sorted arrays. @@ -1818,7 +1818,7 @@ _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);

_.tail(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8161 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tail "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8161 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tail "See the npm package") [Ⓣ][1] Gets all but the first element of `array`. @@ -1843,7 +1843,7 @@ _.tail([1, 2, 3]);

_.take(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8191 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8191 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements taken from the beginning. @@ -1878,7 +1878,7 @@ _.take([1, 2, 3], 0);

_.takeRight(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements taken from the end. @@ -1913,7 +1913,7 @@ _.takeRight([1, 2, 3], 0);

_.takeRightWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8269 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8269 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package") [Ⓣ][1] Creates a slice of `array` with elements taken from the end. Elements are taken until `predicate` returns falsey. The predicate is invoked with @@ -1959,7 +1959,7 @@ _.takeRightWhile(users, 'active');

_.takeWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8310 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8310 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package") [Ⓣ][1] Creates a slice of `array` with elements taken from the beginning. Elements are taken until `predicate` returns falsey. The predicate is invoked with @@ -2005,7 +2005,7 @@ _.takeWhile(users, 'active');

_.union([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8332 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8332 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package") [Ⓣ][1] Creates an array of unique values, in order, from all given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -2032,7 +2032,7 @@ _.union([2], [1, 2]);

_.unionBy([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8359 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8359 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionby "See the npm package") [Ⓣ][1] This method is like `_.union` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion by @@ -2066,7 +2066,7 @@ _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');

_.unionWith([arrays], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8388 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8388 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionwith "See the npm package") [Ⓣ][1] This method is like `_.union` except that it accepts `comparator` which is invoked to compare elements of `arrays`. Result values are chosen from @@ -2098,7 +2098,7 @@ _.unionWith(objects, others, _.isEqual);

_.uniq(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8412 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8412 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package") [Ⓣ][1] Creates a duplicate-free version of an array, using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -2127,7 +2127,7 @@ _.uniq([2, 1, 2]);

_.uniqBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8439 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8439 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqby "See the npm package") [Ⓣ][1] This method is like `_.uniq` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -2161,7 +2161,7 @@ _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');

_.uniqWith(array, [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8463 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8463 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqwith "See the npm package") [Ⓣ][1] This method is like `_.uniq` except that it accepts `comparator` which is invoked to compare elements of `array`. The order of result values is @@ -2192,7 +2192,7 @@ _.uniqWith(objects, _.isEqual);

_.unzip(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8487 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8487 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package") [Ⓣ][1] 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 @@ -2222,7 +2222,7 @@ _.unzip(zipped);

_.unzipWith(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8524 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzipwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8524 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzipwith "See the npm package") [Ⓣ][1] This method is like `_.unzip` except that it accepts `iteratee` to specify how regrouped values should be combined. The iteratee is invoked with the @@ -2253,7 +2253,7 @@ _.unzipWith(zipped, _.add);

_.without(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8557 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8557 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package") [Ⓣ][1] Creates an array excluding all given values using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -2284,7 +2284,7 @@ _.without([2, 1, 2, 3], 1, 2);

_.xor([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8581 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8581 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package") [Ⓣ][1] Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) @@ -2312,7 +2312,7 @@ _.xor([2, 1], [2, 3]);

_.xorBy([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8608 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8608 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorby "See the npm package") [Ⓣ][1] This method is like `_.xor` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion by @@ -2346,7 +2346,7 @@ _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');

_.xorWith([arrays], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8637 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8637 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorwith "See the npm package") [Ⓣ][1] This method is like `_.xor` except that it accepts `comparator` which is invoked to compare elements of `arrays`. The order of result values is @@ -2378,7 +2378,7 @@ _.xorWith(objects, others, _.isEqual);

_.zip([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8659 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8659 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package") [Ⓣ][1] Creates an array of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the @@ -2405,7 +2405,7 @@ _.zip(['a', 'b'], [1, 2], [true, false]);

_.zipObject([props=[]], [values=[]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8677 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8677 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package") [Ⓣ][1] This method is like `_.fromPairs` except that it accepts two arrays, one of property identifiers and one of corresponding values. @@ -2432,7 +2432,7 @@ _.zipObject(['a', 'b'], [1, 2]);

_.zipObjectDeep([props=[]], [values=[]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8696 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8696 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package") [Ⓣ][1] This method is like `_.zipObject` except that it supports property paths. @@ -2458,7 +2458,7 @@ _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);

_.zipWith([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8720 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8720 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipwith "See the npm package") [Ⓣ][1] This method is like `_.zip` except that it accepts `iteratee` to specify how grouped values should be combined. The iteratee is invoked with the @@ -2494,7 +2494,7 @@ _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {

_.countBy(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9099 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9099 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package") [Ⓣ][1] Creates an object composed of keys generated from the results of running each element of `collection` thru `iteratee`. The corresponding value of @@ -2527,7 +2527,7 @@ _.countBy(['one', 'two', 'three'], 'length');

_.every(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9148 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9148 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package") [Ⓣ][1] Checks if `predicate` returns truthy for **all** elements of `collection`. Iteration is stopped once `predicate` returns falsey. The predicate is @@ -2578,7 +2578,7 @@ _.every(users, 'active');

_.filter(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9197 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9197 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package") [Ⓣ][1] Iterates over elements of `collection`, returning an array of all elements `predicate` returns truthy for. The predicate is invoked with three @@ -2630,7 +2630,7 @@ _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));

_.find(collection, [predicate=_.identity], [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9238 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9238 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package") [Ⓣ][1] Iterates over elements of `collection`, returning the first element `predicate` returns truthy for. The predicate is invoked with three @@ -2677,7 +2677,7 @@ _.find(users, 'active');

_.findLast(collection, [predicate=_.identity], [fromIndex=collection.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9259 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9259 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package") [Ⓣ][1] This method is like `_.find` except that it iterates over elements of `collection` from right to left. @@ -2707,7 +2707,7 @@ _.findLast([1, 2, 3, 4], function(n) {

_.flatMap(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9282 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9282 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmap "See the npm package") [Ⓣ][1] Creates a flattened array of values by running each element in `collection` thru `iteratee` and flattening the mapped results. The iteratee is invoked @@ -2739,7 +2739,7 @@ _.flatMap([1, 2], duplicate);

_.flatMapDeep(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9306 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9306 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package") [Ⓣ][1] This method is like `_.flatMap` except that it recursively flattens the mapped results. @@ -2770,7 +2770,7 @@ _.flatMapDeep([1, 2], duplicate);

_.flatMapDepth(collection, [iteratee=_.identity], [depth=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9331 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9331 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package") [Ⓣ][1] This method is like `_.flatMap` except that it recursively flattens the mapped results up to `depth` times. @@ -2802,7 +2802,7 @@ _.flatMapDepth([1, 2], duplicate, 2);

_.forEach(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9366 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9366 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package") [Ⓣ][1] Iterates over elements of `collection` and invokes `iteratee` for each element. The iteratee is invoked with three arguments: *(value, index|key, collection)*. @@ -2845,7 +2845,7 @@ _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {

_.forEachRight(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9391 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9391 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package") [Ⓣ][1] This method is like `_.forEach` except that it iterates over elements of `collection` from right to left. @@ -2877,7 +2877,7 @@ _.forEachRight([1, 2], function(value) {

_.groupBy(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9419 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9419 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package") [Ⓣ][1] Creates an object composed of keys generated from the results of running each element of `collection` thru `iteratee`. The order of grouped values @@ -2911,7 +2911,7 @@ _.groupBy(['one', 'two', 'three'], 'length');

_.includes(collection, value, [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9457 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9457 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package") [Ⓣ][1] Checks if `value` is in `collection`. If `collection` is a string, it's checked for a substring of `value`, otherwise @@ -2951,7 +2951,7 @@ _.includes('abcd', 'bc');

_.invokeMap(collection, path, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9493 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invokemap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9493 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invokemap "See the npm package") [Ⓣ][1] Invokes the method at `path` of each element in `collection`, returning an array of the results of each invoked method. Any additional arguments @@ -2984,7 +2984,7 @@ _.invokeMap([123, 456], String.prototype.split, '');

_.keyBy(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9532 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keyby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9532 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keyby "See the npm package") [Ⓣ][1] Creates an object composed of keys generated from the results of running each element of `collection` thru `iteratee`. The corresponding value of @@ -3023,7 +3023,7 @@ _.keyBy(array, 'dir');

_.map(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9578 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9578 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package") [Ⓣ][1] Creates an array of values by running each element in `collection` thru `iteratee`. The iteratee is invoked with three arguments:
@@ -3078,7 +3078,7 @@ _.map(users, 'user');

_.orderBy(collection, [iteratees=[_.identity]], [orders])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9612 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.orderby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9612 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.orderby "See the npm package") [Ⓣ][1] 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 @@ -3116,7 +3116,7 @@ _.orderBy(users, ['user', 'age'], ['asc', 'desc']);

_.partition(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9662 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9662 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package") [Ⓣ][1] Creates an array of elements split into two groups, the first of which contains elements `predicate` returns truthy for, the second of which @@ -3163,7 +3163,7 @@ _.partition(users, 'active');

_.reduce(collection, [iteratee=_.identity], [accumulator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9703 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9703 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package") [Ⓣ][1] Reduces `collection` to a value which is the accumulated result of running each element in `collection` thru `iteratee`, where each successive @@ -3212,7 +3212,7 @@ _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {

_.reduceRight(collection, [iteratee=_.identity], [accumulator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9732 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9732 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package") [Ⓣ][1] This method is like `_.reduce` except that it iterates over elements of `collection` from right to left. @@ -3244,7 +3244,7 @@ _.reduceRight(array, function(flattened, other) {

_.reject(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9773 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9773 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package") [Ⓣ][1] The opposite of `_.filter`; this method returns the elements of `collection` that `predicate` does **not** return truthy for. @@ -3288,7 +3288,7 @@ _.reject(users, 'active');

_.sample(collection)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9792 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9792 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package") [Ⓣ][1] Gets a random element from `collection`. @@ -3313,7 +3313,7 @@ _.sample([1, 2, 3, 4]);

_.sampleSize(collection, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9817 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.samplesize "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9817 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.samplesize "See the npm package") [Ⓣ][1] Gets `n` random elements at unique keys from `collection` up to the size of `collection`. @@ -3343,7 +3343,7 @@ _.sampleSize([1, 2, 3], 4);

_.shuffle(collection)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9842 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9842 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package") [Ⓣ][1] Creates an array of shuffled values, using a version of the [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). @@ -3369,7 +3369,7 @@ _.shuffle([1, 2, 3, 4]);

_.size(collection)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9868 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9868 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package") [Ⓣ][1] Gets the size of `collection` by returning its length for array-like values or the number of own enumerable string keyed properties for objects. @@ -3401,7 +3401,7 @@ _.size('pebbles');

_.some(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9918 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9918 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package") [Ⓣ][1] Checks if `predicate` returns truthy for **any** element of `collection`. Iteration is stopped once `predicate` returns truthy. The predicate is @@ -3446,7 +3446,7 @@ _.some(users, 'active');

_.sortBy(collection, [iteratees=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9955 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9955 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package") [Ⓣ][1] Creates an array of elements, sorted in ascending order by the results of running each element in a collection thru each iteratee. This method @@ -3491,7 +3491,7 @@ _.sortBy(users, ['user', 'age']);

_.now()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9986 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9986 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package") [Ⓣ][1] Gets the timestamp of the number of milliseconds that have elapsed since the Unix epoch *(1 January `1970 00`:00:00 UTC)*. @@ -3522,7 +3522,7 @@ _.defer(function(stamp) {

_.after(n, func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10016 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10016 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package") [Ⓣ][1] The opposite of `_.before`; this method creates a function that invokes `func` once it's called `n` or more times. @@ -3557,7 +3557,7 @@ _.forEach(saves, function(type) {

_.ary(func, [n=func.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10045 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10045 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package") [Ⓣ][1] Creates a function that invokes `func`, with up to `n` arguments, ignoring any additional arguments. @@ -3584,7 +3584,7 @@ _.map(['6', '8', '10'], _.ary(parseInt, 1));

_.before(n, func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10068 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10068 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package") [Ⓣ][1] 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 @@ -3612,7 +3612,7 @@ jQuery(element).on('click', _.before(5, addContactToList));

_.bind(func, thisArg, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10120 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10120 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the `this` binding of `thisArg` and `partials` prepended to the arguments it receives. @@ -3660,7 +3660,7 @@ bound('hi');

_.bindKey(object, key, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10174 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10174 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package") [Ⓣ][1] Creates a function that invokes the method at `object[key]` with `partials` prepended to the arguments it receives. @@ -3718,7 +3718,7 @@ bound('hi');

_.curry(func, [arity=func.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package") [Ⓣ][1] Creates a function that accepts arguments of `func` and either invokes `func` returning its result, if at least `arity` number of arguments have @@ -3771,7 +3771,7 @@ curried(1)(_, 3)(2);

_.curryRight(func, [arity=func.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10269 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10269 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package") [Ⓣ][1] This method is like `_.curry` except that arguments are applied to `func` in the manner of `_.partialRight` instead of `_.partial`. @@ -3821,7 +3821,7 @@ curried(3)(1, _)(2);

_.debounce(func, [wait=0], [options={}])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10330 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10330 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package") [Ⓣ][1] Creates a debounced function that delays invoking `func` until after `wait` milliseconds have elapsed since the last time the debounced function was @@ -3886,7 +3886,7 @@ jQuery(window).on('popstate', debounced.cancel);

_.defer(func, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10473 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10473 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package") [Ⓣ][1] Defers invoking the `func` until the current call stack has cleared. Any additional arguments are provided to `func` when it's invoked. @@ -3915,7 +3915,7 @@ _.defer(function(text) {

_.delay(func, wait, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10496 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10496 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package") [Ⓣ][1] Invokes `func` after `wait` milliseconds. Any additional arguments are provided to `func` when it's invoked. @@ -3945,7 +3945,7 @@ _.delay(function(text) {

_.flip(func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10518 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10518 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with arguments reversed. @@ -3974,7 +3974,7 @@ flipped('a', 'b', 'c', 'd');

_.memoize(func, [resolver])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10566 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10566 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package") [Ⓣ][1] 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 @@ -4030,7 +4030,7 @@ _.memoize.Cache = WeakMap;

_.negate(predicate)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10609 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10609 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package") [Ⓣ][1] Creates a function that negates the result of the predicate `func`. The `func` predicate is invoked with the `this` binding and arguments of the @@ -4061,7 +4061,7 @@ _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));

_.once(func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10643 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10643 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package") [Ⓣ][1] 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 @@ -4090,7 +4090,7 @@ initialize();

_.overArgs(func, [transforms=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10678 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overargs "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10678 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overargs "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with its arguments transformed. @@ -4131,7 +4131,7 @@ func(10, 5);

_.partial(func, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10728 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10728 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with `partials` prepended to the arguments it receives. This method is like `_.bind` except it does **not** @@ -4177,7 +4177,7 @@ greetFred('hi');

_.partialRight(func, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10765 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10765 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package") [Ⓣ][1] This method is like `_.partial` except that partially applied arguments are appended to the arguments it receives. @@ -4222,7 +4222,7 @@ sayHelloTo('fred');

_.rearg(func, indexes)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10792 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10792 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with arguments arranged according to the specified `indexes` where the argument value at the first index is @@ -4255,7 +4255,7 @@ rearged('b', 'c', 'a')

_.rest(func, [start=func.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10821 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10821 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the `this` binding of the created function and arguments from `start` and beyond provided as @@ -4292,7 +4292,7 @@ say('hello', 'fred', 'barney', 'pebbles');

_.spread(func, [start=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10863 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10863 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the `this` binding of the create function and an array of arguments much like @@ -4338,7 +4338,7 @@ numbers.then(_.spread(function(x, y) {

_.throttle(func, [wait=0], [options={}])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10923 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10923 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package") [Ⓣ][1] Creates a throttled function that only invokes `func` at most once per every `wait` milliseconds. The throttled function comes with a `cancel` @@ -4394,7 +4394,7 @@ jQuery(window).on('popstate', throttled.cancel);

_.unary(func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10956 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unary "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10956 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unary "See the npm package") [Ⓣ][1] Creates a function that accepts up to one argument, ignoring any additional arguments. @@ -4420,7 +4420,7 @@ _.map(['6', '8', '10'], _.unary(parseInt));

_.wrap(value, [wrapper=identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L10982 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10982 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package") [Ⓣ][1] Creates a function that provides `value` to `wrapper` as its first argument. Any additional arguments provided to the function are appended @@ -4459,7 +4459,7 @@ p('fred, barney, & pebbles');

_.castArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11021 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.castarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11021 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.castarray "See the npm package") [Ⓣ][1] Casts `value` as an array if it's not one. @@ -4503,7 +4503,7 @@ console.log(_.castArray(array) === array);

_.clone(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11055 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11055 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package") [Ⓣ][1] Creates a shallow clone of `value`.
@@ -4540,7 +4540,7 @@ console.log(shallow[0] === objects[0]);

_.cloneDeep(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11113 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11113 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package") [Ⓣ][1] This method is like `_.clone` except that it recursively clones `value`. @@ -4568,7 +4568,7 @@ console.log(deep[0] === objects[0]);

_.cloneDeepWith(value, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11145 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11145 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package") [Ⓣ][1] This method is like `_.cloneWith` except that it recursively clones `value`. @@ -4606,7 +4606,7 @@ console.log(el.childNodes.length);

_.cloneWith(value, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11090 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11090 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonewith "See the npm package") [Ⓣ][1] This method is like `_.clone` except that it accepts `customizer` which is invoked to produce the cloned value. If `customizer` returns `undefined`, @@ -4647,7 +4647,7 @@ console.log(el.childNodes.length);

_.conformsTo(object, source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11174 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conformsto "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11174 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conformsto "See the npm package") [Ⓣ][1] Checks if `object` conforms to `source` by invoking the predicate properties of `source` with the corresponding property values of `object`. @@ -4683,7 +4683,7 @@ _.conformsTo(object, { 'b': function(n) { return n > 2; } });

_.eq(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11210 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.eq "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11210 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.eq "See the npm package") [Ⓣ][1] Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -4726,7 +4726,7 @@ _.eq(NaN, NaN);

_.gt(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11237 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11237 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package") [Ⓣ][1] Checks if `value` is greater than `other`. @@ -4758,7 +4758,7 @@ _.gt(1, 3);

_.gte(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11262 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gte "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11262 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gte "See the npm package") [Ⓣ][1] Checks if `value` is greater than or equal to `other`. @@ -4790,7 +4790,7 @@ _.gte(1, 3);

_.isArguments(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11284 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11284 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") [Ⓣ][1] Checks if `value` is likely an `arguments` object. @@ -4818,7 +4818,7 @@ _.isArguments([1, 2, 3]);

_.isArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11312 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11312 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") [Ⓣ][1] Checks if `value` is classified as an `Array` object. @@ -4852,7 +4852,7 @@ _.isArray(_.noop);

_.isArrayBuffer(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11331 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11331 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package") [Ⓣ][1] Checks if `value` is classified as an `ArrayBuffer` object. @@ -4880,7 +4880,7 @@ _.isArrayBuffer(new Array(2));

_.isArrayLike(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11358 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylike "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11358 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylike "See the npm package") [Ⓣ][1] 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 @@ -4916,7 +4916,7 @@ _.isArrayLike(_.noop);

_.isArrayLikeObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11387 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11387 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package") [Ⓣ][1] This method is like `_.isArrayLike` except that it also checks if `value` is an object. @@ -4951,7 +4951,7 @@ _.isArrayLikeObject(_.noop);

_.isBoolean(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11408 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11408 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package") [Ⓣ][1] Checks if `value` is classified as a boolean primitive or object. @@ -4979,7 +4979,7 @@ _.isBoolean(null);

_.isBuffer(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11430 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11430 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package") [Ⓣ][1] Checks if `value` is a buffer. @@ -5007,7 +5007,7 @@ _.isBuffer(new Uint8Array(2));

_.isDate(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11449 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11449 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Date` object. @@ -5035,7 +5035,7 @@ _.isDate('Mon April 23 2012');

_.isElement(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11468 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11468 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") [Ⓣ][1] Checks if `value` is likely a DOM element. @@ -5063,7 +5063,7 @@ _.isElement('');

_.isEmpty(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11505 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11505 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package") [Ⓣ][1] Checks if `value` is an empty object, collection, map, or set.
@@ -5109,7 +5109,7 @@ _.isEmpty({ 'a': 1 });

_.isEqual(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11557 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11557 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package") [Ⓣ][1] Performs a deep comparison between two values to determine if they are equivalent. @@ -5149,7 +5149,7 @@ object === other;

_.isEqualWith(value, other, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11593 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequalwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11593 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequalwith "See the npm package") [Ⓣ][1] This method is like `_.isEqual` except that it accepts `customizer` which is invoked to compare values. If `customizer` returns `undefined`, comparisons @@ -5192,7 +5192,7 @@ _.isEqualWith(array, other, customizer);

_.isError(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11617 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11617 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package") [Ⓣ][1] Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`, `TypeError`, or `URIError` object. @@ -5221,7 +5221,7 @@ _.isError(Error);

_.isFinite(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11652 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11652 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") [Ⓣ][1] Checks if `value` is a finite primitive number.
@@ -5259,7 +5259,7 @@ _.isFinite('3');

_.isFunction(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11673 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11673 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Function` object. @@ -5287,7 +5287,7 @@ _.isFunction(/abc/);

_.isInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11709 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11709 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package") [Ⓣ][1] Checks if `value` is an integer.
@@ -5325,7 +5325,7 @@ _.isInteger('3');

_.isLength(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11739 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11739 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package") [Ⓣ][1] Checks if `value` is a valid array-like length.
@@ -5363,7 +5363,7 @@ _.isLength('3');

_.isMap(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11819 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11819 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Map` object. @@ -5391,7 +5391,7 @@ _.isMap(new WeakMap);

_.isMatch(object, source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11849 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11849 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package") [Ⓣ][1] Performs a partial deep comparison between `object` and `source` to determine if `object` contains equivalent property values. @@ -5432,7 +5432,7 @@ _.isMatch(object, { 'b': 1 });

_.isMatchWith(object, source, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11885 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11885 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package") [Ⓣ][1] This method is like `_.isMatch` except that it accepts `customizer` which is invoked to compare values. If `customizer` returns `undefined`, comparisons @@ -5475,7 +5475,7 @@ _.isMatchWith(object, source, customizer);

_.isNaN(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11918 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11918 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") [Ⓣ][1] Checks if `value` is `NaN`.
@@ -5515,7 +5515,7 @@ _.isNaN(undefined);

_.isNative(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11951 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11951 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") [Ⓣ][1] Checks if `value` is a pristine native function.
@@ -5552,7 +5552,7 @@ _.isNative(_);

_.isNil(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11999 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11999 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package") [Ⓣ][1] Checks if `value` is `null` or `undefined`. @@ -5583,7 +5583,7 @@ _.isNil(NaN);

_.isNull(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11975 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11975 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") [Ⓣ][1] Checks if `value` is `null`. @@ -5611,7 +5611,7 @@ _.isNull(void 0);

_.isNumber(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12029 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12029 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Number` primitive or object.
@@ -5649,7 +5649,7 @@ _.isNumber('3');

_.isObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11769 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11769 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") [Ⓣ][1] Checks if `value` is the [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) @@ -5685,7 +5685,7 @@ _.isObject(null);

_.isObjectLike(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L11798 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11798 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package") [Ⓣ][1] Checks if `value` is object-like. A value is object-like if it's not `null` and has a `typeof` result of "object". @@ -5720,7 +5720,7 @@ _.isObjectLike(null);

_.isPlainObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12062 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12062 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package") [Ⓣ][1] Checks if `value` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`. @@ -5759,7 +5759,7 @@ _.isPlainObject(Object.create(null));

_.isRegExp(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12092 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12092 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `RegExp` object. @@ -5787,7 +5787,7 @@ _.isRegExp('/abc/');

_.isSafeInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12121 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12121 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package") [Ⓣ][1] 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. @@ -5826,7 +5826,7 @@ _.isSafeInteger('3');

_.isSet(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12142 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12142 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Set` object. @@ -5854,7 +5854,7 @@ _.isSet(new WeakSet);

_.isString(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12161 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12161 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `String` primitive or object. @@ -5882,7 +5882,7 @@ _.isString(1);

_.isSymbol(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12183 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issymbol "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12183 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issymbol "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Symbol` primitive or object. @@ -5910,7 +5910,7 @@ _.isSymbol('abc');

_.isTypedArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12205 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12205 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") [Ⓣ][1] Checks if `value` is classified as a typed array. @@ -5938,7 +5938,7 @@ _.isTypedArray([]);

_.isUndefined(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") [Ⓣ][1] Checks if `value` is `undefined`. @@ -5966,7 +5966,7 @@ _.isUndefined(null);

_.isWeakMap(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12245 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12245 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `WeakMap` object. @@ -5994,7 +5994,7 @@ _.isWeakMap(new Map);

_.isWeakSet(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12266 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12266 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `WeakSet` object. @@ -6022,7 +6022,7 @@ _.isWeakSet(new Set);

_.lt(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12293 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12293 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package") [Ⓣ][1] Checks if `value` is less than `other`. @@ -6054,7 +6054,7 @@ _.lt(3, 1);

_.lte(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12318 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lte "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12318 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lte "See the npm package") [Ⓣ][1] Checks if `value` is less than or equal to `other`. @@ -6086,7 +6086,7 @@ _.lte(3, 1);

_.toArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12345 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12345 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") [Ⓣ][1] Converts `value` to an array. @@ -6120,7 +6120,7 @@ _.toArray(null);

_.toFinite(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12384 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tofinite "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12384 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tofinite "See the npm package") [Ⓣ][1] Converts `value` to a finite number. @@ -6154,7 +6154,7 @@ _.toFinite('3.2');

_.toInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12422 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12422 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package") [Ⓣ][1] Converts `value` to an integer.
@@ -6192,7 +6192,7 @@ _.toInteger('3.2');

_.toLength(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12456 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolength "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12456 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolength "See the npm package") [Ⓣ][1] Converts `value` to an integer suitable for use as the length of an array-like object. @@ -6231,7 +6231,7 @@ _.toLength('3.2');

_.toNumber(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12483 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12483 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package") [Ⓣ][1] Converts `value` to a number. @@ -6265,7 +6265,7 @@ _.toNumber('3.2');

_.toPlainObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12528 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12528 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package") [Ⓣ][1] Converts `value` to a plain object flattening inherited enumerable string keyed properties of `value` to own properties of the plain object. @@ -6300,7 +6300,7 @@ _.assign({ 'a': 1 }, _.toPlainObject(new Foo));

_.toSafeInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12556 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12556 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package") [Ⓣ][1] Converts `value` to a safe integer. A safe integer can be compared and represented correctly. @@ -6335,7 +6335,7 @@ _.toSafeInteger('3.2');

_.toString(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12583 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tostring "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12583 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tostring "See the npm package") [Ⓣ][1] Converts `value` to a string. An empty string is returned for `null` and `undefined` values. The sign of `-0` is preserved. @@ -6373,7 +6373,7 @@ _.toString([1, 2, 3]);

_.add(augend, addend)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16241 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16241 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") [Ⓣ][1] Adds two numbers. @@ -6399,7 +6399,7 @@ _.add(6, 4);

_.ceil(number, [precision=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16266 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16266 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package") [Ⓣ][1] Computes `number` rounded up to `precision`. @@ -6431,7 +6431,7 @@ _.ceil(6040, -2);

_.divide(dividend, divisor)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16283 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.divide "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16283 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.divide "See the npm package") [Ⓣ][1] Divide two numbers. @@ -6457,7 +6457,7 @@ _.divide(6, 4);

_.floor(number, [precision=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16308 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16308 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package") [Ⓣ][1] Computes `number` rounded down to `precision`. @@ -6489,7 +6489,7 @@ _.floor(4060, -2);

_.max(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16328 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16328 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package") [Ⓣ][1] Computes the maximum value of `array`. If `array` is empty or falsey, `undefined` is returned. @@ -6518,7 +6518,7 @@ _.max([]);

_.maxBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16357 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.maxby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16357 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.maxby "See the npm package") [Ⓣ][1] This method is like `_.max` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -6552,7 +6552,7 @@ _.maxBy(objects, 'n');

_.mean(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16377 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16377 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package") [Ⓣ][1] Computes the mean of the values in `array`. @@ -6577,7 +6577,7 @@ _.mean([4, 2, 8, 6]);

_.meanBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16404 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.meanby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16404 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.meanby "See the npm package") [Ⓣ][1] 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. @@ -6611,7 +6611,7 @@ _.meanBy(objects, 'n');

_.min(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16426 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16426 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package") [Ⓣ][1] Computes the minimum value of `array`. If `array` is empty or falsey, `undefined` is returned. @@ -6640,7 +6640,7 @@ _.min([]);

_.minBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16455 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.minby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16455 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.minby "See the npm package") [Ⓣ][1] This method is like `_.min` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -6674,7 +6674,7 @@ _.minBy(objects, 'n');

_.multiply(multiplier, multiplicand)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16476 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.multiply "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16476 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.multiply "See the npm package") [Ⓣ][1] Multiply two numbers. @@ -6700,7 +6700,7 @@ _.multiply(6, 4);

_.round(number, [precision=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16501 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16501 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package") [Ⓣ][1] Computes `number` rounded to `precision`. @@ -6732,7 +6732,7 @@ _.round(4060, -2);

_.subtract(minuend, subtrahend)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16518 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16518 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package") [Ⓣ][1] Subtract two numbers. @@ -6758,7 +6758,7 @@ _.subtract(6, 4);

_.sum(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16536 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16536 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") [Ⓣ][1] Computes the sum of the values in `array`. @@ -6783,7 +6783,7 @@ _.sum([4, 2, 8, 6]);

_.sumBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16565 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sumby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16565 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sumby "See the npm package") [Ⓣ][1] 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. @@ -6823,7 +6823,7 @@ _.sumBy(objects, 'n');

_.clamp(number, [lower], upper)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14007 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14007 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package") [Ⓣ][1] Clamps `number` within the inclusive `lower` and `upper` bounds. @@ -6853,7 +6853,7 @@ _.clamp(10, -5, 5);

_.inRange(number, [start=0], end)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14061 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14061 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package") [Ⓣ][1] 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`. @@ -6901,7 +6901,7 @@ _.inRange(-3, -2, -6);

_.random([lower=0], [upper=1], [floating])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14104 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14104 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package") [Ⓣ][1] 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 @@ -6950,7 +6950,7 @@ _.random(1.2, 5.2);

_.assign(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12621 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12621 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package") [Ⓣ][1] Assigns own enumerable string keyed properties of source objects to the destination object. Source objects are applied from left to right. @@ -6993,7 +6993,7 @@ _.assign({ 'a': 0 }, new Foo, new Bar);

_.assignIn(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12664 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12664 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignin "See the npm package") [Ⓣ][1] This method is like `_.assign` except that it iterates over own and inherited source properties. @@ -7037,7 +7037,7 @@ _.assignIn({ 'a': 0 }, new Foo, new Bar);

_.assignInWith(object, sources, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12697 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assigninwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12697 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assigninwith "See the npm package") [Ⓣ][1] This method is like `_.assignIn` except that it accepts `customizer` which is invoked to produce the assigned values. If `customizer` returns @@ -7079,7 +7079,7 @@ defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });

_.assignWith(object, sources, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12729 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12729 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignwith "See the npm package") [Ⓣ][1] This method is like `_.assign` except that it accepts `customizer` which is invoked to produce the assigned values. If `customizer` returns @@ -7118,7 +7118,7 @@ defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });

_.at(object, [paths])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12750 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12750 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package") [Ⓣ][1] Creates an array of values corresponding to `paths` of `object`. @@ -7146,7 +7146,7 @@ _.at(object, ['a[0].b.c', 'a[1]']);

_.create(prototype, [properties])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12786 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12786 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package") [Ⓣ][1] Creates an object that inherits from the `prototype` object. If a `properties` object is given, its own enumerable string keyed properties @@ -7191,7 +7191,7 @@ circle instanceof Shape;

_.defaults(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12812 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12812 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package") [Ⓣ][1] Assigns own and inherited enumerable string keyed properties of source objects to the destination object for all destination properties that @@ -7223,7 +7223,7 @@ _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });

_.defaultsDeep(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12862 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12862 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package") [Ⓣ][1] This method is like `_.defaults` except that it recursively assigns default properties. @@ -7253,7 +7253,7 @@ _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });

_.findKey(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12902 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12902 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package") [Ⓣ][1] This method is like `_.find` except that it returns the key of the first element `predicate` returns truthy for instead of the element itself. @@ -7298,7 +7298,7 @@ _.findKey(users, 'active');

_.findLastKey(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12941 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12941 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package") [Ⓣ][1] This method is like `_.findKey` except that it iterates over elements of a collection in the opposite order. @@ -7343,7 +7343,7 @@ _.findLastKey(users, 'active');

_.forIn(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L12973 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12973 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package") [Ⓣ][1] Iterates over own and inherited enumerable string keyed properties of an object and invokes `iteratee` for each property. The iteratee is invoked @@ -7381,7 +7381,7 @@ _.forIn(new Foo, function(value, key) {

_.forInRight(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13005 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13005 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package") [Ⓣ][1] This method is like `_.forIn` except that it iterates over properties of `object` in the opposite order. @@ -7417,7 +7417,7 @@ _.forInRight(new Foo, function(value, key) {

_.forOwn(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13039 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13039 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package") [Ⓣ][1] Iterates over own enumerable string keyed properties of an object and invokes `iteratee` for each property. The iteratee is invoked with three @@ -7455,7 +7455,7 @@ _.forOwn(new Foo, function(value, key) {

_.forOwnRight(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13069 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13069 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package") [Ⓣ][1] This method is like `_.forOwn` except that it iterates over properties of `object` in the opposite order. @@ -7491,7 +7491,7 @@ _.forOwnRight(new Foo, function(value, key) {

_.functions(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13096 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13096 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package") [Ⓣ][1] Creates an array of function property names from own enumerable properties of `object`. @@ -7524,7 +7524,7 @@ _.functions(new Foo);

_.functionsIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13123 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functionsin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13123 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functionsin "See the npm package") [Ⓣ][1] Creates an array of function property names from own and inherited enumerable properties of `object`. @@ -7557,7 +7557,7 @@ _.functionsIn(new Foo);

_.get(object, path, [defaultValue])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13152 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13152 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package") [Ⓣ][1] Gets the value at `path` of `object`. If the resolved value is `undefined`, the `defaultValue` is returned in its place. @@ -7593,7 +7593,7 @@ _.get(object, 'a.b.c', 'default');

_.has(object, path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13184 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13184 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") [Ⓣ][1] Checks if `path` is a direct property of `object`. @@ -7631,7 +7631,7 @@ _.has(other, 'a');

_.hasIn(object, path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13214 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.hasin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13214 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.hasin "See the npm package") [Ⓣ][1] Checks if `path` is a direct or inherited property of `object`. @@ -7668,7 +7668,7 @@ _.hasIn(object, 'b');

_.invert(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13236 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13236 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package") [Ⓣ][1] Creates an object composed of the inverted keys and values of `object`. If `object` contains duplicate values, subsequent values overwrite @@ -7697,7 +7697,7 @@ _.invert(object);

_.invertBy(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13271 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invertby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13271 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invertby "See the npm package") [Ⓣ][1] This method is like `_.invert` except that the inverted object is generated from the results of running each element of `object` thru `iteratee`. The @@ -7734,7 +7734,7 @@ _.invertBy(object, function(value) {

_.invoke(object, path, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13302 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13302 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package") [Ⓣ][1] Invokes the method at `path` of `object`. @@ -7763,7 +7763,7 @@ _.invoke(object, 'a[0].b.c.slice', 1, 3);

_.keys(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13332 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13332 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package") [Ⓣ][1] Creates an array of the own enumerable property names of `object`.
@@ -7803,7 +7803,7 @@ _.keys('hi');

_.keysIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13359 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13359 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package") [Ⓣ][1] Creates an array of the own and inherited enumerable property names of `object`.
@@ -7838,7 +7838,7 @@ _.keysIn(new Foo);

_.mapKeys(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13384 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapkeys "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13384 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapkeys "See the npm package") [Ⓣ][1] The opposite of `_.mapValues`; this method creates an object with the same values as `object` and keys generated by running each own enumerable @@ -7869,7 +7869,7 @@ _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {

_.mapValues(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13422 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13422 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package") [Ⓣ][1] Creates an object with the same keys as `object` and values generated by running each own enumerable string keyed property of `object` thru @@ -7907,7 +7907,7 @@ _.mapValues(users, 'age');

_.merge(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13463 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13463 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package") [Ⓣ][1] This method is like `_.assign` except that it recursively merges own and inherited enumerable string keyed properties of source objects into the @@ -7950,7 +7950,7 @@ _.merge(object, other);

_.mergeWith(object, sources, customizer)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13498 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mergewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13498 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mergewith "See the npm package") [Ⓣ][1] This method is like `_.merge` except that it accepts `customizer` which is invoked to produce the merged values of the destination and source @@ -7993,7 +7993,7 @@ _.mergeWith(object, other, customizer);

_.omit(object, [paths])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13522 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13522 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package") [Ⓣ][1] The opposite of `_.pick`; this method creates an object composed of the own and inherited enumerable property paths of `object` that are not omitted. @@ -8025,7 +8025,7 @@ _.omit(object, ['a', 'c']);

_.omitBy(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13564 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omitby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13564 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omitby "See the npm package") [Ⓣ][1] The opposite of `_.pickBy`; this method creates an object composed of the own and inherited enumerable string keyed properties of `object` that @@ -8056,7 +8056,7 @@ _.omitBy(object, _.isNumber);

_.pick(object, [paths])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13585 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13585 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package") [Ⓣ][1] Creates an object composed of the picked `object` properties. @@ -8084,7 +8084,7 @@ _.pick(object, ['a', 'c']);

_.pickBy(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13607 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pickby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13607 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pickby "See the npm package") [Ⓣ][1] Creates an object composed of the `object` properties `predicate` returns truthy for. The predicate is invoked with two arguments: *(value, key)*. @@ -8113,7 +8113,7 @@ _.pickBy(object, _.isNumber);

_.result(object, path, [defaultValue])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13649 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13649 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package") [Ⓣ][1] 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 @@ -8153,7 +8153,7 @@ _.result(object, 'a[0].b.c3', _.constant('default'));

_.set(object, path, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13699 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13699 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package") [Ⓣ][1] 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 @@ -8193,7 +8193,7 @@ console.log(object.x[0].y.z);

_.setWith(object, path, value, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13727 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.setwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13727 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.setwith "See the npm package") [Ⓣ][1] This method is like `_.set` except that it accepts `customizer` which is invoked to produce the objects of `path`. If `customizer` returns `undefined` @@ -8229,7 +8229,7 @@ _.setWith(object, '[0][1]', 'a', Object);

_.toPairs(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13756 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairs "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13756 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairs "See the npm package") [Ⓣ][1] Creates an array of own enumerable string keyed-value pairs for `object` which can be consumed by `_.fromPairs`. If `object` is a map or set, its @@ -8266,7 +8266,7 @@ _.toPairs(new Foo);

_.toPairsIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13782 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairsin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13782 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairsin "See the npm package") [Ⓣ][1] Creates an array of own and inherited enumerable string keyed-value pairs for `object` which can be consumed by `_.fromPairs`. If `object` is a map @@ -8303,7 +8303,7 @@ _.toPairsIn(new Foo);

_.transform(object, [iteratee=_.identity], [accumulator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13814 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13814 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package") [Ⓣ][1] An alternative to `_.reduce`; this method transforms `object` to a new `accumulator` object which is the result of running each of its own @@ -8344,7 +8344,7 @@ _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {

_.unset(object, path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13864 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13864 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package") [Ⓣ][1] Removes the property at `path` of `object`.
@@ -8383,7 +8383,7 @@ console.log(object);

_.update(object, path, updater)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13895 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.update "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13895 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.update "See the npm package") [Ⓣ][1] This method is like `_.set` except that accepts `updater` to produce the value to set. Use `_.updateWith` to customize `path` creation. The `updater` @@ -8422,7 +8422,7 @@ console.log(object.x[0].y.z);

_.updateWith(object, path, updater, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13923 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.updatewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13923 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.updatewith "See the npm package") [Ⓣ][1] This method is like `_.update` except that it accepts `customizer` which is invoked to produce the objects of `path`. If `customizer` returns `undefined` @@ -8458,7 +8458,7 @@ _.updateWith(object, '[0][1]', _.constant('a'), Object);

_.values(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13954 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13954 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package") [Ⓣ][1] Creates an array of the own enumerable string keyed property values of `object`.
@@ -8496,7 +8496,7 @@ _.values('hi');

_.valuesIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L13982 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13982 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package") [Ⓣ][1] Creates an array of the own and inherited enumerable string keyed property values of `object`. @@ -8538,7 +8538,7 @@ _.valuesIn(new Foo);

_(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1648 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1648 "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, @@ -8674,7 +8674,7 @@ _.isArray(squares.value());

_.chain(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8759 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8759 "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 @@ -8714,7 +8714,7 @@ var youngest = _

_.tap(value, interceptor)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8788 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8788 "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 @@ -8748,7 +8748,7 @@ _([1, 2, 3])

_.thru(value, interceptor)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8816 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8816 "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 @@ -8782,7 +8782,7 @@ _(' abc ')

_.prototype[Symbol.iterator]()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8971 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8971 "View in source") [Ⓣ][1] Enables the wrapper to be iterable. @@ -8809,7 +8809,7 @@ Array.from(wrapped);

_.prototype.at([paths])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8836 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8836 "View in source") [Ⓣ][1] This method is the wrapper version of `_.at`. @@ -8836,7 +8836,7 @@ _(object).at(['a[0].b.c', 'a[1]']).value();

_.prototype.chain()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8887 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8887 "View in source") [Ⓣ][1] Creates a `lodash` wrapper instance with explicit method chain sequences enabled. @@ -8872,7 +8872,7 @@ _(users)

_.prototype.commit()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8917 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8917 "View in source") [Ⓣ][1] Executes the chain sequence and returns the wrapped result. @@ -8907,7 +8907,7 @@ console.log(array);

_.prototype.next()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8943 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8943 "View in source") [Ⓣ][1] Gets the next value on a wrapped object following the [iterator protocol](https://mdn.io/iteration_protocols#iterator). @@ -8938,7 +8938,7 @@ wrapped.next();

_.prototype.plant(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L8999 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8999 "View in source") [Ⓣ][1] Creates a clone of the chain sequence planting `value` as the wrapped value. @@ -8973,7 +8973,7 @@ wrapped.value();

_.prototype.reverse()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9039 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9039 "View in source") [Ⓣ][1] This method is the wrapper version of `_.reverse`.
@@ -9003,7 +9003,7 @@ console.log(array);

_.prototype.value()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L9071 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9071 "View in source") [Ⓣ][1] Executes the chain sequence to resolve the unwrapped value. @@ -9034,7 +9034,7 @@ _([1, 2, 3]).value();

_.camelCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14165 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14165 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package") [Ⓣ][1] Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). @@ -9065,7 +9065,7 @@ _.camelCase('__FOO_BAR__');

_.capitalize([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14185 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14185 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package") [Ⓣ][1] Converts the first character of `string` to upper case and the remaining to lower case. @@ -9091,7 +9091,7 @@ _.capitalize('FRED');

_.deburr([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14207 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14207 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package") [Ⓣ][1] Deburrs `string` by converting [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) @@ -9120,7 +9120,7 @@ _.deburr('déjà vu');

_.endsWith([string=''], [target], [position=string.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14235 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14235 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") [Ⓣ][1] Checks if `string` ends with the given target string. @@ -9153,7 +9153,7 @@ _.endsWith('abc', 'b', 2);

_.escape([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14277 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14277 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package") [Ⓣ][1] Converts the characters "&", "<", ">", '"', and "'" in `string` to their corresponding HTML entities. @@ -9195,7 +9195,7 @@ _.escape('fred, barney, & pebbles');

_.escapeRegExp([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14299 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14299 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") [Ⓣ][1] Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. @@ -9221,7 +9221,7 @@ _.escapeRegExp('[lodash](https://lodash.com/)');

_.kebabCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14327 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14327 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package") [Ⓣ][1] Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). @@ -9253,7 +9253,7 @@ _.kebabCase('__FOO_BAR__');

_.lowerCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14351 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14351 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package") [Ⓣ][1] Converts `string`, as space separated words, to lower case. @@ -9284,7 +9284,7 @@ _.lowerCase('__FOO_BAR__');

_.lowerFirst([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14372 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14372 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") [Ⓣ][1] Converts the first character of `string` to lower case. @@ -9312,7 +9312,7 @@ _.lowerFirst('FRED');

_.pad([string=''], [length=0], [chars=' '])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14397 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14397 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package") [Ⓣ][1] 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`. @@ -9346,7 +9346,7 @@ _.pad('abc', 3);

_.padEnd([string=''], [length=0], [chars=' '])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14436 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padend "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14436 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padend "See the npm package") [Ⓣ][1] Pads `string` on the right side if it's shorter than `length`. Padding characters are truncated if they exceed `length`. @@ -9380,7 +9380,7 @@ _.padEnd('abc', 3);

_.padStart([string=''], [length=0], [chars=' '])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14469 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padstart "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14469 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padstart "See the npm package") [Ⓣ][1] Pads `string` on the left side if it's shorter than `length`. Padding characters are truncated if they exceed `length`. @@ -9414,7 +9414,7 @@ _.padStart('abc', 3);

_.parseInt(string, [radix=10])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14503 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14503 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package") [Ⓣ][1] 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 @@ -9449,7 +9449,7 @@ _.map(['6', '08', '10'], _.parseInt);

_.repeat([string=''], [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14534 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14534 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") [Ⓣ][1] Repeats the given string `n` times. @@ -9481,7 +9481,7 @@ _.repeat('abc', 0);

_.replace([string=''], pattern, replacement)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14562 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14562 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package") [Ⓣ][1] Replaces matches for `pattern` in `string` with `replacement`.
@@ -9512,7 +9512,7 @@ _.replace('Hi Fred', 'Fred', 'Barney');

_.snakeCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14590 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14590 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package") [Ⓣ][1] Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case). @@ -9544,7 +9544,7 @@ _.snakeCase('--FOO-BAR--');

_.split([string=''], separator, [limit])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14613 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14613 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package") [Ⓣ][1] Splits `string` by `separator`.
@@ -9575,7 +9575,7 @@ _.split('a-b-c', '-', 2);

_.startCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14655 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14655 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package") [Ⓣ][1] Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). @@ -9607,7 +9607,7 @@ _.startCase('__FOO_BAR__');

_.startsWith([string=''], [target], [position=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14682 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14682 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") [Ⓣ][1] Checks if `string` starts with the given target string. @@ -9640,7 +9640,7 @@ _.startsWith('abc', 'b', 1);

_.template([string=''], [options={}])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14796 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14796 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package") [Ⓣ][1] Creates a compiled template function that can interpolate data properties in "interpolate" delimiters, HTML-escape interpolated data properties in @@ -9751,7 +9751,7 @@ fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\

_.toLower([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14928 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolower "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14928 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolower "See the npm package") [Ⓣ][1] Converts `string`, as a whole, to lower case just like [String#toLowerCase](https://mdn.io/toLowerCase). @@ -9783,7 +9783,7 @@ _.toLower('__FOO_BAR__');

_.toUpper([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14953 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toupper "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14953 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toupper "See the npm package") [Ⓣ][1] Converts `string`, as a whole, to upper case just like [String#toUpperCase](https://mdn.io/toUpperCase). @@ -9815,7 +9815,7 @@ _.toUpper('__foo_bar__');

_.trim([string=''], [chars=whitespace])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L14979 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14979 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package") [Ⓣ][1] Removes leading and trailing whitespace or specified characters from `string`. @@ -9847,7 +9847,7 @@ _.map([' foo ', ' bar '], _.trim);

_.trimEnd([string=''], [chars=whitespace])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15014 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15014 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package") [Ⓣ][1] Removes trailing whitespace or specified characters from `string`. @@ -9876,7 +9876,7 @@ _.trimEnd('-_-abc-_-', '_-');

_.trimStart([string=''], [chars=whitespace])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15047 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15047 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package") [Ⓣ][1] Removes leading whitespace or specified characters from `string`. @@ -9905,7 +9905,7 @@ _.trimStart('-_-abc-_-', '_-');

_.truncate([string=''], [options={}])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15098 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.truncate "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15098 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.truncate "See the npm package") [Ⓣ][1] Truncates `string` if it's longer than the given maximum string length. The last characters of the truncated string are replaced with the omission @@ -9953,7 +9953,7 @@ _.truncate('hi-diddly-ho there, neighborino', {

_.unescape([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15173 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15173 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package") [Ⓣ][1] The inverse of `_.escape`; this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to @@ -9984,7 +9984,7 @@ _.unescape('fred, barney, & pebbles');

_.upperCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15200 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15200 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package") [Ⓣ][1] Converts `string`, as space separated words, to upper case. @@ -10015,7 +10015,7 @@ _.upperCase('__foo_bar__');

_.upperFirst([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15221 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15221 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") [Ⓣ][1] Converts the first character of `string` to upper case. @@ -10043,7 +10043,7 @@ _.upperFirst('FRED');

_.words([string=''], [pattern])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15242 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15242 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") [Ⓣ][1] Splits `string` into an array of its words. @@ -10078,7 +10078,7 @@ _.words('fred, barney, & pebbles', /[^, ]+/g);

_.attempt(func, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15276 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15276 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package") [Ⓣ][1] Attempts to invoke `func`, returning either the result or the caught error object. Any additional arguments are provided to `func` when it's invoked. @@ -10111,7 +10111,7 @@ if (_.isError(elements)) {

_.bindAll(object, methodNames)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15310 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15310 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package") [Ⓣ][1] Binds methods of an object to the object itself, overwriting the existing method. @@ -10149,7 +10149,7 @@ jQuery(element).on('click', view.click);

_.cond(pairs)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15347 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.cond "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15347 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.cond "See the npm package") [Ⓣ][1] Creates a function that iterates over `pairs` and invokes the corresponding function of the first predicate to return truthy. The predicate-function @@ -10189,7 +10189,7 @@ func({ 'a': '1', 'b': '2' });

_.conforms(source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15393 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conforms "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15393 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conforms "See the npm package") [Ⓣ][1] Creates a function that invokes the predicate properties of `source` with the corresponding property values of a given object, returning `true` if @@ -10225,7 +10225,7 @@ _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));

_.constant(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15416 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15416 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") [Ⓣ][1] Creates a function that returns `value`. @@ -10255,7 +10255,7 @@ console.log(objects[0] === objects[1]);

_.defaultTo(value, defaultValue)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15442 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultto "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15442 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultto "See the npm package") [Ⓣ][1] Checks `value` to determine whether a default value should be returned in its place. The `defaultValue` is returned if `value` is `NaN`, `null`, @@ -10286,7 +10286,7 @@ _.defaultTo(undefined, 10);

_.flow([funcs])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15468 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15468 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package") [Ⓣ][1] Creates a function that returns the result of invoking the given functions with the `this` binding of the created function, where each successive @@ -10318,7 +10318,7 @@ addSquare(1, 2);

_.flowRight([funcs])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15491 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15491 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package") [Ⓣ][1] This method is like `_.flow` except that it creates a function that invokes the given functions from right to left. @@ -10349,7 +10349,7 @@ addSquare(1, 2);

_.identity(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15509 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15509 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") [Ⓣ][1] This method returns the first argument it receives. @@ -10376,7 +10376,7 @@ console.log(_.identity(object) === object);

_.iteratee([func=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15555 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iteratee "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15555 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iteratee "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the arguments of the created function. If `func` is a property name, the created function returns the @@ -10429,7 +10429,7 @@ _.filter(['abc', 'def'], /ef/);

_.matches(source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15594 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15594 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package") [Ⓣ][1] Creates a function that performs a partial deep comparison between a given object and `source`, returning `true` if the given object has equivalent @@ -10478,7 +10478,7 @@ _.filter(users, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));

_.matchesProperty(path, srcValue)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15631 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15631 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") [Ⓣ][1] Creates a function that performs a partial deep comparison between the value at `path` of a given object to `srcValue`, returning `true` if the @@ -10524,7 +10524,7 @@ _.filter(users, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)

_.method(path, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15659 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15659 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package") [Ⓣ][1] Creates a function that invokes the method at `path` of a given object. Any additional arguments are provided to the invoked method. @@ -10559,7 +10559,7 @@ _.map(objects, _.method(['a', 'b']));

_.methodOf(object, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15688 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15688 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package") [Ⓣ][1] The opposite of `_.method`; this method creates a function that invokes the method at a given path of `object`. Any additional arguments are @@ -10593,7 +10593,7 @@ _.map([['a', '2'], ['c', '0']], _.methodOf(object));

_.mixin([object=lodash], source, [options={}])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15730 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15730 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package") [Ⓣ][1] Adds all own enumerable string keyed function properties of a source object to the destination object. If `object` is a function, then methods @@ -10641,7 +10641,7 @@ _('fred').vowels();

_.noConflict()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15779 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15779 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package") [Ⓣ][1] Reverts the `_` variable to its previous value and returns a reference to the `lodash` function. @@ -10663,7 +10663,7 @@ var lodash = _.noConflict();

_.noop()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15798 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15798 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package") [Ⓣ][1] This method returns `undefined`. @@ -10682,7 +10682,7 @@ _.times(2, _.noop);

_.nthArg([n=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15822 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15822 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package") [Ⓣ][1] Creates a function that gets the argument at index `n`. If `n` is negative, the nth argument from the end is returned. @@ -10713,7 +10713,7 @@ func('a', 'b', 'c', 'd');

_.over([iteratees=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15847 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15847 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package") [Ⓣ][1] Creates a function that invokes `iteratees` with the arguments it receives and returns their results. @@ -10741,7 +10741,7 @@ func(1, 2, 3, 4);

_.overEvery([predicates=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15877 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overevery "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15877 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overevery "See the npm package") [Ⓣ][1] Creates a function that checks if **all** of the `predicates` return truthy when invoked with the arguments it receives. @@ -10780,7 +10780,7 @@ func(NaN);

_.overSome([predicates=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15910 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.oversome "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15910 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.oversome "See the npm package") [Ⓣ][1] Creates a function that checks if **any** of the `predicates` return truthy when invoked with the arguments it receives. @@ -10822,7 +10822,7 @@ var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])

_.property(path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15934 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15934 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package") [Ⓣ][1] Creates a function that returns the value at `path` of a given object. @@ -10855,7 +10855,7 @@ _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');

_.propertyOf(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L15959 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15959 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package") [Ⓣ][1] The opposite of `_.property`; this method creates a function that returns the value at a given path of `object`. @@ -10887,7 +10887,7 @@ _.map([['a', '2'], ['c', '0']], _.propertyOf(object));

_.range([start=0], end, [step=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16006 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16006 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package") [Ⓣ][1] 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 @@ -10939,7 +10939,7 @@ _.range(0);

_.rangeRight([start=0], end, [step=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16044 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rangeright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16044 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rangeright "See the npm package") [Ⓣ][1] This method is like `_.range` except that it populates values in descending order. @@ -10985,7 +10985,7 @@ _.rangeRight(0);

_.runInContext([context=root])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1406 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1406 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package") [Ⓣ][1] Create a new pristine `lodash` function using the `context` object. @@ -11025,7 +11025,7 @@ var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;

_.stubArray()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16064 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16064 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubarray "See the npm package") [Ⓣ][1] This method returns a new empty array. @@ -11052,7 +11052,7 @@ console.log(arrays[0] === arrays[1]);

_.stubFalse()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16081 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubfalse "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16081 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubfalse "See the npm package") [Ⓣ][1] This method returns `false`. @@ -11074,7 +11074,7 @@ _.times(2, _.stubFalse);

_.stubObject()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16103 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16103 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubobject "See the npm package") [Ⓣ][1] This method returns a new empty object. @@ -11101,7 +11101,7 @@ console.log(objects[0] === objects[1]);

_.stubString()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16120 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubstring "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16120 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubstring "See the npm package") [Ⓣ][1] This method returns an empty string. @@ -11123,7 +11123,7 @@ _.times(2, _.stubString);

_.stubTrue()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16137 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubtrue "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16137 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubtrue "See the npm package") [Ⓣ][1] This method returns `true`. @@ -11145,7 +11145,7 @@ _.times(2, _.stubTrue);

_.times(n, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16160 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16160 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package") [Ⓣ][1] Invokes the iteratee `n` times, returning an array of the results of each invocation. The iteratee is invoked with one argument; *(index)*. @@ -11175,7 +11175,7 @@ _.times(3, String);

_.toPath(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16195 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16195 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package") [Ⓣ][1] Converts `value` to a property path array. @@ -11203,7 +11203,7 @@ _.toPath('a[0].b.c');

_.uniqueId([prefix=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16219 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16219 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package") [Ⓣ][1] Generates a unique ID. If `prefix` is given, the ID is appended to it. @@ -11237,7 +11237,7 @@ _.uniqueId();

_.VERSION

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L16910 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16910 "View in source") [Ⓣ][1] (string): The semantic version number. @@ -11248,7 +11248,7 @@ _.uniqueId();

_.templateSettings

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1717 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1717 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package") [Ⓣ][1] (Object): By default, the template delimiters used by lodash are like those in embedded Ruby *(ERB)* as well as ES2015 template strings. Change the @@ -11261,7 +11261,7 @@ following template settings to use alternative delimiters.

_.templateSettings.escape

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1725 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1725 "View in source") [Ⓣ][1] (RegExp): Used to detect `data` property values to be HTML-escaped. @@ -11272,7 +11272,7 @@ following template settings to use alternative delimiters.

_.templateSettings.evaluate

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1733 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1733 "View in source") [Ⓣ][1] (RegExp): Used to detect code to be evaluated. @@ -11283,7 +11283,7 @@ following template settings to use alternative delimiters.

_.templateSettings.imports

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1757 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1757 "View in source") [Ⓣ][1] (Object): Used to import variables into the compiled template. @@ -11294,7 +11294,7 @@ following template settings to use alternative delimiters.

_.templateSettings.interpolate

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1741 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1741 "View in source") [Ⓣ][1] (RegExp): Used to detect `data` property values to inject. @@ -11305,7 +11305,7 @@ following template settings to use alternative delimiters.

_.templateSettings.variable

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1749 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1749 "View in source") [Ⓣ][1] (string): Used to reference the data object in the template text. @@ -11322,7 +11322,7 @@ following template settings to use alternative delimiters.

_.templateSettings.imports._

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.16/lodash.js#L1765 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1765 "View in source") [Ⓣ][1] A reference to the `lodash` function. diff --git a/lodash.js b/lodash.js index b0b2dcbec0..732812be00 100644 --- a/lodash.js +++ b/lodash.js @@ -12,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.16'; + var VERSION = '4.17.17'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; diff --git a/package-lock.json b/package-lock.json index 24d94807b8..739623f6d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "4.17.16", + "version": "4.17.17", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 51b68db520..e7f26a9d52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "4.17.16", + "version": "4.17.17", "license": "MIT", "private": true, "main": "lodash.js", From 1b6c282299f4e0271f932b466c67f0f822aa308e Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Wed, 8 Jul 2020 18:03:45 +0200 Subject: [PATCH 11/22] Bump to v4.17.18 --- README.md | 8 +- dist/lodash.js | 2 +- dist/lodash.min.js | 2 +- doc/README.md | 632 ++++++++++++++++++++++----------------------- lodash.js | 2 +- package-lock.json | 2 +- package.json | 2 +- 7 files changed, 325 insertions(+), 325 deletions(-) diff --git a/README.md b/README.md index 7e48862038..b6855f81bc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash v4.17.17 +# lodash v4.17.18 [Site](https://lodash.com/) | [Docs](https://lodash.com/docs) | @@ -20,11 +20,11 @@ $ lodash core -o ./dist/lodash.core.js ## Download - * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.17.17/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.17/dist/lodash.core.min.js)) - * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.17.17/dist/lodash.js) ([~24 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.17/dist/lodash.min.js)) + * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.17.18/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.18/dist/lodash.core.min.js)) + * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.17.18/dist/lodash.js) ([~24 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.18/dist/lodash.min.js)) * [CDN copies](https://www.jsdelivr.com/projects/lodash) -Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.17.17/LICENSE) & supports modern environments.
+Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.17.18/LICENSE) & supports modern environments.
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you. ## Installation diff --git a/dist/lodash.js b/dist/lodash.js index 732812be00..0a965c8fca 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -12,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.17'; + var VERSION = '4.17.18'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; diff --git a/dist/lodash.min.js b/dist/lodash.min.js index eb62aa3758..596c3187ef 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -12,7 +12,7 @@ return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;) for(var u=r-1,i=n.length;++u-1;);return r}function W(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}function C(n){return"\\"+Gr[n]}function U(n,t){ return null==n?Y:n[t]}function B(n){return Dr.test(n)}function T(n){return Mr.test(n)}function $(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function D(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function M(n,t){return function(r){return n(t(r))}}function F(n,t){for(var r=-1,e=n.length,u=0,i=[];++r>>1,Un=[["ary",dn],["bind",sn],["bindKey",hn],["curry",_n],["curryRight",vn],["flip",wn],["partial",gn],["partialRight",yn],["rearg",bn]],Bn="[object Arguments]",Tn="[object Array]",$n="[object AsyncFunction]",Dn="[object Boolean]",Mn="[object Date]",Fn="[object DOMException]",Nn="[object Error]",Pn="[object Function]",qn="[object GeneratorFunction]",Zn="[object Map]",Kn="[object Number]",Vn="[object Null]",Gn="[object Object]",Hn="[object Promise]",Jn="[object Proxy]",Yn="[object RegExp]",Qn="[object Set]",Xn="[object String]",nt="[object Symbol]",tt="[object Undefined]",rt="[object WeakMap]",et="[object WeakSet]",ut="[object ArrayBuffer]",it="[object DataView]",ot="[object Float32Array]",ft="[object Float64Array]",ct="[object Int8Array]",at="[object Int16Array]",lt="[object Int32Array]",st="[object Uint8Array]",ht="[object Uint8ClampedArray]",pt="[object Uint16Array]",_t="[object Uint32Array]",vt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39);/g,bt=/[&<>"']/g,wt=RegExp(dt.source),mt=RegExp(bt.source),xt=/<%-([\s\S]+?)%>/g,jt=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,It=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/[\\^$.*+?()[\]{}|]/g,zt=RegExp(Rt.source),Et=/^\s+|\s+$/g,St=/^\s+/,Wt=/\s+$/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ct=/\{\n\/\* \[wrapped with (.+)\] \*/,Ut=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tt=/\\(\\)?/g,$t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,Mt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Nt=/^\[object .+?Constructor\]$/,Pt=/^0o[0-7]+$/i,qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Vt=/['\n\r\u2028\u2029\\]/g,Gt="\\ud800-\\udfff",Ht="\\u0300-\\u036f",Jt="\\ufe20-\\ufe2f",Yt="\\u20d0-\\u20ff",Qt=Ht+Jt+Yt,Xt="\\u2700-\\u27bf",nr="a-z\\xdf-\\xf6\\xf8-\\xff",tr="\\xac\\xb1\\xd7\\xf7",rr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",er="\\u2000-\\u206f",ur=" \\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",ir="A-Z\\xc0-\\xd6\\xd8-\\xde",or="\\ufe0e\\ufe0f",fr=tr+rr+er+ur,cr="['\u2019]",ar="["+Gt+"]",lr="["+fr+"]",sr="["+Qt+"]",hr="\\d+",pr="["+Xt+"]",_r="["+nr+"]",vr="[^"+Gt+fr+hr+Xt+nr+ir+"]",gr="\\ud83c[\\udffb-\\udfff]",yr="(?:"+sr+"|"+gr+")",dr="[^"+Gt+"]",br="(?:\\ud83c[\\udde6-\\uddff]){2}",wr="[\\ud800-\\udbff][\\udc00-\\udfff]",mr="["+ir+"]",xr="\\u200d",jr="(?:"+_r+"|"+vr+")",Ar="(?:"+mr+"|"+vr+")",kr="(?:"+cr+"(?:d|ll|m|re|s|t|ve))?",Or="(?:"+cr+"(?:D|LL|M|RE|S|T|VE))?",Ir=yr+"?",Rr="["+or+"]?",zr="(?:"+xr+"(?:"+[dr,br,wr].join("|")+")"+Rr+Ir+")*",Er="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wr=Rr+Ir+zr,Lr="(?:"+[pr,br,wr].join("|")+")"+Wr,Cr="(?:"+[dr+sr+"?",sr,br,wr,ar].join("|")+")",Ur=RegExp(cr,"g"),Br=RegExp(sr,"g"),Tr=RegExp(gr+"(?="+gr+")|"+Cr+Wr,"g"),$r=RegExp([mr+"?"+_r+"+"+kr+"(?="+[lr,mr,"$"].join("|")+")",Ar+"+"+Or+"(?="+[lr,mr+jr,"$"].join("|")+")",mr+"?"+jr+"+"+kr,mr+"+"+Or,Sr,Er,hr,Lr].join("|"),"g"),Dr=RegExp("["+xr+Gt+Qt+or+"]"),Mr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nr=-1,Pr={}; +var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function q(n,t,r){for(var e=r-1,u=n.length;++e>>1,Un=[["ary",dn],["bind",sn],["bindKey",hn],["curry",_n],["curryRight",vn],["flip",wn],["partial",gn],["partialRight",yn],["rearg",bn]],Bn="[object Arguments]",Tn="[object Array]",$n="[object AsyncFunction]",Dn="[object Boolean]",Mn="[object Date]",Fn="[object DOMException]",Nn="[object Error]",Pn="[object Function]",qn="[object GeneratorFunction]",Zn="[object Map]",Kn="[object Number]",Vn="[object Null]",Gn="[object Object]",Hn="[object Promise]",Jn="[object Proxy]",Yn="[object RegExp]",Qn="[object Set]",Xn="[object String]",nt="[object Symbol]",tt="[object Undefined]",rt="[object WeakMap]",et="[object WeakSet]",ut="[object ArrayBuffer]",it="[object DataView]",ot="[object Float32Array]",ft="[object Float64Array]",ct="[object Int8Array]",at="[object Int16Array]",lt="[object Int32Array]",st="[object Uint8Array]",ht="[object Uint8ClampedArray]",pt="[object Uint16Array]",_t="[object Uint32Array]",vt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39);/g,bt=/[&<>"']/g,wt=RegExp(dt.source),mt=RegExp(bt.source),xt=/<%-([\s\S]+?)%>/g,jt=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,It=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/[\\^$.*+?()[\]{}|]/g,zt=RegExp(Rt.source),Et=/^\s+|\s+$/g,St=/^\s+/,Wt=/\s+$/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ct=/\{\n\/\* \[wrapped with (.+)\] \*/,Ut=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tt=/\\(\\)?/g,$t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,Mt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Nt=/^\[object .+?Constructor\]$/,Pt=/^0o[0-7]+$/i,qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Vt=/['\n\r\u2028\u2029\\]/g,Gt="\\ud800-\\udfff",Ht="\\u0300-\\u036f",Jt="\\ufe20-\\ufe2f",Yt="\\u20d0-\\u20ff",Qt=Ht+Jt+Yt,Xt="\\u2700-\\u27bf",nr="a-z\\xdf-\\xf6\\xf8-\\xff",tr="\\xac\\xb1\\xd7\\xf7",rr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",er="\\u2000-\\u206f",ur=" \\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",ir="A-Z\\xc0-\\xd6\\xd8-\\xde",or="\\ufe0e\\ufe0f",fr=tr+rr+er+ur,cr="['\u2019]",ar="["+Gt+"]",lr="["+fr+"]",sr="["+Qt+"]",hr="\\d+",pr="["+Xt+"]",_r="["+nr+"]",vr="[^"+Gt+fr+hr+Xt+nr+ir+"]",gr="\\ud83c[\\udffb-\\udfff]",yr="(?:"+sr+"|"+gr+")",dr="[^"+Gt+"]",br="(?:\\ud83c[\\udde6-\\uddff]){2}",wr="[\\ud800-\\udbff][\\udc00-\\udfff]",mr="["+ir+"]",xr="\\u200d",jr="(?:"+_r+"|"+vr+")",Ar="(?:"+mr+"|"+vr+")",kr="(?:"+cr+"(?:d|ll|m|re|s|t|ve))?",Or="(?:"+cr+"(?:D|LL|M|RE|S|T|VE))?",Ir=yr+"?",Rr="["+or+"]?",zr="(?:"+xr+"(?:"+[dr,br,wr].join("|")+")"+Rr+Ir+")*",Er="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wr=Rr+Ir+zr,Lr="(?:"+[pr,br,wr].join("|")+")"+Wr,Cr="(?:"+[dr+sr+"?",sr,br,wr,ar].join("|")+")",Ur=RegExp(cr,"g"),Br=RegExp(sr,"g"),Tr=RegExp(gr+"(?="+gr+")|"+Cr+Wr,"g"),$r=RegExp([mr+"?"+_r+"+"+kr+"(?="+[lr,mr,"$"].join("|")+")",Ar+"+"+Or+"(?="+[lr,mr+jr,"$"].join("|")+")",mr+"?"+jr+"+"+kr,mr+"+"+Or,Sr,Er,hr,Lr].join("|"),"g"),Dr=RegExp("["+xr+Gt+Qt+or+"]"),Mr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nr=-1,Pr={}; Pr[ot]=Pr[ft]=Pr[ct]=Pr[at]=Pr[lt]=Pr[st]=Pr[ht]=Pr[pt]=Pr[_t]=!0,Pr[Bn]=Pr[Tn]=Pr[ut]=Pr[Dn]=Pr[it]=Pr[Mn]=Pr[Nn]=Pr[Pn]=Pr[Zn]=Pr[Kn]=Pr[Gn]=Pr[Yn]=Pr[Qn]=Pr[Xn]=Pr[rt]=!1;var qr={};qr[Bn]=qr[Tn]=qr[ut]=qr[it]=qr[Dn]=qr[Mn]=qr[ot]=qr[ft]=qr[ct]=qr[at]=qr[lt]=qr[Zn]=qr[Kn]=qr[Gn]=qr[Yn]=qr[Qn]=qr[Xn]=qr[nt]=qr[st]=qr[ht]=qr[pt]=qr[_t]=!0,qr[Nn]=qr[Pn]=qr[rt]=!1;var Zr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a", "\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae", "\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g", diff --git a/doc/README.md b/doc/README.md index d0a29594ab..6793c2c172 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,4 @@ -# lodash v4.17.17 +# lodash v4.17.18 @@ -415,7 +415,7 @@

_.chunk(array, [size=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L6861 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L6861 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package") [Ⓣ][1] 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 @@ -446,7 +446,7 @@ _.chunk(['a', 'b', 'c', 'd'], 3);

_.compact(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L6896 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L6896 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package") [Ⓣ][1] Creates an array with all falsey values removed. The values `false`, `null`, `0`, `""`, `undefined`, and `NaN` are falsey. @@ -472,7 +472,7 @@ _.compact([0, 1, false, 2, '', 3]);

_.concat(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L6933 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.concat "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L6933 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.concat "See the npm package") [Ⓣ][1] Creates a new array concatenating `array` with any additional arrays and/or values. @@ -505,7 +505,7 @@ console.log(array);

_.difference(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L6969 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L6969 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package") [Ⓣ][1] Creates an array of `array` values not included in the other given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -537,7 +537,7 @@ _.difference([2, 1], [2, 3]);

_.differenceBy(array, [values], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7001 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differenceby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7001 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differenceby "See the npm package") [Ⓣ][1] This method is like `_.difference` except that it accepts `iteratee` which is invoked for each element of `array` and `values` to generate the criterion @@ -575,7 +575,7 @@ _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');

_.differenceWith(array, [values], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7034 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differencewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7034 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.differencewith "See the npm package") [Ⓣ][1] This method is like `_.difference` except that it accepts `comparator` which is invoked to compare elements of `array` to `values`. The order and @@ -610,7 +610,7 @@ _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);

_.drop(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7069 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7069 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements dropped from the beginning. @@ -645,7 +645,7 @@ _.drop([1, 2, 3], 0);

_.dropRight(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7103 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7103 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements dropped from the end. @@ -680,7 +680,7 @@ _.dropRight([1, 2, 3], 0);

_.dropRightWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7148 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7148 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package") [Ⓣ][1] Creates a slice of `array` excluding elements dropped from the end. Elements are dropped until `predicate` returns falsey. The predicate is @@ -726,7 +726,7 @@ _.dropRightWhile(users, 'active');

_.dropWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7189 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7189 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package") [Ⓣ][1] Creates a slice of `array` excluding elements dropped from the beginning. Elements are dropped until `predicate` returns falsey. The predicate is @@ -772,7 +772,7 @@ _.dropWhile(users, 'active');

_.fill(array, value, [start=0], [end=array.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package") [Ⓣ][1] Fills elements of `array` with `value` from `start` up to, but not including, `end`. @@ -813,7 +813,7 @@ _.fill([4, 6, 8, 10], '*', 1, 3);

_.findIndex(array, [predicate=_.identity], [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7271 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7271 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package") [Ⓣ][1] This method is like `_.find` except that it returns the index of the first element `predicate` returns truthy for instead of the element itself. @@ -859,7 +859,7 @@ _.findIndex(users, 'active');

_.findLastIndex(array, [predicate=_.identity], [fromIndex=array.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7318 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7318 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package") [Ⓣ][1] This method is like `_.findIndex` except that it iterates over elements of `collection` from right to left. @@ -905,7 +905,7 @@ _.findLastIndex(users, 'active');

_.flatten(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7347 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7347 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package") [Ⓣ][1] Flattens `array` a single level deep. @@ -930,7 +930,7 @@ _.flatten([1, [2, [3, [4]], 5]]);

_.flattenDeep(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7366 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7366 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") [Ⓣ][1] Recursively flattens `array`. @@ -955,7 +955,7 @@ _.flattenDeep([1, [2, [3, [4]], 5]]);

_.flattenDepth(array, [depth=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7391 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7391 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") [Ⓣ][1] Recursively flatten `array` up to `depth` times. @@ -986,7 +986,7 @@ _.flattenDepth(array, 2);

_.fromPairs(pairs)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7415 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.frompairs "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7415 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.frompairs "See the npm package") [Ⓣ][1] The inverse of `_.toPairs`; this method returns an object composed from key-value `pairs`. @@ -1012,7 +1012,7 @@ _.fromPairs([['a', 1], ['b', 2]]);

_.head(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7445 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7445 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package") [Ⓣ][1] Gets the first element of `array`. @@ -1043,7 +1043,7 @@ _.head([]);

_.indexOf(array, value, [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7472 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7472 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package") [Ⓣ][1] Gets the index at which the first occurrence of `value` is found in `array` using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -1077,7 +1077,7 @@ _.indexOf([1, 2, 1, 2], 2, 2);

_.initial(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7498 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7498 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package") [Ⓣ][1] Gets all but the last element of `array`. @@ -1102,7 +1102,7 @@ _.initial([1, 2, 3]);

_.intersection([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7520 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7520 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package") [Ⓣ][1] Creates an array of unique values that are included in all given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -1130,7 +1130,7 @@ _.intersection([2, 1], [2, 3]);

_.intersectionBy([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7550 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7550 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionby "See the npm package") [Ⓣ][1] This method is like `_.intersection` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion @@ -1164,7 +1164,7 @@ _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');

_.intersectionWith([arrays], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7585 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7585 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package") [Ⓣ][1] This method is like `_.intersection` except that it accepts `comparator` which is invoked to compare elements of `arrays`. The order and references @@ -1196,7 +1196,7 @@ _.intersectionWith(objects, others, _.isEqual);

_.join(array, [separator=','])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7613 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.join "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7613 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.join "See the npm package") [Ⓣ][1] Converts all elements in `array` into a string separated by `separator`. @@ -1222,7 +1222,7 @@ _.join(['a', 'b', 'c'], '~');

_.last(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7631 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7631 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") [Ⓣ][1] Gets the last element of `array`. @@ -1247,7 +1247,7 @@ _.last([1, 2, 3]);

_.lastIndexOf(array, value, [fromIndex=array.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7657 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7657 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package") [Ⓣ][1] This method is like `_.indexOf` except that it iterates over elements of `array` from right to left. @@ -1279,7 +1279,7 @@ _.lastIndexOf([1, 2, 1, 2], 2, 2);

_.nth(array, [n=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7693 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.nth "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7693 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.nth "See the npm package") [Ⓣ][1] Gets the element at index `n` of `array`. If `n` is negative, the nth element from the end is returned. @@ -1311,7 +1311,7 @@ _.nth(array, -2);

_.pull(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7720 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7720 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package") [Ⓣ][1] Removes all given values from `array` using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -1346,7 +1346,7 @@ console.log(array);

_.pullAll(array, values)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7742 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullall "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7742 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullall "See the npm package") [Ⓣ][1] This method is like `_.pull` except that it accepts an array of values to remove.
@@ -1378,7 +1378,7 @@ console.log(array);

_.pullAllBy(array, values, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7771 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7771 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallby "See the npm package") [Ⓣ][1] This method is like `_.pullAll` except that it accepts `iteratee` which is invoked for each element of `array` and `values` to generate the criterion @@ -1413,7 +1413,7 @@ console.log(array);

_.pullAllWith(array, values, [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7800 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7800 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullallwith "See the npm package") [Ⓣ][1] This method is like `_.pullAll` except that it accepts `comparator` which is invoked to compare elements of `array` to `values`. The comparator is @@ -1448,7 +1448,7 @@ console.log(array);

_.pullAt(array, [indexes])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7830 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7830 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package") [Ⓣ][1] Removes elements from `array` corresponding to `indexes` and returns an array of removed elements. @@ -1484,7 +1484,7 @@ console.log(pulled);

_.remove(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7869 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7869 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package") [Ⓣ][1] Removes all elements from `array` that `predicate` returns truthy for and returns an array of the removed elements. The predicate is invoked @@ -1524,7 +1524,7 @@ console.log(evens);

_.reverse(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7913 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reverse "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7913 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reverse "See the npm package") [Ⓣ][1] Reverses `array` so that the first element becomes the last, the second element becomes the second to last, and so on. @@ -1559,7 +1559,7 @@ console.log(array);

_.slice(array, [start=0], [end=array.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7933 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7933 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package") [Ⓣ][1] Creates a slice of `array` from `start` up to, but not including, `end`.
@@ -1586,7 +1586,7 @@ returned.

_.sortedIndex(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7966 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7966 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package") [Ⓣ][1] Uses a binary search to determine the lowest index at which `value` should be inserted into `array` in order to maintain its sort order. @@ -1613,7 +1613,7 @@ _.sortedIndex([30, 50], 40);

_.sortedIndexBy(array, value, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L7995 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L7995 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package") [Ⓣ][1] This method is like `_.sortedIndex` except that it accepts `iteratee` which is invoked for `value` and each element of `array` to compute their @@ -1648,7 +1648,7 @@ _.sortedIndexBy(objects, { 'x': 4 }, 'x');

_.sortedIndexOf(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8015 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8015 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package") [Ⓣ][1] This method is like `_.indexOf` except that it performs a binary search on a sorted `array`. @@ -1675,7 +1675,7 @@ _.sortedIndexOf([4, 5, 5, 5, 6], 5);

_.sortedLastIndex(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8044 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8044 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package") [Ⓣ][1] This method is like `_.sortedIndex` except that it returns the highest index at which `value` should be inserted into `array` in order to @@ -1703,7 +1703,7 @@ _.sortedLastIndex([4, 5, 5, 5, 6], 5);

_.sortedLastIndexBy(array, value, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8073 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8073 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package") [Ⓣ][1] This method is like `_.sortedLastIndex` except that it accepts `iteratee` which is invoked for `value` and each element of `array` to compute their @@ -1738,7 +1738,7 @@ _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');

_.sortedLastIndexOf(array, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8093 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8093 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package") [Ⓣ][1] This method is like `_.lastIndexOf` except that it performs a binary search on a sorted `array`. @@ -1765,7 +1765,7 @@ _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);

_.sortedUniq(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8119 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8119 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package") [Ⓣ][1] This method is like `_.uniq` except that it's designed and optimized for sorted arrays. @@ -1791,7 +1791,7 @@ _.sortedUniq([1, 1, 2]);

_.sortedUniqBy(array, [iteratee])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8141 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8141 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package") [Ⓣ][1] This method is like `_.uniqBy` except that it's designed and optimized for sorted arrays. @@ -1818,7 +1818,7 @@ _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);

_.tail(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8161 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tail "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8161 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tail "See the npm package") [Ⓣ][1] Gets all but the first element of `array`. @@ -1843,7 +1843,7 @@ _.tail([1, 2, 3]);

_.take(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8191 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8191 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements taken from the beginning. @@ -1878,7 +1878,7 @@ _.take([1, 2, 3], 0);

_.takeRight(array, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package") [Ⓣ][1] Creates a slice of `array` with `n` elements taken from the end. @@ -1913,7 +1913,7 @@ _.takeRight([1, 2, 3], 0);

_.takeRightWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8269 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8269 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package") [Ⓣ][1] Creates a slice of `array` with elements taken from the end. Elements are taken until `predicate` returns falsey. The predicate is invoked with @@ -1959,7 +1959,7 @@ _.takeRightWhile(users, 'active');

_.takeWhile(array, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8310 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8310 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package") [Ⓣ][1] Creates a slice of `array` with elements taken from the beginning. Elements are taken until `predicate` returns falsey. The predicate is invoked with @@ -2005,7 +2005,7 @@ _.takeWhile(users, 'active');

_.union([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8332 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8332 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package") [Ⓣ][1] Creates an array of unique values, in order, from all given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -2032,7 +2032,7 @@ _.union([2], [1, 2]);

_.unionBy([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8359 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8359 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionby "See the npm package") [Ⓣ][1] This method is like `_.union` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion by @@ -2066,7 +2066,7 @@ _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');

_.unionWith([arrays], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8388 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8388 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unionwith "See the npm package") [Ⓣ][1] This method is like `_.union` except that it accepts `comparator` which is invoked to compare elements of `arrays`. Result values are chosen from @@ -2098,7 +2098,7 @@ _.unionWith(objects, others, _.isEqual);

_.uniq(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8412 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8412 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package") [Ⓣ][1] Creates a duplicate-free version of an array, using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -2127,7 +2127,7 @@ _.uniq([2, 1, 2]);

_.uniqBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8439 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8439 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqby "See the npm package") [Ⓣ][1] This method is like `_.uniq` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -2161,7 +2161,7 @@ _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');

_.uniqWith(array, [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8463 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8463 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqwith "See the npm package") [Ⓣ][1] This method is like `_.uniq` except that it accepts `comparator` which is invoked to compare elements of `array`. The order of result values is @@ -2192,7 +2192,7 @@ _.uniqWith(objects, _.isEqual);

_.unzip(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8487 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8487 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package") [Ⓣ][1] 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 @@ -2222,7 +2222,7 @@ _.unzip(zipped);

_.unzipWith(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8524 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzipwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8524 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unzipwith "See the npm package") [Ⓣ][1] This method is like `_.unzip` except that it accepts `iteratee` to specify how regrouped values should be combined. The iteratee is invoked with the @@ -2253,7 +2253,7 @@ _.unzipWith(zipped, _.add);

_.without(array, [values])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8557 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8557 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package") [Ⓣ][1] Creates an array excluding all given values using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -2284,7 +2284,7 @@ _.without([2, 1, 2, 3], 1, 2);

_.xor([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8581 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8581 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package") [Ⓣ][1] Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) @@ -2312,7 +2312,7 @@ _.xor([2, 1], [2, 3]);

_.xorBy([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8608 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8608 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorby "See the npm package") [Ⓣ][1] This method is like `_.xor` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion by @@ -2346,7 +2346,7 @@ _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');

_.xorWith([arrays], [comparator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8637 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8637 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.xorwith "See the npm package") [Ⓣ][1] This method is like `_.xor` except that it accepts `comparator` which is invoked to compare elements of `arrays`. The order of result values is @@ -2378,7 +2378,7 @@ _.xorWith(objects, others, _.isEqual);

_.zip([arrays])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8659 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8659 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package") [Ⓣ][1] Creates an array of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the @@ -2405,7 +2405,7 @@ _.zip(['a', 'b'], [1, 2], [true, false]);

_.zipObject([props=[]], [values=[]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8677 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8677 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package") [Ⓣ][1] This method is like `_.fromPairs` except that it accepts two arrays, one of property identifiers and one of corresponding values. @@ -2432,7 +2432,7 @@ _.zipObject(['a', 'b'], [1, 2]);

_.zipObjectDeep([props=[]], [values=[]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8696 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8696 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package") [Ⓣ][1] This method is like `_.zipObject` except that it supports property paths. @@ -2458,7 +2458,7 @@ _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);

_.zipWith([arrays], [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8720 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8720 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.zipwith "See the npm package") [Ⓣ][1] This method is like `_.zip` except that it accepts `iteratee` to specify how grouped values should be combined. The iteratee is invoked with the @@ -2494,7 +2494,7 @@ _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {

_.countBy(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9099 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9099 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package") [Ⓣ][1] Creates an object composed of keys generated from the results of running each element of `collection` thru `iteratee`. The corresponding value of @@ -2527,7 +2527,7 @@ _.countBy(['one', 'two', 'three'], 'length');

_.every(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9148 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9148 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package") [Ⓣ][1] Checks if `predicate` returns truthy for **all** elements of `collection`. Iteration is stopped once `predicate` returns falsey. The predicate is @@ -2578,7 +2578,7 @@ _.every(users, 'active');

_.filter(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9197 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9197 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package") [Ⓣ][1] Iterates over elements of `collection`, returning an array of all elements `predicate` returns truthy for. The predicate is invoked with three @@ -2630,7 +2630,7 @@ _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));

_.find(collection, [predicate=_.identity], [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9238 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9238 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package") [Ⓣ][1] Iterates over elements of `collection`, returning the first element `predicate` returns truthy for. The predicate is invoked with three @@ -2677,7 +2677,7 @@ _.find(users, 'active');

_.findLast(collection, [predicate=_.identity], [fromIndex=collection.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9259 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9259 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package") [Ⓣ][1] This method is like `_.find` except that it iterates over elements of `collection` from right to left. @@ -2707,7 +2707,7 @@ _.findLast([1, 2, 3, 4], function(n) {

_.flatMap(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9282 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9282 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmap "See the npm package") [Ⓣ][1] Creates a flattened array of values by running each element in `collection` thru `iteratee` and flattening the mapped results. The iteratee is invoked @@ -2739,7 +2739,7 @@ _.flatMap([1, 2], duplicate);

_.flatMapDeep(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9306 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9306 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package") [Ⓣ][1] This method is like `_.flatMap` except that it recursively flattens the mapped results. @@ -2770,7 +2770,7 @@ _.flatMapDeep([1, 2], duplicate);

_.flatMapDepth(collection, [iteratee=_.identity], [depth=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9331 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9331 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package") [Ⓣ][1] This method is like `_.flatMap` except that it recursively flattens the mapped results up to `depth` times. @@ -2802,7 +2802,7 @@ _.flatMapDepth([1, 2], duplicate, 2);

_.forEach(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9366 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9366 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package") [Ⓣ][1] Iterates over elements of `collection` and invokes `iteratee` for each element. The iteratee is invoked with three arguments: *(value, index|key, collection)*. @@ -2845,7 +2845,7 @@ _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {

_.forEachRight(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9391 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9391 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package") [Ⓣ][1] This method is like `_.forEach` except that it iterates over elements of `collection` from right to left. @@ -2877,7 +2877,7 @@ _.forEachRight([1, 2], function(value) {

_.groupBy(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9419 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9419 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package") [Ⓣ][1] Creates an object composed of keys generated from the results of running each element of `collection` thru `iteratee`. The order of grouped values @@ -2911,7 +2911,7 @@ _.groupBy(['one', 'two', 'three'], 'length');

_.includes(collection, value, [fromIndex=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9457 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9457 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package") [Ⓣ][1] Checks if `value` is in `collection`. If `collection` is a string, it's checked for a substring of `value`, otherwise @@ -2951,7 +2951,7 @@ _.includes('abcd', 'bc');

_.invokeMap(collection, path, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9493 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invokemap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9493 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invokemap "See the npm package") [Ⓣ][1] Invokes the method at `path` of each element in `collection`, returning an array of the results of each invoked method. Any additional arguments @@ -2984,7 +2984,7 @@ _.invokeMap([123, 456], String.prototype.split, '');

_.keyBy(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9532 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keyby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9532 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keyby "See the npm package") [Ⓣ][1] Creates an object composed of keys generated from the results of running each element of `collection` thru `iteratee`. The corresponding value of @@ -3023,7 +3023,7 @@ _.keyBy(array, 'dir');

_.map(collection, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9578 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9578 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package") [Ⓣ][1] Creates an array of values by running each element in `collection` thru `iteratee`. The iteratee is invoked with three arguments:
@@ -3078,7 +3078,7 @@ _.map(users, 'user');

_.orderBy(collection, [iteratees=[_.identity]], [orders])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9612 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.orderby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9612 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.orderby "See the npm package") [Ⓣ][1] 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 @@ -3116,7 +3116,7 @@ _.orderBy(users, ['user', 'age'], ['asc', 'desc']);

_.partition(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9662 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9662 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package") [Ⓣ][1] Creates an array of elements split into two groups, the first of which contains elements `predicate` returns truthy for, the second of which @@ -3163,7 +3163,7 @@ _.partition(users, 'active');

_.reduce(collection, [iteratee=_.identity], [accumulator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9703 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9703 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package") [Ⓣ][1] Reduces `collection` to a value which is the accumulated result of running each element in `collection` thru `iteratee`, where each successive @@ -3212,7 +3212,7 @@ _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {

_.reduceRight(collection, [iteratee=_.identity], [accumulator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9732 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9732 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package") [Ⓣ][1] This method is like `_.reduce` except that it iterates over elements of `collection` from right to left. @@ -3244,7 +3244,7 @@ _.reduceRight(array, function(flattened, other) {

_.reject(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9773 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9773 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package") [Ⓣ][1] The opposite of `_.filter`; this method returns the elements of `collection` that `predicate` does **not** return truthy for. @@ -3288,7 +3288,7 @@ _.reject(users, 'active');

_.sample(collection)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9792 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9792 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package") [Ⓣ][1] Gets a random element from `collection`. @@ -3313,7 +3313,7 @@ _.sample([1, 2, 3, 4]);

_.sampleSize(collection, [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9817 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.samplesize "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9817 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.samplesize "See the npm package") [Ⓣ][1] Gets `n` random elements at unique keys from `collection` up to the size of `collection`. @@ -3343,7 +3343,7 @@ _.sampleSize([1, 2, 3], 4);

_.shuffle(collection)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9842 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9842 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package") [Ⓣ][1] Creates an array of shuffled values, using a version of the [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). @@ -3369,7 +3369,7 @@ _.shuffle([1, 2, 3, 4]);

_.size(collection)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9868 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9868 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package") [Ⓣ][1] Gets the size of `collection` by returning its length for array-like values or the number of own enumerable string keyed properties for objects. @@ -3401,7 +3401,7 @@ _.size('pebbles');

_.some(collection, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9918 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9918 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package") [Ⓣ][1] Checks if `predicate` returns truthy for **any** element of `collection`. Iteration is stopped once `predicate` returns truthy. The predicate is @@ -3446,7 +3446,7 @@ _.some(users, 'active');

_.sortBy(collection, [iteratees=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9955 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9955 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package") [Ⓣ][1] Creates an array of elements, sorted in ascending order by the results of running each element in a collection thru each iteratee. This method @@ -3491,7 +3491,7 @@ _.sortBy(users, ['user', 'age']);

_.now()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9986 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9986 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package") [Ⓣ][1] Gets the timestamp of the number of milliseconds that have elapsed since the Unix epoch *(1 January `1970 00`:00:00 UTC)*. @@ -3522,7 +3522,7 @@ _.defer(function(stamp) {

_.after(n, func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10016 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10016 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package") [Ⓣ][1] The opposite of `_.before`; this method creates a function that invokes `func` once it's called `n` or more times. @@ -3557,7 +3557,7 @@ _.forEach(saves, function(type) {

_.ary(func, [n=func.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10045 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10045 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package") [Ⓣ][1] Creates a function that invokes `func`, with up to `n` arguments, ignoring any additional arguments. @@ -3584,7 +3584,7 @@ _.map(['6', '8', '10'], _.ary(parseInt, 1));

_.before(n, func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10068 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10068 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package") [Ⓣ][1] 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 @@ -3612,7 +3612,7 @@ jQuery(element).on('click', _.before(5, addContactToList));

_.bind(func, thisArg, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10120 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10120 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the `this` binding of `thisArg` and `partials` prepended to the arguments it receives. @@ -3660,7 +3660,7 @@ bound('hi');

_.bindKey(object, key, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10174 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10174 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package") [Ⓣ][1] Creates a function that invokes the method at `object[key]` with `partials` prepended to the arguments it receives. @@ -3718,7 +3718,7 @@ bound('hi');

_.curry(func, [arity=func.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package") [Ⓣ][1] Creates a function that accepts arguments of `func` and either invokes `func` returning its result, if at least `arity` number of arguments have @@ -3771,7 +3771,7 @@ curried(1)(_, 3)(2);

_.curryRight(func, [arity=func.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10269 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10269 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package") [Ⓣ][1] This method is like `_.curry` except that arguments are applied to `func` in the manner of `_.partialRight` instead of `_.partial`. @@ -3821,7 +3821,7 @@ curried(3)(1, _)(2);

_.debounce(func, [wait=0], [options={}])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10330 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10330 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package") [Ⓣ][1] Creates a debounced function that delays invoking `func` until after `wait` milliseconds have elapsed since the last time the debounced function was @@ -3886,7 +3886,7 @@ jQuery(window).on('popstate', debounced.cancel);

_.defer(func, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10473 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10473 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package") [Ⓣ][1] Defers invoking the `func` until the current call stack has cleared. Any additional arguments are provided to `func` when it's invoked. @@ -3915,7 +3915,7 @@ _.defer(function(text) {

_.delay(func, wait, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10496 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10496 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package") [Ⓣ][1] Invokes `func` after `wait` milliseconds. Any additional arguments are provided to `func` when it's invoked. @@ -3945,7 +3945,7 @@ _.delay(function(text) {

_.flip(func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10518 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10518 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with arguments reversed. @@ -3974,7 +3974,7 @@ flipped('a', 'b', 'c', 'd');

_.memoize(func, [resolver])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10566 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10566 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package") [Ⓣ][1] 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 @@ -4030,7 +4030,7 @@ _.memoize.Cache = WeakMap;

_.negate(predicate)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10609 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10609 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package") [Ⓣ][1] Creates a function that negates the result of the predicate `func`. The `func` predicate is invoked with the `this` binding and arguments of the @@ -4061,7 +4061,7 @@ _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));

_.once(func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10643 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10643 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package") [Ⓣ][1] 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 @@ -4090,7 +4090,7 @@ initialize();

_.overArgs(func, [transforms=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10678 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overargs "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10678 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overargs "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with its arguments transformed. @@ -4131,7 +4131,7 @@ func(10, 5);

_.partial(func, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10728 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10728 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with `partials` prepended to the arguments it receives. This method is like `_.bind` except it does **not** @@ -4177,7 +4177,7 @@ greetFred('hi');

_.partialRight(func, [partials])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10765 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10765 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package") [Ⓣ][1] This method is like `_.partial` except that partially applied arguments are appended to the arguments it receives. @@ -4222,7 +4222,7 @@ sayHelloTo('fred');

_.rearg(func, indexes)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10792 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10792 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with arguments arranged according to the specified `indexes` where the argument value at the first index is @@ -4255,7 +4255,7 @@ rearged('b', 'c', 'a')

_.rest(func, [start=func.length-1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10821 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10821 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the `this` binding of the created function and arguments from `start` and beyond provided as @@ -4292,7 +4292,7 @@ say('hello', 'fred', 'barney', 'pebbles');

_.spread(func, [start=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10863 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10863 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the `this` binding of the create function and an array of arguments much like @@ -4338,7 +4338,7 @@ numbers.then(_.spread(function(x, y) {

_.throttle(func, [wait=0], [options={}])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10923 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10923 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package") [Ⓣ][1] Creates a throttled function that only invokes `func` at most once per every `wait` milliseconds. The throttled function comes with a `cancel` @@ -4394,7 +4394,7 @@ jQuery(window).on('popstate', throttled.cancel);

_.unary(func)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10956 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unary "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10956 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unary "See the npm package") [Ⓣ][1] Creates a function that accepts up to one argument, ignoring any additional arguments. @@ -4420,7 +4420,7 @@ _.map(['6', '8', '10'], _.unary(parseInt));

_.wrap(value, [wrapper=identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L10982 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L10982 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package") [Ⓣ][1] Creates a function that provides `value` to `wrapper` as its first argument. Any additional arguments provided to the function are appended @@ -4459,7 +4459,7 @@ p('fred, barney, & pebbles');

_.castArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11021 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.castarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11021 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.castarray "See the npm package") [Ⓣ][1] Casts `value` as an array if it's not one. @@ -4503,7 +4503,7 @@ console.log(_.castArray(array) === array);

_.clone(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11055 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11055 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package") [Ⓣ][1] Creates a shallow clone of `value`.
@@ -4540,7 +4540,7 @@ console.log(shallow[0] === objects[0]);

_.cloneDeep(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11113 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11113 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package") [Ⓣ][1] This method is like `_.clone` except that it recursively clones `value`. @@ -4568,7 +4568,7 @@ console.log(deep[0] === objects[0]);

_.cloneDeepWith(value, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11145 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11145 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package") [Ⓣ][1] This method is like `_.cloneWith` except that it recursively clones `value`. @@ -4606,7 +4606,7 @@ console.log(el.childNodes.length);

_.cloneWith(value, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11090 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11090 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clonewith "See the npm package") [Ⓣ][1] This method is like `_.clone` except that it accepts `customizer` which is invoked to produce the cloned value. If `customizer` returns `undefined`, @@ -4647,7 +4647,7 @@ console.log(el.childNodes.length);

_.conformsTo(object, source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11174 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conformsto "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11174 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conformsto "See the npm package") [Ⓣ][1] Checks if `object` conforms to `source` by invoking the predicate properties of `source` with the corresponding property values of `object`. @@ -4683,7 +4683,7 @@ _.conformsTo(object, { 'b': function(n) { return n > 2; } });

_.eq(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11210 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.eq "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11210 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.eq "See the npm package") [Ⓣ][1] Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -4726,7 +4726,7 @@ _.eq(NaN, NaN);

_.gt(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11237 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11237 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package") [Ⓣ][1] Checks if `value` is greater than `other`. @@ -4758,7 +4758,7 @@ _.gt(1, 3);

_.gte(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11262 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gte "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11262 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.gte "See the npm package") [Ⓣ][1] Checks if `value` is greater than or equal to `other`. @@ -4790,7 +4790,7 @@ _.gte(1, 3);

_.isArguments(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11284 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11284 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") [Ⓣ][1] Checks if `value` is likely an `arguments` object. @@ -4818,7 +4818,7 @@ _.isArguments([1, 2, 3]);

_.isArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11312 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11312 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") [Ⓣ][1] Checks if `value` is classified as an `Array` object. @@ -4852,7 +4852,7 @@ _.isArray(_.noop);

_.isArrayBuffer(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11331 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11331 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package") [Ⓣ][1] Checks if `value` is classified as an `ArrayBuffer` object. @@ -4880,7 +4880,7 @@ _.isArrayBuffer(new Array(2));

_.isArrayLike(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11358 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylike "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11358 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylike "See the npm package") [Ⓣ][1] 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 @@ -4916,7 +4916,7 @@ _.isArrayLike(_.noop);

_.isArrayLikeObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11387 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11387 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package") [Ⓣ][1] This method is like `_.isArrayLike` except that it also checks if `value` is an object. @@ -4951,7 +4951,7 @@ _.isArrayLikeObject(_.noop);

_.isBoolean(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11408 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11408 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package") [Ⓣ][1] Checks if `value` is classified as a boolean primitive or object. @@ -4979,7 +4979,7 @@ _.isBoolean(null);

_.isBuffer(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11430 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11430 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package") [Ⓣ][1] Checks if `value` is a buffer. @@ -5007,7 +5007,7 @@ _.isBuffer(new Uint8Array(2));

_.isDate(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11449 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11449 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Date` object. @@ -5035,7 +5035,7 @@ _.isDate('Mon April 23 2012');

_.isElement(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11468 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11468 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") [Ⓣ][1] Checks if `value` is likely a DOM element. @@ -5063,7 +5063,7 @@ _.isElement('');

_.isEmpty(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11505 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11505 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package") [Ⓣ][1] Checks if `value` is an empty object, collection, map, or set.
@@ -5109,7 +5109,7 @@ _.isEmpty({ 'a': 1 });

_.isEqual(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11557 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11557 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package") [Ⓣ][1] Performs a deep comparison between two values to determine if they are equivalent. @@ -5149,7 +5149,7 @@ object === other;

_.isEqualWith(value, other, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11593 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequalwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11593 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isequalwith "See the npm package") [Ⓣ][1] This method is like `_.isEqual` except that it accepts `customizer` which is invoked to compare values. If `customizer` returns `undefined`, comparisons @@ -5192,7 +5192,7 @@ _.isEqualWith(array, other, customizer);

_.isError(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11617 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11617 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package") [Ⓣ][1] Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`, `TypeError`, or `URIError` object. @@ -5221,7 +5221,7 @@ _.isError(Error);

_.isFinite(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11652 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11652 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") [Ⓣ][1] Checks if `value` is a finite primitive number.
@@ -5259,7 +5259,7 @@ _.isFinite('3');

_.isFunction(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11673 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11673 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Function` object. @@ -5287,7 +5287,7 @@ _.isFunction(/abc/);

_.isInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11709 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11709 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package") [Ⓣ][1] Checks if `value` is an integer.
@@ -5325,7 +5325,7 @@ _.isInteger('3');

_.isLength(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11739 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11739 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package") [Ⓣ][1] Checks if `value` is a valid array-like length.
@@ -5363,7 +5363,7 @@ _.isLength('3');

_.isMap(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11819 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11819 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Map` object. @@ -5391,7 +5391,7 @@ _.isMap(new WeakMap);

_.isMatch(object, source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11849 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11849 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package") [Ⓣ][1] Performs a partial deep comparison between `object` and `source` to determine if `object` contains equivalent property values. @@ -5432,7 +5432,7 @@ _.isMatch(object, { 'b': 1 });

_.isMatchWith(object, source, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11885 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11885 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package") [Ⓣ][1] This method is like `_.isMatch` except that it accepts `customizer` which is invoked to compare values. If `customizer` returns `undefined`, comparisons @@ -5475,7 +5475,7 @@ _.isMatchWith(object, source, customizer);

_.isNaN(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11918 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11918 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") [Ⓣ][1] Checks if `value` is `NaN`.
@@ -5515,7 +5515,7 @@ _.isNaN(undefined);

_.isNative(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11951 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11951 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") [Ⓣ][1] Checks if `value` is a pristine native function.
@@ -5552,7 +5552,7 @@ _.isNative(_);

_.isNil(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11999 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11999 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package") [Ⓣ][1] Checks if `value` is `null` or `undefined`. @@ -5583,7 +5583,7 @@ _.isNil(NaN);

_.isNull(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11975 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11975 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") [Ⓣ][1] Checks if `value` is `null`. @@ -5611,7 +5611,7 @@ _.isNull(void 0);

_.isNumber(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12029 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12029 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Number` primitive or object.
@@ -5649,7 +5649,7 @@ _.isNumber('3');

_.isObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11769 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11769 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") [Ⓣ][1] Checks if `value` is the [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) @@ -5685,7 +5685,7 @@ _.isObject(null);

_.isObjectLike(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L11798 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L11798 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package") [Ⓣ][1] Checks if `value` is object-like. A value is object-like if it's not `null` and has a `typeof` result of "object". @@ -5720,7 +5720,7 @@ _.isObjectLike(null);

_.isPlainObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12062 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12062 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package") [Ⓣ][1] Checks if `value` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`. @@ -5759,7 +5759,7 @@ _.isPlainObject(Object.create(null));

_.isRegExp(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12092 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12092 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `RegExp` object. @@ -5787,7 +5787,7 @@ _.isRegExp('/abc/');

_.isSafeInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12121 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12121 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package") [Ⓣ][1] 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. @@ -5826,7 +5826,7 @@ _.isSafeInteger('3');

_.isSet(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12142 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12142 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Set` object. @@ -5854,7 +5854,7 @@ _.isSet(new WeakSet);

_.isString(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12161 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12161 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `String` primitive or object. @@ -5882,7 +5882,7 @@ _.isString(1);

_.isSymbol(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12183 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issymbol "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12183 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.issymbol "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `Symbol` primitive or object. @@ -5910,7 +5910,7 @@ _.isSymbol('abc');

_.isTypedArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12205 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12205 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") [Ⓣ][1] Checks if `value` is classified as a typed array. @@ -5938,7 +5938,7 @@ _.isTypedArray([]);

_.isUndefined(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12224 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") [Ⓣ][1] Checks if `value` is `undefined`. @@ -5966,7 +5966,7 @@ _.isUndefined(null);

_.isWeakMap(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12245 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12245 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `WeakMap` object. @@ -5994,7 +5994,7 @@ _.isWeakMap(new Map);

_.isWeakSet(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12266 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12266 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package") [Ⓣ][1] Checks if `value` is classified as a `WeakSet` object. @@ -6022,7 +6022,7 @@ _.isWeakSet(new Set);

_.lt(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12293 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12293 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package") [Ⓣ][1] Checks if `value` is less than `other`. @@ -6054,7 +6054,7 @@ _.lt(3, 1);

_.lte(value, other)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12318 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lte "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12318 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lte "See the npm package") [Ⓣ][1] Checks if `value` is less than or equal to `other`. @@ -6086,7 +6086,7 @@ _.lte(3, 1);

_.toArray(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12345 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12345 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") [Ⓣ][1] Converts `value` to an array. @@ -6120,7 +6120,7 @@ _.toArray(null);

_.toFinite(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12384 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tofinite "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12384 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tofinite "See the npm package") [Ⓣ][1] Converts `value` to a finite number. @@ -6154,7 +6154,7 @@ _.toFinite('3.2');

_.toInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12422 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12422 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package") [Ⓣ][1] Converts `value` to an integer.
@@ -6192,7 +6192,7 @@ _.toInteger('3.2');

_.toLength(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12456 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolength "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12456 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolength "See the npm package") [Ⓣ][1] Converts `value` to an integer suitable for use as the length of an array-like object. @@ -6231,7 +6231,7 @@ _.toLength('3.2');

_.toNumber(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12483 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12483 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package") [Ⓣ][1] Converts `value` to a number. @@ -6265,7 +6265,7 @@ _.toNumber('3.2');

_.toPlainObject(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12528 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12528 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package") [Ⓣ][1] Converts `value` to a plain object flattening inherited enumerable string keyed properties of `value` to own properties of the plain object. @@ -6300,7 +6300,7 @@ _.assign({ 'a': 1 }, _.toPlainObject(new Foo));

_.toSafeInteger(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12556 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12556 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package") [Ⓣ][1] Converts `value` to a safe integer. A safe integer can be compared and represented correctly. @@ -6335,7 +6335,7 @@ _.toSafeInteger('3.2');

_.toString(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12583 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tostring "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12583 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tostring "See the npm package") [Ⓣ][1] Converts `value` to a string. An empty string is returned for `null` and `undefined` values. The sign of `-0` is preserved. @@ -6373,7 +6373,7 @@ _.toString([1, 2, 3]);

_.add(augend, addend)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16241 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16241 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") [Ⓣ][1] Adds two numbers. @@ -6399,7 +6399,7 @@ _.add(6, 4);

_.ceil(number, [precision=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16266 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16266 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package") [Ⓣ][1] Computes `number` rounded up to `precision`. @@ -6431,7 +6431,7 @@ _.ceil(6040, -2);

_.divide(dividend, divisor)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16283 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.divide "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16283 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.divide "See the npm package") [Ⓣ][1] Divide two numbers. @@ -6457,7 +6457,7 @@ _.divide(6, 4);

_.floor(number, [precision=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16308 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16308 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package") [Ⓣ][1] Computes `number` rounded down to `precision`. @@ -6489,7 +6489,7 @@ _.floor(4060, -2);

_.max(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16328 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16328 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package") [Ⓣ][1] Computes the maximum value of `array`. If `array` is empty or falsey, `undefined` is returned. @@ -6518,7 +6518,7 @@ _.max([]);

_.maxBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16357 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.maxby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16357 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.maxby "See the npm package") [Ⓣ][1] This method is like `_.max` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -6552,7 +6552,7 @@ _.maxBy(objects, 'n');

_.mean(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16377 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16377 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package") [Ⓣ][1] Computes the mean of the values in `array`. @@ -6577,7 +6577,7 @@ _.mean([4, 2, 8, 6]);

_.meanBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16404 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.meanby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16404 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.meanby "See the npm package") [Ⓣ][1] 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. @@ -6611,7 +6611,7 @@ _.meanBy(objects, 'n');

_.min(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16426 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16426 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package") [Ⓣ][1] Computes the minimum value of `array`. If `array` is empty or falsey, `undefined` is returned. @@ -6640,7 +6640,7 @@ _.min([]);

_.minBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16455 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.minby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16455 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.minby "See the npm package") [Ⓣ][1] This method is like `_.min` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -6674,7 +6674,7 @@ _.minBy(objects, 'n');

_.multiply(multiplier, multiplicand)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16476 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.multiply "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16476 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.multiply "See the npm package") [Ⓣ][1] Multiply two numbers. @@ -6700,7 +6700,7 @@ _.multiply(6, 4);

_.round(number, [precision=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16501 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16501 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package") [Ⓣ][1] Computes `number` rounded to `precision`. @@ -6732,7 +6732,7 @@ _.round(4060, -2);

_.subtract(minuend, subtrahend)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16518 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16518 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package") [Ⓣ][1] Subtract two numbers. @@ -6758,7 +6758,7 @@ _.subtract(6, 4);

_.sum(array)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16536 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16536 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") [Ⓣ][1] Computes the sum of the values in `array`. @@ -6783,7 +6783,7 @@ _.sum([4, 2, 8, 6]);

_.sumBy(array, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16565 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sumby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16565 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.sumby "See the npm package") [Ⓣ][1] 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. @@ -6823,7 +6823,7 @@ _.sumBy(objects, 'n');

_.clamp(number, [lower], upper)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14007 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14007 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package") [Ⓣ][1] Clamps `number` within the inclusive `lower` and `upper` bounds. @@ -6853,7 +6853,7 @@ _.clamp(10, -5, 5);

_.inRange(number, [start=0], end)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14061 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14061 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package") [Ⓣ][1] 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`. @@ -6901,7 +6901,7 @@ _.inRange(-3, -2, -6);

_.random([lower=0], [upper=1], [floating])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14104 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14104 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package") [Ⓣ][1] 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 @@ -6950,7 +6950,7 @@ _.random(1.2, 5.2);

_.assign(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12621 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12621 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package") [Ⓣ][1] Assigns own enumerable string keyed properties of source objects to the destination object. Source objects are applied from left to right. @@ -6993,7 +6993,7 @@ _.assign({ 'a': 0 }, new Foo, new Bar);

_.assignIn(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12664 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12664 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignin "See the npm package") [Ⓣ][1] This method is like `_.assign` except that it iterates over own and inherited source properties. @@ -7037,7 +7037,7 @@ _.assignIn({ 'a': 0 }, new Foo, new Bar);

_.assignInWith(object, sources, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12697 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assigninwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12697 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assigninwith "See the npm package") [Ⓣ][1] This method is like `_.assignIn` except that it accepts `customizer` which is invoked to produce the assigned values. If `customizer` returns @@ -7079,7 +7079,7 @@ defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });

_.assignWith(object, sources, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12729 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12729 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.assignwith "See the npm package") [Ⓣ][1] This method is like `_.assign` except that it accepts `customizer` which is invoked to produce the assigned values. If `customizer` returns @@ -7118,7 +7118,7 @@ defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });

_.at(object, [paths])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12750 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12750 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package") [Ⓣ][1] Creates an array of values corresponding to `paths` of `object`. @@ -7146,7 +7146,7 @@ _.at(object, ['a[0].b.c', 'a[1]']);

_.create(prototype, [properties])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12786 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12786 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package") [Ⓣ][1] Creates an object that inherits from the `prototype` object. If a `properties` object is given, its own enumerable string keyed properties @@ -7191,7 +7191,7 @@ circle instanceof Shape;

_.defaults(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12812 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12812 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package") [Ⓣ][1] Assigns own and inherited enumerable string keyed properties of source objects to the destination object for all destination properties that @@ -7223,7 +7223,7 @@ _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });

_.defaultsDeep(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12862 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12862 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package") [Ⓣ][1] This method is like `_.defaults` except that it recursively assigns default properties. @@ -7253,7 +7253,7 @@ _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });

_.findKey(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12902 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12902 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package") [Ⓣ][1] This method is like `_.find` except that it returns the key of the first element `predicate` returns truthy for instead of the element itself. @@ -7298,7 +7298,7 @@ _.findKey(users, 'active');

_.findLastKey(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12941 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12941 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package") [Ⓣ][1] This method is like `_.findKey` except that it iterates over elements of a collection in the opposite order. @@ -7343,7 +7343,7 @@ _.findLastKey(users, 'active');

_.forIn(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L12973 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L12973 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package") [Ⓣ][1] Iterates over own and inherited enumerable string keyed properties of an object and invokes `iteratee` for each property. The iteratee is invoked @@ -7381,7 +7381,7 @@ _.forIn(new Foo, function(value, key) {

_.forInRight(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13005 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13005 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package") [Ⓣ][1] This method is like `_.forIn` except that it iterates over properties of `object` in the opposite order. @@ -7417,7 +7417,7 @@ _.forInRight(new Foo, function(value, key) {

_.forOwn(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13039 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13039 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package") [Ⓣ][1] Iterates over own enumerable string keyed properties of an object and invokes `iteratee` for each property. The iteratee is invoked with three @@ -7455,7 +7455,7 @@ _.forOwn(new Foo, function(value, key) {

_.forOwnRight(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13069 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13069 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package") [Ⓣ][1] This method is like `_.forOwn` except that it iterates over properties of `object` in the opposite order. @@ -7491,7 +7491,7 @@ _.forOwnRight(new Foo, function(value, key) {

_.functions(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13096 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13096 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package") [Ⓣ][1] Creates an array of function property names from own enumerable properties of `object`. @@ -7524,7 +7524,7 @@ _.functions(new Foo);

_.functionsIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13123 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functionsin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13123 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.functionsin "See the npm package") [Ⓣ][1] Creates an array of function property names from own and inherited enumerable properties of `object`. @@ -7557,7 +7557,7 @@ _.functionsIn(new Foo);

_.get(object, path, [defaultValue])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13152 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13152 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package") [Ⓣ][1] Gets the value at `path` of `object`. If the resolved value is `undefined`, the `defaultValue` is returned in its place. @@ -7593,7 +7593,7 @@ _.get(object, 'a.b.c', 'default');

_.has(object, path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13184 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13184 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") [Ⓣ][1] Checks if `path` is a direct property of `object`. @@ -7631,7 +7631,7 @@ _.has(other, 'a');

_.hasIn(object, path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13214 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.hasin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13214 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.hasin "See the npm package") [Ⓣ][1] Checks if `path` is a direct or inherited property of `object`. @@ -7668,7 +7668,7 @@ _.hasIn(object, 'b');

_.invert(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13236 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13236 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package") [Ⓣ][1] Creates an object composed of the inverted keys and values of `object`. If `object` contains duplicate values, subsequent values overwrite @@ -7697,7 +7697,7 @@ _.invert(object);

_.invertBy(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13271 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invertby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13271 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invertby "See the npm package") [Ⓣ][1] This method is like `_.invert` except that the inverted object is generated from the results of running each element of `object` thru `iteratee`. The @@ -7734,7 +7734,7 @@ _.invertBy(object, function(value) {

_.invoke(object, path, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13302 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13302 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package") [Ⓣ][1] Invokes the method at `path` of `object`. @@ -7763,7 +7763,7 @@ _.invoke(object, 'a[0].b.c.slice', 1, 3);

_.keys(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13332 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13332 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package") [Ⓣ][1] Creates an array of the own enumerable property names of `object`.
@@ -7803,7 +7803,7 @@ _.keys('hi');

_.keysIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13359 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13359 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package") [Ⓣ][1] Creates an array of the own and inherited enumerable property names of `object`.
@@ -7838,7 +7838,7 @@ _.keysIn(new Foo);

_.mapKeys(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13384 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapkeys "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13384 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapkeys "See the npm package") [Ⓣ][1] The opposite of `_.mapValues`; this method creates an object with the same values as `object` and keys generated by running each own enumerable @@ -7869,7 +7869,7 @@ _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {

_.mapValues(object, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13422 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13422 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package") [Ⓣ][1] Creates an object with the same keys as `object` and values generated by running each own enumerable string keyed property of `object` thru @@ -7907,7 +7907,7 @@ _.mapValues(users, 'age');

_.merge(object, [sources])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13463 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13463 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package") [Ⓣ][1] This method is like `_.assign` except that it recursively merges own and inherited enumerable string keyed properties of source objects into the @@ -7950,7 +7950,7 @@ _.merge(object, other);

_.mergeWith(object, sources, customizer)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13498 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mergewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13498 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mergewith "See the npm package") [Ⓣ][1] This method is like `_.merge` except that it accepts `customizer` which is invoked to produce the merged values of the destination and source @@ -7993,7 +7993,7 @@ _.mergeWith(object, other, customizer);

_.omit(object, [paths])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13522 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13522 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package") [Ⓣ][1] The opposite of `_.pick`; this method creates an object composed of the own and inherited enumerable property paths of `object` that are not omitted. @@ -8025,7 +8025,7 @@ _.omit(object, ['a', 'c']);

_.omitBy(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13564 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omitby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13564 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.omitby "See the npm package") [Ⓣ][1] The opposite of `_.pickBy`; this method creates an object composed of the own and inherited enumerable string keyed properties of `object` that @@ -8056,7 +8056,7 @@ _.omitBy(object, _.isNumber);

_.pick(object, [paths])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13585 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13585 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package") [Ⓣ][1] Creates an object composed of the picked `object` properties. @@ -8084,7 +8084,7 @@ _.pick(object, ['a', 'c']);

_.pickBy(object, [predicate=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13607 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pickby "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13607 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pickby "See the npm package") [Ⓣ][1] Creates an object composed of the `object` properties `predicate` returns truthy for. The predicate is invoked with two arguments: *(value, key)*. @@ -8113,7 +8113,7 @@ _.pickBy(object, _.isNumber);

_.result(object, path, [defaultValue])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13649 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13649 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package") [Ⓣ][1] 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 @@ -8153,7 +8153,7 @@ _.result(object, 'a[0].b.c3', _.constant('default'));

_.set(object, path, value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13699 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13699 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package") [Ⓣ][1] 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 @@ -8193,7 +8193,7 @@ console.log(object.x[0].y.z);

_.setWith(object, path, value, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13727 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.setwith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13727 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.setwith "See the npm package") [Ⓣ][1] This method is like `_.set` except that it accepts `customizer` which is invoked to produce the objects of `path`. If `customizer` returns `undefined` @@ -8229,7 +8229,7 @@ _.setWith(object, '[0][1]', 'a', Object);

_.toPairs(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13756 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairs "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13756 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairs "See the npm package") [Ⓣ][1] Creates an array of own enumerable string keyed-value pairs for `object` which can be consumed by `_.fromPairs`. If `object` is a map or set, its @@ -8266,7 +8266,7 @@ _.toPairs(new Foo);

_.toPairsIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13782 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairsin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13782 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topairsin "See the npm package") [Ⓣ][1] Creates an array of own and inherited enumerable string keyed-value pairs for `object` which can be consumed by `_.fromPairs`. If `object` is a map @@ -8303,7 +8303,7 @@ _.toPairsIn(new Foo);

_.transform(object, [iteratee=_.identity], [accumulator])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13814 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13814 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package") [Ⓣ][1] An alternative to `_.reduce`; this method transforms `object` to a new `accumulator` object which is the result of running each of its own @@ -8344,7 +8344,7 @@ _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {

_.unset(object, path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13864 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13864 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package") [Ⓣ][1] Removes the property at `path` of `object`.
@@ -8383,7 +8383,7 @@ console.log(object);

_.update(object, path, updater)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13895 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.update "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13895 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.update "See the npm package") [Ⓣ][1] This method is like `_.set` except that accepts `updater` to produce the value to set. Use `_.updateWith` to customize `path` creation. The `updater` @@ -8422,7 +8422,7 @@ console.log(object.x[0].y.z);

_.updateWith(object, path, updater, [customizer])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13923 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.updatewith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13923 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.updatewith "See the npm package") [Ⓣ][1] This method is like `_.update` except that it accepts `customizer` which is invoked to produce the objects of `path`. If `customizer` returns `undefined` @@ -8458,7 +8458,7 @@ _.updateWith(object, '[0][1]', _.constant('a'), Object);

_.values(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13954 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13954 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package") [Ⓣ][1] Creates an array of the own enumerable string keyed property values of `object`.
@@ -8496,7 +8496,7 @@ _.values('hi');

_.valuesIn(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L13982 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L13982 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package") [Ⓣ][1] Creates an array of the own and inherited enumerable string keyed property values of `object`. @@ -8538,7 +8538,7 @@ _.valuesIn(new Foo);

_(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1648 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L1648 "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, @@ -8674,7 +8674,7 @@ _.isArray(squares.value());

_.chain(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8759 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8759 "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 @@ -8714,7 +8714,7 @@ var youngest = _

_.tap(value, interceptor)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8788 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8788 "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 @@ -8748,7 +8748,7 @@ _([1, 2, 3])

_.thru(value, interceptor)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8816 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8816 "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 @@ -8782,7 +8782,7 @@ _(' abc ')

_.prototype[Symbol.iterator]()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8971 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8971 "View in source") [Ⓣ][1] Enables the wrapper to be iterable. @@ -8809,7 +8809,7 @@ Array.from(wrapped);

_.prototype.at([paths])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8836 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8836 "View in source") [Ⓣ][1] This method is the wrapper version of `_.at`. @@ -8836,7 +8836,7 @@ _(object).at(['a[0].b.c', 'a[1]']).value();

_.prototype.chain()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8887 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8887 "View in source") [Ⓣ][1] Creates a `lodash` wrapper instance with explicit method chain sequences enabled. @@ -8872,7 +8872,7 @@ _(users)

_.prototype.commit()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8917 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8917 "View in source") [Ⓣ][1] Executes the chain sequence and returns the wrapped result. @@ -8907,7 +8907,7 @@ console.log(array);

_.prototype.next()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8943 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8943 "View in source") [Ⓣ][1] Gets the next value on a wrapped object following the [iterator protocol](https://mdn.io/iteration_protocols#iterator). @@ -8938,7 +8938,7 @@ wrapped.next();

_.prototype.plant(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L8999 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L8999 "View in source") [Ⓣ][1] Creates a clone of the chain sequence planting `value` as the wrapped value. @@ -8973,7 +8973,7 @@ wrapped.value();

_.prototype.reverse()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9039 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9039 "View in source") [Ⓣ][1] This method is the wrapper version of `_.reverse`.
@@ -9003,7 +9003,7 @@ console.log(array);

_.prototype.value()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L9071 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L9071 "View in source") [Ⓣ][1] Executes the chain sequence to resolve the unwrapped value. @@ -9034,7 +9034,7 @@ _([1, 2, 3]).value();

_.camelCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14165 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14165 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package") [Ⓣ][1] Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). @@ -9065,7 +9065,7 @@ _.camelCase('__FOO_BAR__');

_.capitalize([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14185 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14185 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package") [Ⓣ][1] Converts the first character of `string` to upper case and the remaining to lower case. @@ -9091,7 +9091,7 @@ _.capitalize('FRED');

_.deburr([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14207 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14207 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package") [Ⓣ][1] Deburrs `string` by converting [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) @@ -9120,7 +9120,7 @@ _.deburr('déjà vu');

_.endsWith([string=''], [target], [position=string.length])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14235 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14235 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") [Ⓣ][1] Checks if `string` ends with the given target string. @@ -9153,7 +9153,7 @@ _.endsWith('abc', 'b', 2);

_.escape([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14277 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14277 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package") [Ⓣ][1] Converts the characters "&", "<", ">", '"', and "'" in `string` to their corresponding HTML entities. @@ -9195,7 +9195,7 @@ _.escape('fred, barney, & pebbles');

_.escapeRegExp([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14299 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14299 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") [Ⓣ][1] Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. @@ -9221,7 +9221,7 @@ _.escapeRegExp('[lodash](https://lodash.com/)');

_.kebabCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14327 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14327 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package") [Ⓣ][1] Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). @@ -9253,7 +9253,7 @@ _.kebabCase('__FOO_BAR__');

_.lowerCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14351 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14351 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package") [Ⓣ][1] Converts `string`, as space separated words, to lower case. @@ -9284,7 +9284,7 @@ _.lowerCase('__FOO_BAR__');

_.lowerFirst([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14372 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14372 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") [Ⓣ][1] Converts the first character of `string` to lower case. @@ -9312,7 +9312,7 @@ _.lowerFirst('FRED');

_.pad([string=''], [length=0], [chars=' '])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14397 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14397 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package") [Ⓣ][1] 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`. @@ -9346,7 +9346,7 @@ _.pad('abc', 3);

_.padEnd([string=''], [length=0], [chars=' '])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14436 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padend "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14436 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padend "See the npm package") [Ⓣ][1] Pads `string` on the right side if it's shorter than `length`. Padding characters are truncated if they exceed `length`. @@ -9380,7 +9380,7 @@ _.padEnd('abc', 3);

_.padStart([string=''], [length=0], [chars=' '])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14469 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padstart "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14469 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.padstart "See the npm package") [Ⓣ][1] Pads `string` on the left side if it's shorter than `length`. Padding characters are truncated if they exceed `length`. @@ -9414,7 +9414,7 @@ _.padStart('abc', 3);

_.parseInt(string, [radix=10])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14503 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14503 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package") [Ⓣ][1] 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 @@ -9449,7 +9449,7 @@ _.map(['6', '08', '10'], _.parseInt);

_.repeat([string=''], [n=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14534 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14534 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") [Ⓣ][1] Repeats the given string `n` times. @@ -9481,7 +9481,7 @@ _.repeat('abc', 0);

_.replace([string=''], pattern, replacement)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14562 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14562 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package") [Ⓣ][1] Replaces matches for `pattern` in `string` with `replacement`.
@@ -9512,7 +9512,7 @@ _.replace('Hi Fred', 'Fred', 'Barney');

_.snakeCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14590 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14590 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package") [Ⓣ][1] Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case). @@ -9544,7 +9544,7 @@ _.snakeCase('--FOO-BAR--');

_.split([string=''], separator, [limit])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14613 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14613 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package") [Ⓣ][1] Splits `string` by `separator`.
@@ -9575,7 +9575,7 @@ _.split('a-b-c', '-', 2);

_.startCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14655 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14655 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package") [Ⓣ][1] Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). @@ -9607,7 +9607,7 @@ _.startCase('__FOO_BAR__');

_.startsWith([string=''], [target], [position=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14682 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14682 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") [Ⓣ][1] Checks if `string` starts with the given target string. @@ -9640,7 +9640,7 @@ _.startsWith('abc', 'b', 1);

_.template([string=''], [options={}])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14796 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14796 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package") [Ⓣ][1] Creates a compiled template function that can interpolate data properties in "interpolate" delimiters, HTML-escape interpolated data properties in @@ -9751,7 +9751,7 @@ fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\

_.toLower([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14928 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolower "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14928 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.tolower "See the npm package") [Ⓣ][1] Converts `string`, as a whole, to lower case just like [String#toLowerCase](https://mdn.io/toLowerCase). @@ -9783,7 +9783,7 @@ _.toLower('__FOO_BAR__');

_.toUpper([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14953 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toupper "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14953 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.toupper "See the npm package") [Ⓣ][1] Converts `string`, as a whole, to upper case just like [String#toUpperCase](https://mdn.io/toUpperCase). @@ -9815,7 +9815,7 @@ _.toUpper('__foo_bar__');

_.trim([string=''], [chars=whitespace])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L14979 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L14979 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package") [Ⓣ][1] Removes leading and trailing whitespace or specified characters from `string`. @@ -9847,7 +9847,7 @@ _.map([' foo ', ' bar '], _.trim);

_.trimEnd([string=''], [chars=whitespace])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15014 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15014 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package") [Ⓣ][1] Removes trailing whitespace or specified characters from `string`. @@ -9876,7 +9876,7 @@ _.trimEnd('-_-abc-_-', '_-');

_.trimStart([string=''], [chars=whitespace])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15047 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15047 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package") [Ⓣ][1] Removes leading whitespace or specified characters from `string`. @@ -9905,7 +9905,7 @@ _.trimStart('-_-abc-_-', '_-');

_.truncate([string=''], [options={}])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15098 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.truncate "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15098 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.truncate "See the npm package") [Ⓣ][1] Truncates `string` if it's longer than the given maximum string length. The last characters of the truncated string are replaced with the omission @@ -9953,7 +9953,7 @@ _.truncate('hi-diddly-ho there, neighborino', {

_.unescape([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15173 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15173 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package") [Ⓣ][1] The inverse of `_.escape`; this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to @@ -9984,7 +9984,7 @@ _.unescape('fred, barney, & pebbles');

_.upperCase([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15200 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15200 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package") [Ⓣ][1] Converts `string`, as space separated words, to upper case. @@ -10015,7 +10015,7 @@ _.upperCase('__foo_bar__');

_.upperFirst([string=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15221 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15221 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") [Ⓣ][1] Converts the first character of `string` to upper case. @@ -10043,7 +10043,7 @@ _.upperFirst('FRED');

_.words([string=''], [pattern])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15242 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15242 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") [Ⓣ][1] Splits `string` into an array of its words. @@ -10078,7 +10078,7 @@ _.words('fred, barney, & pebbles', /[^, ]+/g);

_.attempt(func, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15276 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15276 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package") [Ⓣ][1] Attempts to invoke `func`, returning either the result or the caught error object. Any additional arguments are provided to `func` when it's invoked. @@ -10111,7 +10111,7 @@ if (_.isError(elements)) {

_.bindAll(object, methodNames)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15310 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15310 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package") [Ⓣ][1] Binds methods of an object to the object itself, overwriting the existing method. @@ -10149,7 +10149,7 @@ jQuery(element).on('click', view.click);

_.cond(pairs)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15347 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.cond "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15347 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.cond "See the npm package") [Ⓣ][1] Creates a function that iterates over `pairs` and invokes the corresponding function of the first predicate to return truthy. The predicate-function @@ -10189,7 +10189,7 @@ func({ 'a': '1', 'b': '2' });

_.conforms(source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15393 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conforms "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15393 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.conforms "See the npm package") [Ⓣ][1] Creates a function that invokes the predicate properties of `source` with the corresponding property values of a given object, returning `true` if @@ -10225,7 +10225,7 @@ _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));

_.constant(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15416 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15416 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") [Ⓣ][1] Creates a function that returns `value`. @@ -10255,7 +10255,7 @@ console.log(objects[0] === objects[1]);

_.defaultTo(value, defaultValue)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15442 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultto "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15442 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.defaultto "See the npm package") [Ⓣ][1] Checks `value` to determine whether a default value should be returned in its place. The `defaultValue` is returned if `value` is `NaN`, `null`, @@ -10286,7 +10286,7 @@ _.defaultTo(undefined, 10);

_.flow([funcs])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15468 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15468 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package") [Ⓣ][1] Creates a function that returns the result of invoking the given functions with the `this` binding of the created function, where each successive @@ -10318,7 +10318,7 @@ addSquare(1, 2);

_.flowRight([funcs])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15491 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15491 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package") [Ⓣ][1] This method is like `_.flow` except that it creates a function that invokes the given functions from right to left. @@ -10349,7 +10349,7 @@ addSquare(1, 2);

_.identity(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15509 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15509 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") [Ⓣ][1] This method returns the first argument it receives. @@ -10376,7 +10376,7 @@ console.log(_.identity(object) === object);

_.iteratee([func=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15555 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iteratee "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15555 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.iteratee "See the npm package") [Ⓣ][1] Creates a function that invokes `func` with the arguments of the created function. If `func` is a property name, the created function returns the @@ -10429,7 +10429,7 @@ _.filter(['abc', 'def'], /ef/);

_.matches(source)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15594 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15594 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package") [Ⓣ][1] Creates a function that performs a partial deep comparison between a given object and `source`, returning `true` if the given object has equivalent @@ -10478,7 +10478,7 @@ _.filter(users, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));

_.matchesProperty(path, srcValue)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15631 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15631 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") [Ⓣ][1] Creates a function that performs a partial deep comparison between the value at `path` of a given object to `srcValue`, returning `true` if the @@ -10524,7 +10524,7 @@ _.filter(users, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)

_.method(path, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15659 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15659 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package") [Ⓣ][1] Creates a function that invokes the method at `path` of a given object. Any additional arguments are provided to the invoked method. @@ -10559,7 +10559,7 @@ _.map(objects, _.method(['a', 'b']));

_.methodOf(object, [args])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15688 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15688 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package") [Ⓣ][1] The opposite of `_.method`; this method creates a function that invokes the method at a given path of `object`. Any additional arguments are @@ -10593,7 +10593,7 @@ _.map([['a', '2'], ['c', '0']], _.methodOf(object));

_.mixin([object=lodash], source, [options={}])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15730 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15730 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package") [Ⓣ][1] Adds all own enumerable string keyed function properties of a source object to the destination object. If `object` is a function, then methods @@ -10641,7 +10641,7 @@ _('fred').vowels();

_.noConflict()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15779 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15779 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package") [Ⓣ][1] Reverts the `_` variable to its previous value and returns a reference to the `lodash` function. @@ -10663,7 +10663,7 @@ var lodash = _.noConflict();

_.noop()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15798 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15798 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package") [Ⓣ][1] This method returns `undefined`. @@ -10682,7 +10682,7 @@ _.times(2, _.noop);

_.nthArg([n=0])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15822 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15822 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package") [Ⓣ][1] Creates a function that gets the argument at index `n`. If `n` is negative, the nth argument from the end is returned. @@ -10713,7 +10713,7 @@ func('a', 'b', 'c', 'd');

_.over([iteratees=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15847 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15847 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package") [Ⓣ][1] Creates a function that invokes `iteratees` with the arguments it receives and returns their results. @@ -10741,7 +10741,7 @@ func(1, 2, 3, 4);

_.overEvery([predicates=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15877 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overevery "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15877 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.overevery "See the npm package") [Ⓣ][1] Creates a function that checks if **all** of the `predicates` return truthy when invoked with the arguments it receives. @@ -10780,7 +10780,7 @@ func(NaN);

_.overSome([predicates=[_.identity]])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15910 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.oversome "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15910 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.oversome "See the npm package") [Ⓣ][1] Creates a function that checks if **any** of the `predicates` return truthy when invoked with the arguments it receives. @@ -10822,7 +10822,7 @@ var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])

_.property(path)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15934 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15934 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package") [Ⓣ][1] Creates a function that returns the value at `path` of a given object. @@ -10855,7 +10855,7 @@ _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');

_.propertyOf(object)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L15959 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L15959 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package") [Ⓣ][1] The opposite of `_.property`; this method creates a function that returns the value at a given path of `object`. @@ -10887,7 +10887,7 @@ _.map([['a', '2'], ['c', '0']], _.propertyOf(object));

_.range([start=0], end, [step=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16006 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16006 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package") [Ⓣ][1] 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 @@ -10939,7 +10939,7 @@ _.range(0);

_.rangeRight([start=0], end, [step=1])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16044 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rangeright "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16044 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.rangeright "See the npm package") [Ⓣ][1] This method is like `_.range` except that it populates values in descending order. @@ -10985,7 +10985,7 @@ _.rangeRight(0);

_.runInContext([context=root])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1406 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L1406 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package") [Ⓣ][1] Create a new pristine `lodash` function using the `context` object. @@ -11025,7 +11025,7 @@ var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;

_.stubArray()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16064 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubarray "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16064 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubarray "See the npm package") [Ⓣ][1] This method returns a new empty array. @@ -11052,7 +11052,7 @@ console.log(arrays[0] === arrays[1]);

_.stubFalse()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16081 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubfalse "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16081 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubfalse "See the npm package") [Ⓣ][1] This method returns `false`. @@ -11074,7 +11074,7 @@ _.times(2, _.stubFalse);

_.stubObject()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16103 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubobject "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16103 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubobject "See the npm package") [Ⓣ][1] This method returns a new empty object. @@ -11101,7 +11101,7 @@ console.log(objects[0] === objects[1]);

_.stubString()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16120 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubstring "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16120 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubstring "See the npm package") [Ⓣ][1] This method returns an empty string. @@ -11123,7 +11123,7 @@ _.times(2, _.stubString);

_.stubTrue()

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16137 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubtrue "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16137 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.stubtrue "See the npm package") [Ⓣ][1] This method returns `true`. @@ -11145,7 +11145,7 @@ _.times(2, _.stubTrue);

_.times(n, [iteratee=_.identity])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16160 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16160 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package") [Ⓣ][1] Invokes the iteratee `n` times, returning an array of the results of each invocation. The iteratee is invoked with one argument; *(index)*. @@ -11175,7 +11175,7 @@ _.times(3, String);

_.toPath(value)

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16195 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16195 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package") [Ⓣ][1] Converts `value` to a property path array. @@ -11203,7 +11203,7 @@ _.toPath('a[0].b.c');

_.uniqueId([prefix=''])

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16219 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16219 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package") [Ⓣ][1] Generates a unique ID. If `prefix` is given, the ID is appended to it. @@ -11237,7 +11237,7 @@ _.uniqueId();

_.VERSION

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L16910 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L16910 "View in source") [Ⓣ][1] (string): The semantic version number. @@ -11248,7 +11248,7 @@ _.uniqueId();

_.templateSettings

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1717 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L1717 "View in source") [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package") [Ⓣ][1] (Object): By default, the template delimiters used by lodash are like those in embedded Ruby *(ERB)* as well as ES2015 template strings. Change the @@ -11261,7 +11261,7 @@ following template settings to use alternative delimiters.

_.templateSettings.escape

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1725 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L1725 "View in source") [Ⓣ][1] (RegExp): Used to detect `data` property values to be HTML-escaped. @@ -11272,7 +11272,7 @@ following template settings to use alternative delimiters.

_.templateSettings.evaluate

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1733 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L1733 "View in source") [Ⓣ][1] (RegExp): Used to detect code to be evaluated. @@ -11283,7 +11283,7 @@ following template settings to use alternative delimiters.

_.templateSettings.imports

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1757 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L1757 "View in source") [Ⓣ][1] (Object): Used to import variables into the compiled template. @@ -11294,7 +11294,7 @@ following template settings to use alternative delimiters.

_.templateSettings.interpolate

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1741 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L1741 "View in source") [Ⓣ][1] (RegExp): Used to detect `data` property values to inject. @@ -11305,7 +11305,7 @@ following template settings to use alternative delimiters.

_.templateSettings.variable

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1749 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L1749 "View in source") [Ⓣ][1] (string): Used to reference the data object in the template text. @@ -11322,7 +11322,7 @@ following template settings to use alternative delimiters.

_.templateSettings.imports._

-[Ⓢ](https://github.com/lodash/lodash/blob/4.17.17/lodash.js#L1765 "View in source") [Ⓣ][1] +[Ⓢ](https://github.com/lodash/lodash/blob/4.17.18/lodash.js#L1765 "View in source") [Ⓣ][1] A reference to the `lodash` function. diff --git a/lodash.js b/lodash.js index 732812be00..0a965c8fca 100644 --- a/lodash.js +++ b/lodash.js @@ -12,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.17'; + var VERSION = '4.17.18'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; diff --git a/package-lock.json b/package-lock.json index 739623f6d0..ef0144f399 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "4.17.17", + "version": "4.17.18", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index e7f26a9d52..6dcb8be7b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "4.17.17", + "version": "4.17.18", "license": "MIT", "private": true, "main": "lodash.js", From 2e1c0f22f425e9c013815b2cd7c2ebd51f49a8d6 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Wed, 8 Jul 2020 19:10:23 +0200 Subject: [PATCH 12/22] Add npm-package --- npm-package/README.md | 39 + npm-package/_DataView.js | 7 + npm-package/_Hash.js | 32 + npm-package/_LazyWrapper.js | 28 + npm-package/_ListCache.js | 32 + npm-package/_LodashWrapper.js | 22 + npm-package/_Map.js | 7 + npm-package/_MapCache.js | 32 + npm-package/_Promise.js | 7 + npm-package/_Set.js | 7 + npm-package/_SetCache.js | 27 + npm-package/_Stack.js | 27 + npm-package/_Symbol.js | 6 + npm-package/_Uint8Array.js | 6 + npm-package/_WeakMap.js | 7 + npm-package/_apply.js | 21 + npm-package/_arrayAggregator.js | 22 + npm-package/_arrayEach.js | 22 + npm-package/_arrayEachRight.js | 21 + npm-package/_arrayEvery.js | 23 + npm-package/_arrayFilter.js | 25 + npm-package/_arrayIncludes.js | 17 + npm-package/_arrayIncludesWith.js | 22 + npm-package/_arrayLikeKeys.js | 49 + npm-package/_arrayMap.js | 21 + npm-package/_arrayPush.js | 20 + npm-package/_arrayReduce.js | 26 + npm-package/_arrayReduceRight.js | 24 + npm-package/_arraySample.js | 15 + npm-package/_arraySampleSize.js | 17 + npm-package/_arrayShuffle.js | 15 + npm-package/_arraySome.js | 23 + npm-package/_asciiSize.js | 12 + npm-package/_asciiToArray.js | 12 + npm-package/_asciiWords.js | 15 + npm-package/_assignMergeValue.js | 20 + npm-package/_assignValue.js | 28 + npm-package/_assocIndexOf.js | 21 + npm-package/_baseAggregator.js | 21 + npm-package/_baseAssign.js | 17 + npm-package/_baseAssignIn.js | 17 + npm-package/_baseAssignValue.js | 25 + npm-package/_baseAt.js | 23 + npm-package/_baseClamp.js | 22 + npm-package/_baseClone.js | 165 + npm-package/_baseConforms.js | 18 + npm-package/_baseConformsTo.js | 27 + npm-package/_baseCreate.js | 30 + npm-package/_baseDelay.js | 21 + npm-package/_baseDifference.js | 67 + npm-package/_baseEach.js | 14 + npm-package/_baseEachRight.js | 14 + npm-package/_baseEvery.js | 21 + npm-package/_baseExtremum.js | 32 + npm-package/_baseFill.js | 32 + npm-package/_baseFilter.js | 21 + npm-package/_baseFindIndex.js | 24 + npm-package/_baseFindKey.js | 23 + npm-package/_baseFlatten.js | 38 + npm-package/_baseFor.js | 16 + npm-package/_baseForOwn.js | 16 + npm-package/_baseForOwnRight.js | 16 + npm-package/_baseForRight.js | 15 + npm-package/_baseFunctions.js | 19 + npm-package/_baseGet.js | 24 + npm-package/_baseGetAllKeys.js | 20 + npm-package/_baseGetTag.js | 28 + npm-package/_baseGt.js | 14 + npm-package/_baseHas.js | 19 + npm-package/_baseHasIn.js | 13 + npm-package/_baseInRange.js | 18 + npm-package/_baseIndexOf.js | 20 + npm-package/_baseIndexOfWith.js | 23 + npm-package/_baseIntersection.js | 74 + npm-package/_baseInverter.js | 21 + npm-package/_baseInvoke.js | 24 + npm-package/_baseIsArguments.js | 18 + npm-package/_baseIsArrayBuffer.js | 17 + npm-package/_baseIsDate.js | 18 + npm-package/_baseIsEqual.js | 28 + npm-package/_baseIsEqualDeep.js | 83 + npm-package/_baseIsMap.js | 18 + npm-package/_baseIsMatch.js | 62 + npm-package/_baseIsNaN.js | 12 + npm-package/_baseIsNative.js | 47 + npm-package/_baseIsRegExp.js | 18 + npm-package/_baseIsSet.js | 18 + npm-package/_baseIsTypedArray.js | 60 + npm-package/_baseIteratee.js | 31 + npm-package/_baseKeys.js | 30 + npm-package/_baseKeysIn.js | 33 + npm-package/_baseLodash.js | 10 + npm-package/_baseLt.js | 14 + npm-package/_baseMap.js | 22 + npm-package/_baseMatches.js | 22 + npm-package/_baseMatchesProperty.js | 33 + npm-package/_baseMean.js | 20 + npm-package/_baseMerge.js | 42 + npm-package/_baseMergeDeep.js | 94 + npm-package/_baseNth.js | 20 + npm-package/_baseOrderBy.js | 34 + npm-package/_basePick.js | 19 + npm-package/_basePickBy.js | 30 + npm-package/_baseProperty.js | 14 + npm-package/_basePropertyDeep.js | 16 + npm-package/_basePropertyOf.js | 14 + npm-package/_basePullAll.js | 51 + npm-package/_basePullAt.js | 37 + npm-package/_baseRandom.js | 18 + npm-package/_baseRange.js | 28 + npm-package/_baseReduce.js | 23 + npm-package/_baseRepeat.js | 35 + npm-package/_baseRest.js | 17 + npm-package/_baseSample.js | 15 + npm-package/_baseSampleSize.js | 18 + npm-package/_baseSet.js | 47 + npm-package/_baseSetData.js | 17 + npm-package/_baseSetToString.js | 22 + npm-package/_baseShuffle.js | 15 + npm-package/_baseSlice.js | 31 + npm-package/_baseSome.js | 22 + npm-package/_baseSortBy.js | 21 + npm-package/_baseSortedIndex.js | 42 + npm-package/_baseSortedIndexBy.js | 64 + npm-package/_baseSortedUniq.js | 30 + npm-package/_baseSum.js | 24 + npm-package/_baseTimes.js | 20 + npm-package/_baseToNumber.js | 24 + npm-package/_baseToPairs.js | 18 + npm-package/_baseToString.js | 37 + npm-package/_baseUnary.js | 14 + npm-package/_baseUniq.js | 72 + npm-package/_baseUnset.js | 20 + npm-package/_baseUpdate.js | 18 + npm-package/_baseValues.js | 19 + npm-package/_baseWhile.js | 26 + npm-package/_baseWrapperValue.js | 25 + npm-package/_baseXor.js | 36 + npm-package/_baseZipObject.js | 23 + npm-package/_cacheHas.js | 13 + npm-package/_castArrayLikeObject.js | 14 + npm-package/_castFunction.js | 14 + npm-package/_castPath.js | 21 + npm-package/_castRest.js | 14 + npm-package/_castSlice.js | 18 + npm-package/_charsEndIndex.js | 19 + npm-package/_charsStartIndex.js | 20 + npm-package/_cloneArrayBuffer.js | 16 + npm-package/_cloneBuffer.js | 35 + npm-package/_cloneDataView.js | 16 + npm-package/_cloneRegExp.js | 17 + npm-package/_cloneSymbol.js | 18 + npm-package/_cloneTypedArray.js | 16 + npm-package/_compareAscending.js | 41 + npm-package/_compareMultiple.js | 44 + npm-package/_composeArgs.js | 39 + npm-package/_composeArgsRight.js | 41 + npm-package/_copyArray.js | 20 + npm-package/_copyObject.js | 40 + npm-package/_copySymbols.js | 16 + npm-package/_copySymbolsIn.js | 16 + npm-package/_coreJsData.js | 6 + npm-package/_countHolders.js | 21 + npm-package/_createAggregator.js | 23 + npm-package/_createAssigner.js | 37 + npm-package/_createBaseEach.js | 32 + npm-package/_createBaseFor.js | 25 + npm-package/_createBind.js | 28 + npm-package/_createCaseFirst.js | 33 + npm-package/_createCompounder.js | 24 + npm-package/_createCtor.js | 37 + npm-package/_createCurry.js | 46 + npm-package/_createFind.js | 25 + npm-package/_createFlow.js | 78 + npm-package/_createHybrid.js | 92 + npm-package/_createInverter.js | 17 + npm-package/_createMathOperation.js | 38 + npm-package/_createOver.js | 27 + npm-package/_createPadding.js | 33 + npm-package/_createPartial.js | 43 + npm-package/_createRange.js | 30 + npm-package/_createRecurry.js | 56 + npm-package/_createRelationalOperation.js | 20 + npm-package/_createRound.js | 35 + npm-package/_createSet.js | 19 + npm-package/_createToPairs.js | 30 + npm-package/_createWrap.js | 106 + npm-package/_customDefaultsAssignIn.js | 29 + npm-package/_customDefaultsMerge.js | 28 + npm-package/_customOmitClone.js | 16 + npm-package/_deburrLetter.js | 71 + npm-package/_defineProperty.js | 11 + npm-package/_equalArrays.js | 83 + npm-package/_equalByTag.js | 112 + npm-package/_equalObjects.js | 89 + npm-package/_escapeHtmlChar.js | 21 + npm-package/_escapeStringChar.js | 22 + npm-package/_flatRest.js | 16 + npm-package/_freeGlobal.js | 4 + npm-package/_getAllKeys.js | 16 + npm-package/_getAllKeysIn.js | 17 + npm-package/_getData.js | 15 + npm-package/_getFuncName.js | 31 + npm-package/_getHolder.js | 13 + npm-package/_getMapData.js | 18 + npm-package/_getMatchData.js | 24 + npm-package/_getNative.js | 17 + npm-package/_getPrototype.js | 6 + npm-package/_getRawTag.js | 46 + npm-package/_getSymbols.js | 30 + npm-package/_getSymbolsIn.js | 25 + npm-package/_getTag.js | 58 + npm-package/_getValue.js | 13 + npm-package/_getView.js | 33 + npm-package/_getWrapDetails.js | 17 + npm-package/_hasPath.js | 39 + npm-package/_hasUnicode.js | 26 + npm-package/_hasUnicodeWord.js | 15 + npm-package/_hashClear.js | 15 + npm-package/_hashDelete.js | 17 + npm-package/_hashGet.js | 30 + npm-package/_hashHas.js | 23 + npm-package/_hashSet.js | 23 + npm-package/_initCloneArray.js | 26 + npm-package/_initCloneByTag.js | 77 + npm-package/_initCloneObject.js | 18 + npm-package/_insertWrapDetails.js | 23 + npm-package/_isFlattenable.js | 20 + npm-package/_isIndex.js | 25 + npm-package/_isIterateeCall.js | 30 + npm-package/_isKey.js | 29 + npm-package/_isKeyable.js | 15 + npm-package/_isLaziable.js | 28 + npm-package/_isMaskable.js | 14 + npm-package/_isMasked.js | 20 + npm-package/_isPrototype.js | 18 + npm-package/_isStrictComparable.js | 15 + npm-package/_iteratorToArray.js | 18 + npm-package/_lazyClone.js | 23 + npm-package/_lazyReverse.js | 23 + npm-package/_lazyValue.js | 69 + npm-package/_listCacheClear.js | 13 + npm-package/_listCacheDelete.js | 35 + npm-package/_listCacheGet.js | 19 + npm-package/_listCacheHas.js | 16 + npm-package/_listCacheSet.js | 26 + npm-package/_mapCacheClear.js | 21 + npm-package/_mapCacheDelete.js | 18 + npm-package/_mapCacheGet.js | 16 + npm-package/_mapCacheHas.js | 16 + npm-package/_mapCacheSet.js | 22 + npm-package/_mapToArray.js | 18 + npm-package/_matchesStrictComparable.js | 20 + npm-package/_memoizeCapped.js | 26 + npm-package/_mergeData.js | 90 + npm-package/_metaMap.js | 6 + npm-package/_nativeCreate.js | 6 + npm-package/_nativeKeys.js | 6 + npm-package/_nativeKeysIn.js | 20 + npm-package/_nodeUtil.js | 30 + npm-package/_objectToString.js | 22 + npm-package/_overArg.js | 15 + npm-package/_overRest.js | 36 + npm-package/_parent.js | 16 + npm-package/_reEscape.js | 4 + npm-package/_reEvaluate.js | 4 + npm-package/_reInterpolate.js | 4 + npm-package/_realNames.js | 4 + npm-package/_reorder.js | 29 + npm-package/_replaceHolders.js | 29 + npm-package/_root.js | 9 + npm-package/_safeGet.js | 21 + npm-package/_setCacheAdd.js | 19 + npm-package/_setCacheHas.js | 14 + npm-package/_setData.js | 20 + npm-package/_setToArray.js | 18 + npm-package/_setToPairs.js | 18 + npm-package/_setToString.js | 14 + npm-package/_setWrapToString.js | 21 + npm-package/_shortOut.js | 37 + npm-package/_shuffleSelf.js | 28 + npm-package/_stackClear.js | 15 + npm-package/_stackDelete.js | 18 + npm-package/_stackGet.js | 14 + npm-package/_stackHas.js | 14 + npm-package/_stackSet.js | 34 + npm-package/_strictIndexOf.js | 23 + npm-package/_strictLastIndexOf.js | 21 + npm-package/_stringSize.js | 18 + npm-package/_stringToArray.js | 18 + npm-package/_stringToPath.js | 27 + npm-package/_toKey.js | 21 + npm-package/_toSource.js | 26 + npm-package/_unescapeHtmlChar.js | 21 + npm-package/_unicodeSize.js | 44 + npm-package/_unicodeToArray.js | 40 + npm-package/_unicodeWords.js | 69 + npm-package/_updateWrapDetails.js | 46 + npm-package/_wrapperClone.js | 23 + npm-package/add.js | 22 + npm-package/after.js | 42 + npm-package/array.js | 67 + npm-package/ary.js | 29 + npm-package/assign.js | 58 + npm-package/assignIn.js | 40 + npm-package/assignInWith.js | 38 + npm-package/assignWith.js | 37 + npm-package/at.js | 23 + npm-package/attempt.js | 35 + npm-package/before.js | 40 + npm-package/bind.js | 57 + npm-package/bindAll.js | 41 + npm-package/bindKey.js | 68 + npm-package/camelCase.js | 29 + npm-package/capitalize.js | 23 + npm-package/castArray.js | 44 + npm-package/ceil.js | 26 + npm-package/chain.js | 38 + npm-package/chunk.js | 50 + npm-package/clamp.js | 39 + npm-package/clone.js | 36 + npm-package/cloneDeep.js | 29 + npm-package/cloneDeepWith.js | 40 + npm-package/cloneWith.js | 42 + npm-package/collection.js | 30 + npm-package/commit.js | 33 + npm-package/compact.js | 31 + npm-package/concat.js | 43 + npm-package/cond.js | 60 + npm-package/conforms.js | 35 + npm-package/conformsTo.js | 32 + npm-package/constant.js | 26 + npm-package/countBy.js | 40 + npm-package/create.js | 43 + npm-package/curry.js | 57 + npm-package/curryRight.js | 54 + npm-package/date.js | 3 + npm-package/debounce.js | 191 + npm-package/deburr.js | 45 + npm-package/defaultTo.js | 25 + npm-package/defaults.js | 64 + npm-package/defaultsDeep.js | 30 + npm-package/defer.js | 26 + npm-package/delay.js | 28 + npm-package/difference.js | 33 + npm-package/differenceBy.js | 44 + npm-package/differenceWith.js | 40 + npm-package/divide.js | 22 + npm-package/drop.js | 38 + npm-package/dropRight.js | 39 + npm-package/dropRightWhile.js | 45 + npm-package/dropWhile.js | 45 + npm-package/each.js | 1 + npm-package/eachRight.js | 1 + npm-package/endsWith.js | 43 + npm-package/entries.js | 1 + npm-package/entriesIn.js | 1 + npm-package/eq.js | 37 + npm-package/escape.js | 43 + npm-package/escapeRegExp.js | 32 + npm-package/every.js | 56 + npm-package/extend.js | 1 + npm-package/extendWith.js | 1 + npm-package/fill.js | 45 + npm-package/filter.js | 48 + npm-package/find.js | 42 + npm-package/findIndex.js | 55 + npm-package/findKey.js | 44 + npm-package/findLast.js | 25 + npm-package/findLastIndex.js | 59 + npm-package/findLastKey.js | 44 + npm-package/first.js | 1 + npm-package/flatMap.js | 29 + npm-package/flatMapDeep.js | 31 + npm-package/flatMapDepth.js | 31 + npm-package/flatten.js | 22 + npm-package/flattenDeep.js | 25 + npm-package/flattenDepth.js | 33 + npm-package/flip.js | 28 + npm-package/floor.js | 26 + npm-package/flow.js | 27 + npm-package/flowRight.js | 26 + npm-package/forEach.js | 41 + npm-package/forEachRight.js | 31 + npm-package/forIn.js | 39 + npm-package/forInRight.js | 37 + npm-package/forOwn.js | 36 + npm-package/forOwnRight.js | 34 + npm-package/fp.js | 2 + npm-package/fp/F.js | 1 + npm-package/fp/T.js | 1 + npm-package/fp/__.js | 1 + npm-package/fp/_baseConvert.js | 569 + npm-package/fp/_convertBrowser.js | 18 + npm-package/fp/_falseOptions.js | 7 + npm-package/fp/_mapping.js | 358 + npm-package/fp/_util.js | 16 + npm-package/fp/add.js | 5 + npm-package/fp/after.js | 5 + npm-package/fp/all.js | 1 + npm-package/fp/allPass.js | 1 + npm-package/fp/always.js | 1 + npm-package/fp/any.js | 1 + npm-package/fp/anyPass.js | 1 + npm-package/fp/apply.js | 1 + npm-package/fp/array.js | 2 + npm-package/fp/ary.js | 5 + npm-package/fp/assign.js | 5 + npm-package/fp/assignAll.js | 5 + npm-package/fp/assignAllWith.js | 5 + npm-package/fp/assignIn.js | 5 + npm-package/fp/assignInAll.js | 5 + npm-package/fp/assignInAllWith.js | 5 + npm-package/fp/assignInWith.js | 5 + npm-package/fp/assignWith.js | 5 + npm-package/fp/assoc.js | 1 + npm-package/fp/assocPath.js | 1 + npm-package/fp/at.js | 5 + npm-package/fp/attempt.js | 5 + npm-package/fp/before.js | 5 + npm-package/fp/bind.js | 5 + npm-package/fp/bindAll.js | 5 + npm-package/fp/bindKey.js | 5 + npm-package/fp/camelCase.js | 5 + npm-package/fp/capitalize.js | 5 + npm-package/fp/castArray.js | 5 + npm-package/fp/ceil.js | 5 + npm-package/fp/chain.js | 5 + npm-package/fp/chunk.js | 5 + npm-package/fp/clamp.js | 5 + npm-package/fp/clone.js | 5 + npm-package/fp/cloneDeep.js | 5 + npm-package/fp/cloneDeepWith.js | 5 + npm-package/fp/cloneWith.js | 5 + npm-package/fp/collection.js | 2 + npm-package/fp/commit.js | 5 + npm-package/fp/compact.js | 5 + npm-package/fp/complement.js | 1 + npm-package/fp/compose.js | 1 + npm-package/fp/concat.js | 5 + npm-package/fp/cond.js | 5 + npm-package/fp/conforms.js | 1 + npm-package/fp/conformsTo.js | 5 + npm-package/fp/constant.js | 5 + npm-package/fp/contains.js | 1 + npm-package/fp/convert.js | 18 + npm-package/fp/countBy.js | 5 + npm-package/fp/create.js | 5 + npm-package/fp/curry.js | 5 + npm-package/fp/curryN.js | 5 + npm-package/fp/curryRight.js | 5 + npm-package/fp/curryRightN.js | 5 + npm-package/fp/date.js | 2 + npm-package/fp/debounce.js | 5 + npm-package/fp/deburr.js | 5 + npm-package/fp/defaultTo.js | 5 + npm-package/fp/defaults.js | 5 + npm-package/fp/defaultsAll.js | 5 + npm-package/fp/defaultsDeep.js | 5 + npm-package/fp/defaultsDeepAll.js | 5 + npm-package/fp/defer.js | 5 + npm-package/fp/delay.js | 5 + npm-package/fp/difference.js | 5 + npm-package/fp/differenceBy.js | 5 + npm-package/fp/differenceWith.js | 5 + npm-package/fp/dissoc.js | 1 + npm-package/fp/dissocPath.js | 1 + npm-package/fp/divide.js | 5 + npm-package/fp/drop.js | 5 + npm-package/fp/dropLast.js | 1 + npm-package/fp/dropLastWhile.js | 1 + npm-package/fp/dropRight.js | 5 + npm-package/fp/dropRightWhile.js | 5 + npm-package/fp/dropWhile.js | 5 + npm-package/fp/each.js | 1 + npm-package/fp/eachRight.js | 1 + npm-package/fp/endsWith.js | 5 + npm-package/fp/entries.js | 1 + npm-package/fp/entriesIn.js | 1 + npm-package/fp/eq.js | 5 + npm-package/fp/equals.js | 1 + npm-package/fp/escape.js | 5 + npm-package/fp/escapeRegExp.js | 5 + npm-package/fp/every.js | 5 + npm-package/fp/extend.js | 1 + npm-package/fp/extendAll.js | 1 + npm-package/fp/extendAllWith.js | 1 + npm-package/fp/extendWith.js | 1 + npm-package/fp/fill.js | 5 + npm-package/fp/filter.js | 5 + npm-package/fp/find.js | 5 + npm-package/fp/findFrom.js | 5 + npm-package/fp/findIndex.js | 5 + npm-package/fp/findIndexFrom.js | 5 + npm-package/fp/findKey.js | 5 + npm-package/fp/findLast.js | 5 + npm-package/fp/findLastFrom.js | 5 + npm-package/fp/findLastIndex.js | 5 + npm-package/fp/findLastIndexFrom.js | 5 + npm-package/fp/findLastKey.js | 5 + npm-package/fp/first.js | 1 + npm-package/fp/flatMap.js | 5 + npm-package/fp/flatMapDeep.js | 5 + npm-package/fp/flatMapDepth.js | 5 + npm-package/fp/flatten.js | 5 + npm-package/fp/flattenDeep.js | 5 + npm-package/fp/flattenDepth.js | 5 + npm-package/fp/flip.js | 5 + npm-package/fp/floor.js | 5 + npm-package/fp/flow.js | 5 + npm-package/fp/flowRight.js | 5 + npm-package/fp/forEach.js | 5 + npm-package/fp/forEachRight.js | 5 + npm-package/fp/forIn.js | 5 + npm-package/fp/forInRight.js | 5 + npm-package/fp/forOwn.js | 5 + npm-package/fp/forOwnRight.js | 5 + npm-package/fp/fromPairs.js | 5 + npm-package/fp/function.js | 2 + npm-package/fp/functions.js | 5 + npm-package/fp/functionsIn.js | 5 + npm-package/fp/get.js | 5 + npm-package/fp/getOr.js | 5 + npm-package/fp/groupBy.js | 5 + npm-package/fp/gt.js | 5 + npm-package/fp/gte.js | 5 + npm-package/fp/has.js | 5 + npm-package/fp/hasIn.js | 5 + npm-package/fp/head.js | 5 + npm-package/fp/identical.js | 1 + npm-package/fp/identity.js | 5 + npm-package/fp/inRange.js | 5 + npm-package/fp/includes.js | 5 + npm-package/fp/includesFrom.js | 5 + npm-package/fp/indexBy.js | 1 + npm-package/fp/indexOf.js | 5 + npm-package/fp/indexOfFrom.js | 5 + npm-package/fp/init.js | 1 + npm-package/fp/initial.js | 5 + npm-package/fp/intersection.js | 5 + npm-package/fp/intersectionBy.js | 5 + npm-package/fp/intersectionWith.js | 5 + npm-package/fp/invert.js | 5 + npm-package/fp/invertBy.js | 5 + npm-package/fp/invertObj.js | 1 + npm-package/fp/invoke.js | 5 + npm-package/fp/invokeArgs.js | 5 + npm-package/fp/invokeArgsMap.js | 5 + npm-package/fp/invokeMap.js | 5 + npm-package/fp/isArguments.js | 5 + npm-package/fp/isArray.js | 5 + npm-package/fp/isArrayBuffer.js | 5 + npm-package/fp/isArrayLike.js | 5 + npm-package/fp/isArrayLikeObject.js | 5 + npm-package/fp/isBoolean.js | 5 + npm-package/fp/isBuffer.js | 5 + npm-package/fp/isDate.js | 5 + npm-package/fp/isElement.js | 5 + npm-package/fp/isEmpty.js | 5 + npm-package/fp/isEqual.js | 5 + npm-package/fp/isEqualWith.js | 5 + npm-package/fp/isError.js | 5 + npm-package/fp/isFinite.js | 5 + npm-package/fp/isFunction.js | 5 + npm-package/fp/isInteger.js | 5 + npm-package/fp/isLength.js | 5 + npm-package/fp/isMap.js | 5 + npm-package/fp/isMatch.js | 5 + npm-package/fp/isMatchWith.js | 5 + npm-package/fp/isNaN.js | 5 + npm-package/fp/isNative.js | 5 + npm-package/fp/isNil.js | 5 + npm-package/fp/isNull.js | 5 + npm-package/fp/isNumber.js | 5 + npm-package/fp/isObject.js | 5 + npm-package/fp/isObjectLike.js | 5 + npm-package/fp/isPlainObject.js | 5 + npm-package/fp/isRegExp.js | 5 + npm-package/fp/isSafeInteger.js | 5 + npm-package/fp/isSet.js | 5 + npm-package/fp/isString.js | 5 + npm-package/fp/isSymbol.js | 5 + npm-package/fp/isTypedArray.js | 5 + npm-package/fp/isUndefined.js | 5 + npm-package/fp/isWeakMap.js | 5 + npm-package/fp/isWeakSet.js | 5 + npm-package/fp/iteratee.js | 5 + npm-package/fp/join.js | 5 + npm-package/fp/juxt.js | 1 + npm-package/fp/kebabCase.js | 5 + npm-package/fp/keyBy.js | 5 + npm-package/fp/keys.js | 5 + npm-package/fp/keysIn.js | 5 + npm-package/fp/lang.js | 2 + npm-package/fp/last.js | 5 + npm-package/fp/lastIndexOf.js | 5 + npm-package/fp/lastIndexOfFrom.js | 5 + npm-package/fp/lowerCase.js | 5 + npm-package/fp/lowerFirst.js | 5 + npm-package/fp/lt.js | 5 + npm-package/fp/lte.js | 5 + npm-package/fp/map.js | 5 + npm-package/fp/mapKeys.js | 5 + npm-package/fp/mapValues.js | 5 + npm-package/fp/matches.js | 1 + npm-package/fp/matchesProperty.js | 5 + npm-package/fp/math.js | 2 + npm-package/fp/max.js | 5 + npm-package/fp/maxBy.js | 5 + npm-package/fp/mean.js | 5 + npm-package/fp/meanBy.js | 5 + npm-package/fp/memoize.js | 5 + npm-package/fp/merge.js | 5 + npm-package/fp/mergeAll.js | 5 + npm-package/fp/mergeAllWith.js | 5 + npm-package/fp/mergeWith.js | 5 + npm-package/fp/method.js | 5 + npm-package/fp/methodOf.js | 5 + npm-package/fp/min.js | 5 + npm-package/fp/minBy.js | 5 + npm-package/fp/mixin.js | 5 + npm-package/fp/multiply.js | 5 + npm-package/fp/nAry.js | 1 + npm-package/fp/negate.js | 5 + npm-package/fp/next.js | 5 + npm-package/fp/noop.js | 5 + npm-package/fp/now.js | 5 + npm-package/fp/nth.js | 5 + npm-package/fp/nthArg.js | 5 + npm-package/fp/number.js | 2 + npm-package/fp/object.js | 2 + npm-package/fp/omit.js | 5 + npm-package/fp/omitAll.js | 1 + npm-package/fp/omitBy.js | 5 + npm-package/fp/once.js | 5 + npm-package/fp/orderBy.js | 5 + npm-package/fp/over.js | 5 + npm-package/fp/overArgs.js | 5 + npm-package/fp/overEvery.js | 5 + npm-package/fp/overSome.js | 5 + npm-package/fp/pad.js | 5 + npm-package/fp/padChars.js | 5 + npm-package/fp/padCharsEnd.js | 5 + npm-package/fp/padCharsStart.js | 5 + npm-package/fp/padEnd.js | 5 + npm-package/fp/padStart.js | 5 + npm-package/fp/parseInt.js | 5 + npm-package/fp/partial.js | 5 + npm-package/fp/partialRight.js | 5 + npm-package/fp/partition.js | 5 + npm-package/fp/path.js | 1 + npm-package/fp/pathEq.js | 1 + npm-package/fp/pathOr.js | 1 + npm-package/fp/paths.js | 1 + npm-package/fp/pick.js | 5 + npm-package/fp/pickAll.js | 1 + npm-package/fp/pickBy.js | 5 + npm-package/fp/pipe.js | 1 + npm-package/fp/placeholder.js | 6 + npm-package/fp/plant.js | 5 + npm-package/fp/pluck.js | 1 + npm-package/fp/prop.js | 1 + npm-package/fp/propEq.js | 1 + npm-package/fp/propOr.js | 1 + npm-package/fp/property.js | 1 + npm-package/fp/propertyOf.js | 5 + npm-package/fp/props.js | 1 + npm-package/fp/pull.js | 5 + npm-package/fp/pullAll.js | 5 + npm-package/fp/pullAllBy.js | 5 + npm-package/fp/pullAllWith.js | 5 + npm-package/fp/pullAt.js | 5 + npm-package/fp/random.js | 5 + npm-package/fp/range.js | 5 + npm-package/fp/rangeRight.js | 5 + npm-package/fp/rangeStep.js | 5 + npm-package/fp/rangeStepRight.js | 5 + npm-package/fp/rearg.js | 5 + npm-package/fp/reduce.js | 5 + npm-package/fp/reduceRight.js | 5 + npm-package/fp/reject.js | 5 + npm-package/fp/remove.js | 5 + npm-package/fp/repeat.js | 5 + npm-package/fp/replace.js | 5 + npm-package/fp/rest.js | 5 + npm-package/fp/restFrom.js | 5 + npm-package/fp/result.js | 5 + npm-package/fp/reverse.js | 5 + npm-package/fp/round.js | 5 + npm-package/fp/sample.js | 5 + npm-package/fp/sampleSize.js | 5 + npm-package/fp/seq.js | 2 + npm-package/fp/set.js | 5 + npm-package/fp/setWith.js | 5 + npm-package/fp/shuffle.js | 5 + npm-package/fp/size.js | 5 + npm-package/fp/slice.js | 5 + npm-package/fp/snakeCase.js | 5 + npm-package/fp/some.js | 5 + npm-package/fp/sortBy.js | 5 + npm-package/fp/sortedIndex.js | 5 + npm-package/fp/sortedIndexBy.js | 5 + npm-package/fp/sortedIndexOf.js | 5 + npm-package/fp/sortedLastIndex.js | 5 + npm-package/fp/sortedLastIndexBy.js | 5 + npm-package/fp/sortedLastIndexOf.js | 5 + npm-package/fp/sortedUniq.js | 5 + npm-package/fp/sortedUniqBy.js | 5 + npm-package/fp/split.js | 5 + npm-package/fp/spread.js | 5 + npm-package/fp/spreadFrom.js | 5 + npm-package/fp/startCase.js | 5 + npm-package/fp/startsWith.js | 5 + npm-package/fp/string.js | 2 + npm-package/fp/stubArray.js | 5 + npm-package/fp/stubFalse.js | 5 + npm-package/fp/stubObject.js | 5 + npm-package/fp/stubString.js | 5 + npm-package/fp/stubTrue.js | 5 + npm-package/fp/subtract.js | 5 + npm-package/fp/sum.js | 5 + npm-package/fp/sumBy.js | 5 + npm-package/fp/symmetricDifference.js | 1 + npm-package/fp/symmetricDifferenceBy.js | 1 + npm-package/fp/symmetricDifferenceWith.js | 1 + npm-package/fp/tail.js | 5 + npm-package/fp/take.js | 5 + npm-package/fp/takeLast.js | 1 + npm-package/fp/takeLastWhile.js | 1 + npm-package/fp/takeRight.js | 5 + npm-package/fp/takeRightWhile.js | 5 + npm-package/fp/takeWhile.js | 5 + npm-package/fp/tap.js | 5 + npm-package/fp/template.js | 5 + npm-package/fp/templateSettings.js | 5 + npm-package/fp/throttle.js | 5 + npm-package/fp/thru.js | 5 + npm-package/fp/times.js | 5 + npm-package/fp/toArray.js | 5 + npm-package/fp/toFinite.js | 5 + npm-package/fp/toInteger.js | 5 + npm-package/fp/toIterator.js | 5 + npm-package/fp/toJSON.js | 5 + npm-package/fp/toLength.js | 5 + npm-package/fp/toLower.js | 5 + npm-package/fp/toNumber.js | 5 + npm-package/fp/toPairs.js | 5 + npm-package/fp/toPairsIn.js | 5 + npm-package/fp/toPath.js | 5 + npm-package/fp/toPlainObject.js | 5 + npm-package/fp/toSafeInteger.js | 5 + npm-package/fp/toString.js | 5 + npm-package/fp/toUpper.js | 5 + npm-package/fp/transform.js | 5 + npm-package/fp/trim.js | 5 + npm-package/fp/trimChars.js | 5 + npm-package/fp/trimCharsEnd.js | 5 + npm-package/fp/trimCharsStart.js | 5 + npm-package/fp/trimEnd.js | 5 + npm-package/fp/trimStart.js | 5 + npm-package/fp/truncate.js | 5 + npm-package/fp/unapply.js | 1 + npm-package/fp/unary.js | 5 + npm-package/fp/unescape.js | 5 + npm-package/fp/union.js | 5 + npm-package/fp/unionBy.js | 5 + npm-package/fp/unionWith.js | 5 + npm-package/fp/uniq.js | 5 + npm-package/fp/uniqBy.js | 5 + npm-package/fp/uniqWith.js | 5 + npm-package/fp/uniqueId.js | 5 + npm-package/fp/unnest.js | 1 + npm-package/fp/unset.js | 5 + npm-package/fp/unzip.js | 5 + npm-package/fp/unzipWith.js | 5 + npm-package/fp/update.js | 5 + npm-package/fp/updateWith.js | 5 + npm-package/fp/upperCase.js | 5 + npm-package/fp/upperFirst.js | 5 + npm-package/fp/useWith.js | 1 + npm-package/fp/util.js | 2 + npm-package/fp/value.js | 5 + npm-package/fp/valueOf.js | 5 + npm-package/fp/values.js | 5 + npm-package/fp/valuesIn.js | 5 + npm-package/fp/where.js | 1 + npm-package/fp/whereEq.js | 1 + npm-package/fp/without.js | 5 + npm-package/fp/words.js | 5 + npm-package/fp/wrap.js | 5 + npm-package/fp/wrapperAt.js | 5 + npm-package/fp/wrapperChain.js | 5 + npm-package/fp/wrapperLodash.js | 5 + npm-package/fp/wrapperReverse.js | 5 + npm-package/fp/wrapperValue.js | 5 + npm-package/fp/xor.js | 5 + npm-package/fp/xorBy.js | 5 + npm-package/fp/xorWith.js | 5 + npm-package/fp/zip.js | 5 + npm-package/fp/zipAll.js | 5 + npm-package/fp/zipObj.js | 1 + npm-package/fp/zipObject.js | 5 + npm-package/fp/zipObjectDeep.js | 5 + npm-package/fp/zipWith.js | 5 + npm-package/fromPairs.js | 28 + npm-package/function.js | 25 + npm-package/functions.js | 31 + npm-package/functionsIn.js | 31 + npm-package/get.js | 33 + npm-package/groupBy.js | 41 + npm-package/gt.js | 29 + npm-package/gte.js | 30 + npm-package/has.js | 35 + npm-package/hasIn.js | 34 + npm-package/head.js | 23 + npm-package/identity.js | 21 + npm-package/inRange.js | 55 + npm-package/includes.js | 53 + npm-package/index.js | 1 + npm-package/indexOf.js | 42 + npm-package/initial.js | 22 + npm-package/intersection.js | 30 + npm-package/intersectionBy.js | 45 + npm-package/intersectionWith.js | 41 + npm-package/invert.js | 42 + npm-package/invertBy.js | 56 + npm-package/invoke.js | 24 + npm-package/invokeMap.js | 41 + npm-package/isArguments.js | 36 + npm-package/isArray.js | 26 + npm-package/isArrayBuffer.js | 27 + npm-package/isArrayLike.js | 33 + npm-package/isArrayLikeObject.js | 33 + npm-package/isBoolean.js | 29 + npm-package/isBuffer.js | 38 + npm-package/isDate.js | 27 + npm-package/isElement.js | 25 + npm-package/isEmpty.js | 77 + npm-package/isEqual.js | 35 + npm-package/isEqualWith.js | 41 + npm-package/isError.js | 36 + npm-package/isFinite.js | 36 + npm-package/isFunction.js | 37 + npm-package/isInteger.js | 33 + npm-package/isLength.js | 35 + npm-package/isMap.js | 27 + npm-package/isMatch.js | 36 + npm-package/isMatchWith.js | 41 + npm-package/isNaN.js | 38 + npm-package/isNative.js | 40 + npm-package/isNil.js | 25 + npm-package/isNull.js | 22 + npm-package/isNumber.js | 38 + npm-package/isObject.js | 31 + npm-package/isObjectLike.js | 29 + npm-package/isPlainObject.js | 62 + npm-package/isRegExp.js | 27 + npm-package/isSafeInteger.js | 37 + npm-package/isSet.js | 27 + npm-package/isString.js | 30 + npm-package/isSymbol.js | 29 + npm-package/isTypedArray.js | 27 + npm-package/isUndefined.js | 22 + npm-package/isWeakMap.js | 28 + npm-package/isWeakSet.js | 28 + npm-package/iteratee.js | 53 + npm-package/join.js | 26 + npm-package/kebabCase.js | 28 + npm-package/keyBy.js | 36 + npm-package/keys.js | 37 + npm-package/keysIn.js | 32 + npm-package/lang.js | 58 + npm-package/last.js | 20 + npm-package/lastIndexOf.js | 46 + npm-package/lodash.js | 17161 ++++++++++++++++++++ npm-package/lodash.min.js | 139 + npm-package/lowerCase.js | 27 + npm-package/lowerFirst.js | 22 + npm-package/lt.js | 29 + npm-package/lte.js | 30 + npm-package/map.js | 53 + npm-package/mapKeys.js | 36 + npm-package/mapValues.js | 43 + npm-package/matches.js | 39 + npm-package/matchesProperty.js | 37 + npm-package/math.js | 17 + npm-package/max.js | 29 + npm-package/maxBy.js | 34 + npm-package/mean.js | 22 + npm-package/meanBy.js | 31 + npm-package/memoize.js | 73 + npm-package/merge.js | 39 + npm-package/mergeWith.js | 39 + npm-package/method.js | 34 + npm-package/methodOf.js | 33 + npm-package/min.js | 29 + npm-package/minBy.js | 34 + npm-package/mixin.js | 74 + npm-package/multiply.js | 22 + npm-package/negate.js | 40 + npm-package/next.js | 35 + npm-package/noop.js | 17 + npm-package/now.js | 23 + npm-package/nth.js | 29 + npm-package/nthArg.js | 32 + npm-package/number.js | 5 + npm-package/object.js | 49 + npm-package/omit.js | 57 + npm-package/omitBy.js | 29 + npm-package/once.js | 25 + npm-package/orderBy.js | 47 + npm-package/over.js | 24 + npm-package/overArgs.js | 61 + npm-package/overEvery.js | 30 + npm-package/overSome.js | 30 + npm-package/package.json | 17 + npm-package/pad.js | 49 + npm-package/padEnd.js | 39 + npm-package/padStart.js | 39 + npm-package/parseInt.js | 43 + npm-package/partial.js | 50 + npm-package/partialRight.js | 49 + npm-package/partition.js | 43 + npm-package/pick.js | 25 + npm-package/pickBy.js | 37 + npm-package/plant.js | 48 + npm-package/property.js | 32 + npm-package/propertyOf.js | 30 + npm-package/pull.js | 29 + npm-package/pullAll.js | 29 + npm-package/pullAllBy.js | 33 + npm-package/pullAllWith.js | 32 + npm-package/pullAt.js | 43 + npm-package/random.js | 82 + npm-package/range.js | 46 + npm-package/rangeRight.js | 41 + npm-package/rearg.js | 33 + npm-package/reduce.js | 51 + npm-package/reduceRight.js | 36 + npm-package/reject.js | 46 + npm-package/remove.js | 53 + npm-package/repeat.js | 37 + npm-package/replace.js | 29 + npm-package/rest.js | 40 + npm-package/result.js | 56 + npm-package/reverse.js | 34 + npm-package/round.js | 26 + npm-package/sample.js | 24 + npm-package/sampleSize.js | 37 + npm-package/seq.js | 16 + npm-package/set.js | 35 + npm-package/setWith.js | 32 + npm-package/shuffle.js | 25 + npm-package/size.js | 46 + npm-package/slice.js | 37 + npm-package/snakeCase.js | 28 + npm-package/some.js | 51 + npm-package/sortBy.js | 48 + npm-package/sortedIndex.js | 24 + npm-package/sortedIndexBy.js | 33 + npm-package/sortedIndexOf.js | 31 + npm-package/sortedLastIndex.js | 25 + npm-package/sortedLastIndexBy.js | 33 + npm-package/sortedLastIndexOf.js | 31 + npm-package/sortedUniq.js | 24 + npm-package/sortedUniqBy.js | 26 + npm-package/split.js | 52 + npm-package/spread.js | 63 + npm-package/startCase.js | 29 + npm-package/startsWith.js | 39 + npm-package/string.js | 33 + npm-package/stubArray.js | 23 + npm-package/stubFalse.js | 18 + npm-package/stubObject.js | 23 + npm-package/stubString.js | 18 + npm-package/stubTrue.js | 18 + npm-package/subtract.js | 22 + npm-package/sum.js | 24 + npm-package/sumBy.js | 33 + npm-package/tail.js | 22 + npm-package/take.js | 37 + npm-package/takeRight.js | 39 + npm-package/takeRightWhile.js | 45 + npm-package/takeWhile.js | 45 + npm-package/tap.js | 29 + npm-package/template.js | 253 + npm-package/templateSettings.js | 67 + npm-package/throttle.js | 69 + npm-package/thru.js | 28 + npm-package/times.js | 51 + npm-package/toArray.js | 58 + npm-package/toFinite.js | 42 + npm-package/toInteger.js | 36 + npm-package/toIterator.js | 23 + npm-package/toJSON.js | 1 + npm-package/toLength.js | 38 + npm-package/toLower.js | 28 + npm-package/toNumber.js | 66 + npm-package/toPairs.js | 30 + npm-package/toPairsIn.js | 30 + npm-package/toPath.js | 33 + npm-package/toPlainObject.js | 32 + npm-package/toSafeInteger.js | 37 + npm-package/toString.js | 28 + npm-package/toUpper.js | 28 + npm-package/transform.js | 65 + npm-package/trim.js | 49 + npm-package/trimEnd.js | 43 + npm-package/trimStart.js | 43 + npm-package/truncate.js | 111 + npm-package/unary.js | 22 + npm-package/unescape.js | 34 + npm-package/union.js | 26 + npm-package/unionBy.js | 39 + npm-package/unionWith.js | 34 + npm-package/uniq.js | 25 + npm-package/uniqBy.js | 31 + npm-package/uniqWith.js | 28 + npm-package/uniqueId.js | 28 + npm-package/unset.js | 34 + npm-package/unzip.js | 45 + npm-package/unzipWith.js | 39 + npm-package/update.js | 35 + npm-package/updateWith.js | 33 + npm-package/upperCase.js | 27 + npm-package/upperFirst.js | 22 + npm-package/util.js | 34 + npm-package/value.js | 1 + npm-package/valueOf.js | 1 + npm-package/values.js | 34 + npm-package/valuesIn.js | 32 + npm-package/without.js | 31 + npm-package/words.js | 35 + npm-package/wrap.js | 30 + npm-package/wrapperAt.js | 48 + npm-package/wrapperChain.js | 34 + npm-package/wrapperLodash.js | 147 + npm-package/wrapperReverse.js | 44 + npm-package/wrapperValue.js | 21 + npm-package/xor.js | 28 + npm-package/xorBy.js | 39 + npm-package/xorWith.js | 34 + npm-package/zip.js | 22 + npm-package/zipObject.js | 24 + npm-package/zipObjectDeep.js | 23 + npm-package/zipWith.js | 32 + 1046 files changed, 40050 insertions(+) create mode 100644 npm-package/README.md create mode 100644 npm-package/_DataView.js create mode 100644 npm-package/_Hash.js create mode 100644 npm-package/_LazyWrapper.js create mode 100644 npm-package/_ListCache.js create mode 100644 npm-package/_LodashWrapper.js create mode 100644 npm-package/_Map.js create mode 100644 npm-package/_MapCache.js create mode 100644 npm-package/_Promise.js create mode 100644 npm-package/_Set.js create mode 100644 npm-package/_SetCache.js create mode 100644 npm-package/_Stack.js create mode 100644 npm-package/_Symbol.js create mode 100644 npm-package/_Uint8Array.js create mode 100644 npm-package/_WeakMap.js create mode 100644 npm-package/_apply.js create mode 100644 npm-package/_arrayAggregator.js create mode 100644 npm-package/_arrayEach.js create mode 100644 npm-package/_arrayEachRight.js create mode 100644 npm-package/_arrayEvery.js create mode 100644 npm-package/_arrayFilter.js create mode 100644 npm-package/_arrayIncludes.js create mode 100644 npm-package/_arrayIncludesWith.js create mode 100644 npm-package/_arrayLikeKeys.js create mode 100644 npm-package/_arrayMap.js create mode 100644 npm-package/_arrayPush.js create mode 100644 npm-package/_arrayReduce.js create mode 100644 npm-package/_arrayReduceRight.js create mode 100644 npm-package/_arraySample.js create mode 100644 npm-package/_arraySampleSize.js create mode 100644 npm-package/_arrayShuffle.js create mode 100644 npm-package/_arraySome.js create mode 100644 npm-package/_asciiSize.js create mode 100644 npm-package/_asciiToArray.js create mode 100644 npm-package/_asciiWords.js create mode 100644 npm-package/_assignMergeValue.js create mode 100644 npm-package/_assignValue.js create mode 100644 npm-package/_assocIndexOf.js create mode 100644 npm-package/_baseAggregator.js create mode 100644 npm-package/_baseAssign.js create mode 100644 npm-package/_baseAssignIn.js create mode 100644 npm-package/_baseAssignValue.js create mode 100644 npm-package/_baseAt.js create mode 100644 npm-package/_baseClamp.js create mode 100644 npm-package/_baseClone.js create mode 100644 npm-package/_baseConforms.js create mode 100644 npm-package/_baseConformsTo.js create mode 100644 npm-package/_baseCreate.js create mode 100644 npm-package/_baseDelay.js create mode 100644 npm-package/_baseDifference.js create mode 100644 npm-package/_baseEach.js create mode 100644 npm-package/_baseEachRight.js create mode 100644 npm-package/_baseEvery.js create mode 100644 npm-package/_baseExtremum.js create mode 100644 npm-package/_baseFill.js create mode 100644 npm-package/_baseFilter.js create mode 100644 npm-package/_baseFindIndex.js create mode 100644 npm-package/_baseFindKey.js create mode 100644 npm-package/_baseFlatten.js create mode 100644 npm-package/_baseFor.js create mode 100644 npm-package/_baseForOwn.js create mode 100644 npm-package/_baseForOwnRight.js create mode 100644 npm-package/_baseForRight.js create mode 100644 npm-package/_baseFunctions.js create mode 100644 npm-package/_baseGet.js create mode 100644 npm-package/_baseGetAllKeys.js create mode 100644 npm-package/_baseGetTag.js create mode 100644 npm-package/_baseGt.js create mode 100644 npm-package/_baseHas.js create mode 100644 npm-package/_baseHasIn.js create mode 100644 npm-package/_baseInRange.js create mode 100644 npm-package/_baseIndexOf.js create mode 100644 npm-package/_baseIndexOfWith.js create mode 100644 npm-package/_baseIntersection.js create mode 100644 npm-package/_baseInverter.js create mode 100644 npm-package/_baseInvoke.js create mode 100644 npm-package/_baseIsArguments.js create mode 100644 npm-package/_baseIsArrayBuffer.js create mode 100644 npm-package/_baseIsDate.js create mode 100644 npm-package/_baseIsEqual.js create mode 100644 npm-package/_baseIsEqualDeep.js create mode 100644 npm-package/_baseIsMap.js create mode 100644 npm-package/_baseIsMatch.js create mode 100644 npm-package/_baseIsNaN.js create mode 100644 npm-package/_baseIsNative.js create mode 100644 npm-package/_baseIsRegExp.js create mode 100644 npm-package/_baseIsSet.js create mode 100644 npm-package/_baseIsTypedArray.js create mode 100644 npm-package/_baseIteratee.js create mode 100644 npm-package/_baseKeys.js create mode 100644 npm-package/_baseKeysIn.js create mode 100644 npm-package/_baseLodash.js create mode 100644 npm-package/_baseLt.js create mode 100644 npm-package/_baseMap.js create mode 100644 npm-package/_baseMatches.js create mode 100644 npm-package/_baseMatchesProperty.js create mode 100644 npm-package/_baseMean.js create mode 100644 npm-package/_baseMerge.js create mode 100644 npm-package/_baseMergeDeep.js create mode 100644 npm-package/_baseNth.js create mode 100644 npm-package/_baseOrderBy.js create mode 100644 npm-package/_basePick.js create mode 100644 npm-package/_basePickBy.js create mode 100644 npm-package/_baseProperty.js create mode 100644 npm-package/_basePropertyDeep.js create mode 100644 npm-package/_basePropertyOf.js create mode 100644 npm-package/_basePullAll.js create mode 100644 npm-package/_basePullAt.js create mode 100644 npm-package/_baseRandom.js create mode 100644 npm-package/_baseRange.js create mode 100644 npm-package/_baseReduce.js create mode 100644 npm-package/_baseRepeat.js create mode 100644 npm-package/_baseRest.js create mode 100644 npm-package/_baseSample.js create mode 100644 npm-package/_baseSampleSize.js create mode 100644 npm-package/_baseSet.js create mode 100644 npm-package/_baseSetData.js create mode 100644 npm-package/_baseSetToString.js create mode 100644 npm-package/_baseShuffle.js create mode 100644 npm-package/_baseSlice.js create mode 100644 npm-package/_baseSome.js create mode 100644 npm-package/_baseSortBy.js create mode 100644 npm-package/_baseSortedIndex.js create mode 100644 npm-package/_baseSortedIndexBy.js create mode 100644 npm-package/_baseSortedUniq.js create mode 100644 npm-package/_baseSum.js create mode 100644 npm-package/_baseTimes.js create mode 100644 npm-package/_baseToNumber.js create mode 100644 npm-package/_baseToPairs.js create mode 100644 npm-package/_baseToString.js create mode 100644 npm-package/_baseUnary.js create mode 100644 npm-package/_baseUniq.js create mode 100644 npm-package/_baseUnset.js create mode 100644 npm-package/_baseUpdate.js create mode 100644 npm-package/_baseValues.js create mode 100644 npm-package/_baseWhile.js create mode 100644 npm-package/_baseWrapperValue.js create mode 100644 npm-package/_baseXor.js create mode 100644 npm-package/_baseZipObject.js create mode 100644 npm-package/_cacheHas.js create mode 100644 npm-package/_castArrayLikeObject.js create mode 100644 npm-package/_castFunction.js create mode 100644 npm-package/_castPath.js create mode 100644 npm-package/_castRest.js create mode 100644 npm-package/_castSlice.js create mode 100644 npm-package/_charsEndIndex.js create mode 100644 npm-package/_charsStartIndex.js create mode 100644 npm-package/_cloneArrayBuffer.js create mode 100644 npm-package/_cloneBuffer.js create mode 100644 npm-package/_cloneDataView.js create mode 100644 npm-package/_cloneRegExp.js create mode 100644 npm-package/_cloneSymbol.js create mode 100644 npm-package/_cloneTypedArray.js create mode 100644 npm-package/_compareAscending.js create mode 100644 npm-package/_compareMultiple.js create mode 100644 npm-package/_composeArgs.js create mode 100644 npm-package/_composeArgsRight.js create mode 100644 npm-package/_copyArray.js create mode 100644 npm-package/_copyObject.js create mode 100644 npm-package/_copySymbols.js create mode 100644 npm-package/_copySymbolsIn.js create mode 100644 npm-package/_coreJsData.js create mode 100644 npm-package/_countHolders.js create mode 100644 npm-package/_createAggregator.js create mode 100644 npm-package/_createAssigner.js create mode 100644 npm-package/_createBaseEach.js create mode 100644 npm-package/_createBaseFor.js create mode 100644 npm-package/_createBind.js create mode 100644 npm-package/_createCaseFirst.js create mode 100644 npm-package/_createCompounder.js create mode 100644 npm-package/_createCtor.js create mode 100644 npm-package/_createCurry.js create mode 100644 npm-package/_createFind.js create mode 100644 npm-package/_createFlow.js create mode 100644 npm-package/_createHybrid.js create mode 100644 npm-package/_createInverter.js create mode 100644 npm-package/_createMathOperation.js create mode 100644 npm-package/_createOver.js create mode 100644 npm-package/_createPadding.js create mode 100644 npm-package/_createPartial.js create mode 100644 npm-package/_createRange.js create mode 100644 npm-package/_createRecurry.js create mode 100644 npm-package/_createRelationalOperation.js create mode 100644 npm-package/_createRound.js create mode 100644 npm-package/_createSet.js create mode 100644 npm-package/_createToPairs.js create mode 100644 npm-package/_createWrap.js create mode 100644 npm-package/_customDefaultsAssignIn.js create mode 100644 npm-package/_customDefaultsMerge.js create mode 100644 npm-package/_customOmitClone.js create mode 100644 npm-package/_deburrLetter.js create mode 100644 npm-package/_defineProperty.js create mode 100644 npm-package/_equalArrays.js create mode 100644 npm-package/_equalByTag.js create mode 100644 npm-package/_equalObjects.js create mode 100644 npm-package/_escapeHtmlChar.js create mode 100644 npm-package/_escapeStringChar.js create mode 100644 npm-package/_flatRest.js create mode 100644 npm-package/_freeGlobal.js create mode 100644 npm-package/_getAllKeys.js create mode 100644 npm-package/_getAllKeysIn.js create mode 100644 npm-package/_getData.js create mode 100644 npm-package/_getFuncName.js create mode 100644 npm-package/_getHolder.js create mode 100644 npm-package/_getMapData.js create mode 100644 npm-package/_getMatchData.js create mode 100644 npm-package/_getNative.js create mode 100644 npm-package/_getPrototype.js create mode 100644 npm-package/_getRawTag.js create mode 100644 npm-package/_getSymbols.js create mode 100644 npm-package/_getSymbolsIn.js create mode 100644 npm-package/_getTag.js create mode 100644 npm-package/_getValue.js create mode 100644 npm-package/_getView.js create mode 100644 npm-package/_getWrapDetails.js create mode 100644 npm-package/_hasPath.js create mode 100644 npm-package/_hasUnicode.js create mode 100644 npm-package/_hasUnicodeWord.js create mode 100644 npm-package/_hashClear.js create mode 100644 npm-package/_hashDelete.js create mode 100644 npm-package/_hashGet.js create mode 100644 npm-package/_hashHas.js create mode 100644 npm-package/_hashSet.js create mode 100644 npm-package/_initCloneArray.js create mode 100644 npm-package/_initCloneByTag.js create mode 100644 npm-package/_initCloneObject.js create mode 100644 npm-package/_insertWrapDetails.js create mode 100644 npm-package/_isFlattenable.js create mode 100644 npm-package/_isIndex.js create mode 100644 npm-package/_isIterateeCall.js create mode 100644 npm-package/_isKey.js create mode 100644 npm-package/_isKeyable.js create mode 100644 npm-package/_isLaziable.js create mode 100644 npm-package/_isMaskable.js create mode 100644 npm-package/_isMasked.js create mode 100644 npm-package/_isPrototype.js create mode 100644 npm-package/_isStrictComparable.js create mode 100644 npm-package/_iteratorToArray.js create mode 100644 npm-package/_lazyClone.js create mode 100644 npm-package/_lazyReverse.js create mode 100644 npm-package/_lazyValue.js create mode 100644 npm-package/_listCacheClear.js create mode 100644 npm-package/_listCacheDelete.js create mode 100644 npm-package/_listCacheGet.js create mode 100644 npm-package/_listCacheHas.js create mode 100644 npm-package/_listCacheSet.js create mode 100644 npm-package/_mapCacheClear.js create mode 100644 npm-package/_mapCacheDelete.js create mode 100644 npm-package/_mapCacheGet.js create mode 100644 npm-package/_mapCacheHas.js create mode 100644 npm-package/_mapCacheSet.js create mode 100644 npm-package/_mapToArray.js create mode 100644 npm-package/_matchesStrictComparable.js create mode 100644 npm-package/_memoizeCapped.js create mode 100644 npm-package/_mergeData.js create mode 100644 npm-package/_metaMap.js create mode 100644 npm-package/_nativeCreate.js create mode 100644 npm-package/_nativeKeys.js create mode 100644 npm-package/_nativeKeysIn.js create mode 100644 npm-package/_nodeUtil.js create mode 100644 npm-package/_objectToString.js create mode 100644 npm-package/_overArg.js create mode 100644 npm-package/_overRest.js create mode 100644 npm-package/_parent.js create mode 100644 npm-package/_reEscape.js create mode 100644 npm-package/_reEvaluate.js create mode 100644 npm-package/_reInterpolate.js create mode 100644 npm-package/_realNames.js create mode 100644 npm-package/_reorder.js create mode 100644 npm-package/_replaceHolders.js create mode 100644 npm-package/_root.js create mode 100644 npm-package/_safeGet.js create mode 100644 npm-package/_setCacheAdd.js create mode 100644 npm-package/_setCacheHas.js create mode 100644 npm-package/_setData.js create mode 100644 npm-package/_setToArray.js create mode 100644 npm-package/_setToPairs.js create mode 100644 npm-package/_setToString.js create mode 100644 npm-package/_setWrapToString.js create mode 100644 npm-package/_shortOut.js create mode 100644 npm-package/_shuffleSelf.js create mode 100644 npm-package/_stackClear.js create mode 100644 npm-package/_stackDelete.js create mode 100644 npm-package/_stackGet.js create mode 100644 npm-package/_stackHas.js create mode 100644 npm-package/_stackSet.js create mode 100644 npm-package/_strictIndexOf.js create mode 100644 npm-package/_strictLastIndexOf.js create mode 100644 npm-package/_stringSize.js create mode 100644 npm-package/_stringToArray.js create mode 100644 npm-package/_stringToPath.js create mode 100644 npm-package/_toKey.js create mode 100644 npm-package/_toSource.js create mode 100644 npm-package/_unescapeHtmlChar.js create mode 100644 npm-package/_unicodeSize.js create mode 100644 npm-package/_unicodeToArray.js create mode 100644 npm-package/_unicodeWords.js create mode 100644 npm-package/_updateWrapDetails.js create mode 100644 npm-package/_wrapperClone.js create mode 100644 npm-package/add.js create mode 100644 npm-package/after.js create mode 100644 npm-package/array.js create mode 100644 npm-package/ary.js create mode 100644 npm-package/assign.js create mode 100644 npm-package/assignIn.js create mode 100644 npm-package/assignInWith.js create mode 100644 npm-package/assignWith.js create mode 100644 npm-package/at.js create mode 100644 npm-package/attempt.js create mode 100644 npm-package/before.js create mode 100644 npm-package/bind.js create mode 100644 npm-package/bindAll.js create mode 100644 npm-package/bindKey.js create mode 100644 npm-package/camelCase.js create mode 100644 npm-package/capitalize.js create mode 100644 npm-package/castArray.js create mode 100644 npm-package/ceil.js create mode 100644 npm-package/chain.js create mode 100644 npm-package/chunk.js create mode 100644 npm-package/clamp.js create mode 100644 npm-package/clone.js create mode 100644 npm-package/cloneDeep.js create mode 100644 npm-package/cloneDeepWith.js create mode 100644 npm-package/cloneWith.js create mode 100644 npm-package/collection.js create mode 100644 npm-package/commit.js create mode 100644 npm-package/compact.js create mode 100644 npm-package/concat.js create mode 100644 npm-package/cond.js create mode 100644 npm-package/conforms.js create mode 100644 npm-package/conformsTo.js create mode 100644 npm-package/constant.js create mode 100644 npm-package/countBy.js create mode 100644 npm-package/create.js create mode 100644 npm-package/curry.js create mode 100644 npm-package/curryRight.js create mode 100644 npm-package/date.js create mode 100644 npm-package/debounce.js create mode 100644 npm-package/deburr.js create mode 100644 npm-package/defaultTo.js create mode 100644 npm-package/defaults.js create mode 100644 npm-package/defaultsDeep.js create mode 100644 npm-package/defer.js create mode 100644 npm-package/delay.js create mode 100644 npm-package/difference.js create mode 100644 npm-package/differenceBy.js create mode 100644 npm-package/differenceWith.js create mode 100644 npm-package/divide.js create mode 100644 npm-package/drop.js create mode 100644 npm-package/dropRight.js create mode 100644 npm-package/dropRightWhile.js create mode 100644 npm-package/dropWhile.js create mode 100644 npm-package/each.js create mode 100644 npm-package/eachRight.js create mode 100644 npm-package/endsWith.js create mode 100644 npm-package/entries.js create mode 100644 npm-package/entriesIn.js create mode 100644 npm-package/eq.js create mode 100644 npm-package/escape.js create mode 100644 npm-package/escapeRegExp.js create mode 100644 npm-package/every.js create mode 100644 npm-package/extend.js create mode 100644 npm-package/extendWith.js create mode 100644 npm-package/fill.js create mode 100644 npm-package/filter.js create mode 100644 npm-package/find.js create mode 100644 npm-package/findIndex.js create mode 100644 npm-package/findKey.js create mode 100644 npm-package/findLast.js create mode 100644 npm-package/findLastIndex.js create mode 100644 npm-package/findLastKey.js create mode 100644 npm-package/first.js create mode 100644 npm-package/flatMap.js create mode 100644 npm-package/flatMapDeep.js create mode 100644 npm-package/flatMapDepth.js create mode 100644 npm-package/flatten.js create mode 100644 npm-package/flattenDeep.js create mode 100644 npm-package/flattenDepth.js create mode 100644 npm-package/flip.js create mode 100644 npm-package/floor.js create mode 100644 npm-package/flow.js create mode 100644 npm-package/flowRight.js create mode 100644 npm-package/forEach.js create mode 100644 npm-package/forEachRight.js create mode 100644 npm-package/forIn.js create mode 100644 npm-package/forInRight.js create mode 100644 npm-package/forOwn.js create mode 100644 npm-package/forOwnRight.js create mode 100644 npm-package/fp.js create mode 100644 npm-package/fp/F.js create mode 100644 npm-package/fp/T.js create mode 100644 npm-package/fp/__.js create mode 100644 npm-package/fp/_baseConvert.js create mode 100644 npm-package/fp/_convertBrowser.js create mode 100644 npm-package/fp/_falseOptions.js create mode 100644 npm-package/fp/_mapping.js create mode 100644 npm-package/fp/_util.js create mode 100644 npm-package/fp/add.js create mode 100644 npm-package/fp/after.js create mode 100644 npm-package/fp/all.js create mode 100644 npm-package/fp/allPass.js create mode 100644 npm-package/fp/always.js create mode 100644 npm-package/fp/any.js create mode 100644 npm-package/fp/anyPass.js create mode 100644 npm-package/fp/apply.js create mode 100644 npm-package/fp/array.js create mode 100644 npm-package/fp/ary.js create mode 100644 npm-package/fp/assign.js create mode 100644 npm-package/fp/assignAll.js create mode 100644 npm-package/fp/assignAllWith.js create mode 100644 npm-package/fp/assignIn.js create mode 100644 npm-package/fp/assignInAll.js create mode 100644 npm-package/fp/assignInAllWith.js create mode 100644 npm-package/fp/assignInWith.js create mode 100644 npm-package/fp/assignWith.js create mode 100644 npm-package/fp/assoc.js create mode 100644 npm-package/fp/assocPath.js create mode 100644 npm-package/fp/at.js create mode 100644 npm-package/fp/attempt.js create mode 100644 npm-package/fp/before.js create mode 100644 npm-package/fp/bind.js create mode 100644 npm-package/fp/bindAll.js create mode 100644 npm-package/fp/bindKey.js create mode 100644 npm-package/fp/camelCase.js create mode 100644 npm-package/fp/capitalize.js create mode 100644 npm-package/fp/castArray.js create mode 100644 npm-package/fp/ceil.js create mode 100644 npm-package/fp/chain.js create mode 100644 npm-package/fp/chunk.js create mode 100644 npm-package/fp/clamp.js create mode 100644 npm-package/fp/clone.js create mode 100644 npm-package/fp/cloneDeep.js create mode 100644 npm-package/fp/cloneDeepWith.js create mode 100644 npm-package/fp/cloneWith.js create mode 100644 npm-package/fp/collection.js create mode 100644 npm-package/fp/commit.js create mode 100644 npm-package/fp/compact.js create mode 100644 npm-package/fp/complement.js create mode 100644 npm-package/fp/compose.js create mode 100644 npm-package/fp/concat.js create mode 100644 npm-package/fp/cond.js create mode 100644 npm-package/fp/conforms.js create mode 100644 npm-package/fp/conformsTo.js create mode 100644 npm-package/fp/constant.js create mode 100644 npm-package/fp/contains.js create mode 100644 npm-package/fp/convert.js create mode 100644 npm-package/fp/countBy.js create mode 100644 npm-package/fp/create.js create mode 100644 npm-package/fp/curry.js create mode 100644 npm-package/fp/curryN.js create mode 100644 npm-package/fp/curryRight.js create mode 100644 npm-package/fp/curryRightN.js create mode 100644 npm-package/fp/date.js create mode 100644 npm-package/fp/debounce.js create mode 100644 npm-package/fp/deburr.js create mode 100644 npm-package/fp/defaultTo.js create mode 100644 npm-package/fp/defaults.js create mode 100644 npm-package/fp/defaultsAll.js create mode 100644 npm-package/fp/defaultsDeep.js create mode 100644 npm-package/fp/defaultsDeepAll.js create mode 100644 npm-package/fp/defer.js create mode 100644 npm-package/fp/delay.js create mode 100644 npm-package/fp/difference.js create mode 100644 npm-package/fp/differenceBy.js create mode 100644 npm-package/fp/differenceWith.js create mode 100644 npm-package/fp/dissoc.js create mode 100644 npm-package/fp/dissocPath.js create mode 100644 npm-package/fp/divide.js create mode 100644 npm-package/fp/drop.js create mode 100644 npm-package/fp/dropLast.js create mode 100644 npm-package/fp/dropLastWhile.js create mode 100644 npm-package/fp/dropRight.js create mode 100644 npm-package/fp/dropRightWhile.js create mode 100644 npm-package/fp/dropWhile.js create mode 100644 npm-package/fp/each.js create mode 100644 npm-package/fp/eachRight.js create mode 100644 npm-package/fp/endsWith.js create mode 100644 npm-package/fp/entries.js create mode 100644 npm-package/fp/entriesIn.js create mode 100644 npm-package/fp/eq.js create mode 100644 npm-package/fp/equals.js create mode 100644 npm-package/fp/escape.js create mode 100644 npm-package/fp/escapeRegExp.js create mode 100644 npm-package/fp/every.js create mode 100644 npm-package/fp/extend.js create mode 100644 npm-package/fp/extendAll.js create mode 100644 npm-package/fp/extendAllWith.js create mode 100644 npm-package/fp/extendWith.js create mode 100644 npm-package/fp/fill.js create mode 100644 npm-package/fp/filter.js create mode 100644 npm-package/fp/find.js create mode 100644 npm-package/fp/findFrom.js create mode 100644 npm-package/fp/findIndex.js create mode 100644 npm-package/fp/findIndexFrom.js create mode 100644 npm-package/fp/findKey.js create mode 100644 npm-package/fp/findLast.js create mode 100644 npm-package/fp/findLastFrom.js create mode 100644 npm-package/fp/findLastIndex.js create mode 100644 npm-package/fp/findLastIndexFrom.js create mode 100644 npm-package/fp/findLastKey.js create mode 100644 npm-package/fp/first.js create mode 100644 npm-package/fp/flatMap.js create mode 100644 npm-package/fp/flatMapDeep.js create mode 100644 npm-package/fp/flatMapDepth.js create mode 100644 npm-package/fp/flatten.js create mode 100644 npm-package/fp/flattenDeep.js create mode 100644 npm-package/fp/flattenDepth.js create mode 100644 npm-package/fp/flip.js create mode 100644 npm-package/fp/floor.js create mode 100644 npm-package/fp/flow.js create mode 100644 npm-package/fp/flowRight.js create mode 100644 npm-package/fp/forEach.js create mode 100644 npm-package/fp/forEachRight.js create mode 100644 npm-package/fp/forIn.js create mode 100644 npm-package/fp/forInRight.js create mode 100644 npm-package/fp/forOwn.js create mode 100644 npm-package/fp/forOwnRight.js create mode 100644 npm-package/fp/fromPairs.js create mode 100644 npm-package/fp/function.js create mode 100644 npm-package/fp/functions.js create mode 100644 npm-package/fp/functionsIn.js create mode 100644 npm-package/fp/get.js create mode 100644 npm-package/fp/getOr.js create mode 100644 npm-package/fp/groupBy.js create mode 100644 npm-package/fp/gt.js create mode 100644 npm-package/fp/gte.js create mode 100644 npm-package/fp/has.js create mode 100644 npm-package/fp/hasIn.js create mode 100644 npm-package/fp/head.js create mode 100644 npm-package/fp/identical.js create mode 100644 npm-package/fp/identity.js create mode 100644 npm-package/fp/inRange.js create mode 100644 npm-package/fp/includes.js create mode 100644 npm-package/fp/includesFrom.js create mode 100644 npm-package/fp/indexBy.js create mode 100644 npm-package/fp/indexOf.js create mode 100644 npm-package/fp/indexOfFrom.js create mode 100644 npm-package/fp/init.js create mode 100644 npm-package/fp/initial.js create mode 100644 npm-package/fp/intersection.js create mode 100644 npm-package/fp/intersectionBy.js create mode 100644 npm-package/fp/intersectionWith.js create mode 100644 npm-package/fp/invert.js create mode 100644 npm-package/fp/invertBy.js create mode 100644 npm-package/fp/invertObj.js create mode 100644 npm-package/fp/invoke.js create mode 100644 npm-package/fp/invokeArgs.js create mode 100644 npm-package/fp/invokeArgsMap.js create mode 100644 npm-package/fp/invokeMap.js create mode 100644 npm-package/fp/isArguments.js create mode 100644 npm-package/fp/isArray.js create mode 100644 npm-package/fp/isArrayBuffer.js create mode 100644 npm-package/fp/isArrayLike.js create mode 100644 npm-package/fp/isArrayLikeObject.js create mode 100644 npm-package/fp/isBoolean.js create mode 100644 npm-package/fp/isBuffer.js create mode 100644 npm-package/fp/isDate.js create mode 100644 npm-package/fp/isElement.js create mode 100644 npm-package/fp/isEmpty.js create mode 100644 npm-package/fp/isEqual.js create mode 100644 npm-package/fp/isEqualWith.js create mode 100644 npm-package/fp/isError.js create mode 100644 npm-package/fp/isFinite.js create mode 100644 npm-package/fp/isFunction.js create mode 100644 npm-package/fp/isInteger.js create mode 100644 npm-package/fp/isLength.js create mode 100644 npm-package/fp/isMap.js create mode 100644 npm-package/fp/isMatch.js create mode 100644 npm-package/fp/isMatchWith.js create mode 100644 npm-package/fp/isNaN.js create mode 100644 npm-package/fp/isNative.js create mode 100644 npm-package/fp/isNil.js create mode 100644 npm-package/fp/isNull.js create mode 100644 npm-package/fp/isNumber.js create mode 100644 npm-package/fp/isObject.js create mode 100644 npm-package/fp/isObjectLike.js create mode 100644 npm-package/fp/isPlainObject.js create mode 100644 npm-package/fp/isRegExp.js create mode 100644 npm-package/fp/isSafeInteger.js create mode 100644 npm-package/fp/isSet.js create mode 100644 npm-package/fp/isString.js create mode 100644 npm-package/fp/isSymbol.js create mode 100644 npm-package/fp/isTypedArray.js create mode 100644 npm-package/fp/isUndefined.js create mode 100644 npm-package/fp/isWeakMap.js create mode 100644 npm-package/fp/isWeakSet.js create mode 100644 npm-package/fp/iteratee.js create mode 100644 npm-package/fp/join.js create mode 100644 npm-package/fp/juxt.js create mode 100644 npm-package/fp/kebabCase.js create mode 100644 npm-package/fp/keyBy.js create mode 100644 npm-package/fp/keys.js create mode 100644 npm-package/fp/keysIn.js create mode 100644 npm-package/fp/lang.js create mode 100644 npm-package/fp/last.js create mode 100644 npm-package/fp/lastIndexOf.js create mode 100644 npm-package/fp/lastIndexOfFrom.js create mode 100644 npm-package/fp/lowerCase.js create mode 100644 npm-package/fp/lowerFirst.js create mode 100644 npm-package/fp/lt.js create mode 100644 npm-package/fp/lte.js create mode 100644 npm-package/fp/map.js create mode 100644 npm-package/fp/mapKeys.js create mode 100644 npm-package/fp/mapValues.js create mode 100644 npm-package/fp/matches.js create mode 100644 npm-package/fp/matchesProperty.js create mode 100644 npm-package/fp/math.js create mode 100644 npm-package/fp/max.js create mode 100644 npm-package/fp/maxBy.js create mode 100644 npm-package/fp/mean.js create mode 100644 npm-package/fp/meanBy.js create mode 100644 npm-package/fp/memoize.js create mode 100644 npm-package/fp/merge.js create mode 100644 npm-package/fp/mergeAll.js create mode 100644 npm-package/fp/mergeAllWith.js create mode 100644 npm-package/fp/mergeWith.js create mode 100644 npm-package/fp/method.js create mode 100644 npm-package/fp/methodOf.js create mode 100644 npm-package/fp/min.js create mode 100644 npm-package/fp/minBy.js create mode 100644 npm-package/fp/mixin.js create mode 100644 npm-package/fp/multiply.js create mode 100644 npm-package/fp/nAry.js create mode 100644 npm-package/fp/negate.js create mode 100644 npm-package/fp/next.js create mode 100644 npm-package/fp/noop.js create mode 100644 npm-package/fp/now.js create mode 100644 npm-package/fp/nth.js create mode 100644 npm-package/fp/nthArg.js create mode 100644 npm-package/fp/number.js create mode 100644 npm-package/fp/object.js create mode 100644 npm-package/fp/omit.js create mode 100644 npm-package/fp/omitAll.js create mode 100644 npm-package/fp/omitBy.js create mode 100644 npm-package/fp/once.js create mode 100644 npm-package/fp/orderBy.js create mode 100644 npm-package/fp/over.js create mode 100644 npm-package/fp/overArgs.js create mode 100644 npm-package/fp/overEvery.js create mode 100644 npm-package/fp/overSome.js create mode 100644 npm-package/fp/pad.js create mode 100644 npm-package/fp/padChars.js create mode 100644 npm-package/fp/padCharsEnd.js create mode 100644 npm-package/fp/padCharsStart.js create mode 100644 npm-package/fp/padEnd.js create mode 100644 npm-package/fp/padStart.js create mode 100644 npm-package/fp/parseInt.js create mode 100644 npm-package/fp/partial.js create mode 100644 npm-package/fp/partialRight.js create mode 100644 npm-package/fp/partition.js create mode 100644 npm-package/fp/path.js create mode 100644 npm-package/fp/pathEq.js create mode 100644 npm-package/fp/pathOr.js create mode 100644 npm-package/fp/paths.js create mode 100644 npm-package/fp/pick.js create mode 100644 npm-package/fp/pickAll.js create mode 100644 npm-package/fp/pickBy.js create mode 100644 npm-package/fp/pipe.js create mode 100644 npm-package/fp/placeholder.js create mode 100644 npm-package/fp/plant.js create mode 100644 npm-package/fp/pluck.js create mode 100644 npm-package/fp/prop.js create mode 100644 npm-package/fp/propEq.js create mode 100644 npm-package/fp/propOr.js create mode 100644 npm-package/fp/property.js create mode 100644 npm-package/fp/propertyOf.js create mode 100644 npm-package/fp/props.js create mode 100644 npm-package/fp/pull.js create mode 100644 npm-package/fp/pullAll.js create mode 100644 npm-package/fp/pullAllBy.js create mode 100644 npm-package/fp/pullAllWith.js create mode 100644 npm-package/fp/pullAt.js create mode 100644 npm-package/fp/random.js create mode 100644 npm-package/fp/range.js create mode 100644 npm-package/fp/rangeRight.js create mode 100644 npm-package/fp/rangeStep.js create mode 100644 npm-package/fp/rangeStepRight.js create mode 100644 npm-package/fp/rearg.js create mode 100644 npm-package/fp/reduce.js create mode 100644 npm-package/fp/reduceRight.js create mode 100644 npm-package/fp/reject.js create mode 100644 npm-package/fp/remove.js create mode 100644 npm-package/fp/repeat.js create mode 100644 npm-package/fp/replace.js create mode 100644 npm-package/fp/rest.js create mode 100644 npm-package/fp/restFrom.js create mode 100644 npm-package/fp/result.js create mode 100644 npm-package/fp/reverse.js create mode 100644 npm-package/fp/round.js create mode 100644 npm-package/fp/sample.js create mode 100644 npm-package/fp/sampleSize.js create mode 100644 npm-package/fp/seq.js create mode 100644 npm-package/fp/set.js create mode 100644 npm-package/fp/setWith.js create mode 100644 npm-package/fp/shuffle.js create mode 100644 npm-package/fp/size.js create mode 100644 npm-package/fp/slice.js create mode 100644 npm-package/fp/snakeCase.js create mode 100644 npm-package/fp/some.js create mode 100644 npm-package/fp/sortBy.js create mode 100644 npm-package/fp/sortedIndex.js create mode 100644 npm-package/fp/sortedIndexBy.js create mode 100644 npm-package/fp/sortedIndexOf.js create mode 100644 npm-package/fp/sortedLastIndex.js create mode 100644 npm-package/fp/sortedLastIndexBy.js create mode 100644 npm-package/fp/sortedLastIndexOf.js create mode 100644 npm-package/fp/sortedUniq.js create mode 100644 npm-package/fp/sortedUniqBy.js create mode 100644 npm-package/fp/split.js create mode 100644 npm-package/fp/spread.js create mode 100644 npm-package/fp/spreadFrom.js create mode 100644 npm-package/fp/startCase.js create mode 100644 npm-package/fp/startsWith.js create mode 100644 npm-package/fp/string.js create mode 100644 npm-package/fp/stubArray.js create mode 100644 npm-package/fp/stubFalse.js create mode 100644 npm-package/fp/stubObject.js create mode 100644 npm-package/fp/stubString.js create mode 100644 npm-package/fp/stubTrue.js create mode 100644 npm-package/fp/subtract.js create mode 100644 npm-package/fp/sum.js create mode 100644 npm-package/fp/sumBy.js create mode 100644 npm-package/fp/symmetricDifference.js create mode 100644 npm-package/fp/symmetricDifferenceBy.js create mode 100644 npm-package/fp/symmetricDifferenceWith.js create mode 100644 npm-package/fp/tail.js create mode 100644 npm-package/fp/take.js create mode 100644 npm-package/fp/takeLast.js create mode 100644 npm-package/fp/takeLastWhile.js create mode 100644 npm-package/fp/takeRight.js create mode 100644 npm-package/fp/takeRightWhile.js create mode 100644 npm-package/fp/takeWhile.js create mode 100644 npm-package/fp/tap.js create mode 100644 npm-package/fp/template.js create mode 100644 npm-package/fp/templateSettings.js create mode 100644 npm-package/fp/throttle.js create mode 100644 npm-package/fp/thru.js create mode 100644 npm-package/fp/times.js create mode 100644 npm-package/fp/toArray.js create mode 100644 npm-package/fp/toFinite.js create mode 100644 npm-package/fp/toInteger.js create mode 100644 npm-package/fp/toIterator.js create mode 100644 npm-package/fp/toJSON.js create mode 100644 npm-package/fp/toLength.js create mode 100644 npm-package/fp/toLower.js create mode 100644 npm-package/fp/toNumber.js create mode 100644 npm-package/fp/toPairs.js create mode 100644 npm-package/fp/toPairsIn.js create mode 100644 npm-package/fp/toPath.js create mode 100644 npm-package/fp/toPlainObject.js create mode 100644 npm-package/fp/toSafeInteger.js create mode 100644 npm-package/fp/toString.js create mode 100644 npm-package/fp/toUpper.js create mode 100644 npm-package/fp/transform.js create mode 100644 npm-package/fp/trim.js create mode 100644 npm-package/fp/trimChars.js create mode 100644 npm-package/fp/trimCharsEnd.js create mode 100644 npm-package/fp/trimCharsStart.js create mode 100644 npm-package/fp/trimEnd.js create mode 100644 npm-package/fp/trimStart.js create mode 100644 npm-package/fp/truncate.js create mode 100644 npm-package/fp/unapply.js create mode 100644 npm-package/fp/unary.js create mode 100644 npm-package/fp/unescape.js create mode 100644 npm-package/fp/union.js create mode 100644 npm-package/fp/unionBy.js create mode 100644 npm-package/fp/unionWith.js create mode 100644 npm-package/fp/uniq.js create mode 100644 npm-package/fp/uniqBy.js create mode 100644 npm-package/fp/uniqWith.js create mode 100644 npm-package/fp/uniqueId.js create mode 100644 npm-package/fp/unnest.js create mode 100644 npm-package/fp/unset.js create mode 100644 npm-package/fp/unzip.js create mode 100644 npm-package/fp/unzipWith.js create mode 100644 npm-package/fp/update.js create mode 100644 npm-package/fp/updateWith.js create mode 100644 npm-package/fp/upperCase.js create mode 100644 npm-package/fp/upperFirst.js create mode 100644 npm-package/fp/useWith.js create mode 100644 npm-package/fp/util.js create mode 100644 npm-package/fp/value.js create mode 100644 npm-package/fp/valueOf.js create mode 100644 npm-package/fp/values.js create mode 100644 npm-package/fp/valuesIn.js create mode 100644 npm-package/fp/where.js create mode 100644 npm-package/fp/whereEq.js create mode 100644 npm-package/fp/without.js create mode 100644 npm-package/fp/words.js create mode 100644 npm-package/fp/wrap.js create mode 100644 npm-package/fp/wrapperAt.js create mode 100644 npm-package/fp/wrapperChain.js create mode 100644 npm-package/fp/wrapperLodash.js create mode 100644 npm-package/fp/wrapperReverse.js create mode 100644 npm-package/fp/wrapperValue.js create mode 100644 npm-package/fp/xor.js create mode 100644 npm-package/fp/xorBy.js create mode 100644 npm-package/fp/xorWith.js create mode 100644 npm-package/fp/zip.js create mode 100644 npm-package/fp/zipAll.js create mode 100644 npm-package/fp/zipObj.js create mode 100644 npm-package/fp/zipObject.js create mode 100644 npm-package/fp/zipObjectDeep.js create mode 100644 npm-package/fp/zipWith.js create mode 100644 npm-package/fromPairs.js create mode 100644 npm-package/function.js create mode 100644 npm-package/functions.js create mode 100644 npm-package/functionsIn.js create mode 100644 npm-package/get.js create mode 100644 npm-package/groupBy.js create mode 100644 npm-package/gt.js create mode 100644 npm-package/gte.js create mode 100644 npm-package/has.js create mode 100644 npm-package/hasIn.js create mode 100644 npm-package/head.js create mode 100644 npm-package/identity.js create mode 100644 npm-package/inRange.js create mode 100644 npm-package/includes.js create mode 100644 npm-package/index.js create mode 100644 npm-package/indexOf.js create mode 100644 npm-package/initial.js create mode 100644 npm-package/intersection.js create mode 100644 npm-package/intersectionBy.js create mode 100644 npm-package/intersectionWith.js create mode 100644 npm-package/invert.js create mode 100644 npm-package/invertBy.js create mode 100644 npm-package/invoke.js create mode 100644 npm-package/invokeMap.js create mode 100644 npm-package/isArguments.js create mode 100644 npm-package/isArray.js create mode 100644 npm-package/isArrayBuffer.js create mode 100644 npm-package/isArrayLike.js create mode 100644 npm-package/isArrayLikeObject.js create mode 100644 npm-package/isBoolean.js create mode 100644 npm-package/isBuffer.js create mode 100644 npm-package/isDate.js create mode 100644 npm-package/isElement.js create mode 100644 npm-package/isEmpty.js create mode 100644 npm-package/isEqual.js create mode 100644 npm-package/isEqualWith.js create mode 100644 npm-package/isError.js create mode 100644 npm-package/isFinite.js create mode 100644 npm-package/isFunction.js create mode 100644 npm-package/isInteger.js create mode 100644 npm-package/isLength.js create mode 100644 npm-package/isMap.js create mode 100644 npm-package/isMatch.js create mode 100644 npm-package/isMatchWith.js create mode 100644 npm-package/isNaN.js create mode 100644 npm-package/isNative.js create mode 100644 npm-package/isNil.js create mode 100644 npm-package/isNull.js create mode 100644 npm-package/isNumber.js create mode 100644 npm-package/isObject.js create mode 100644 npm-package/isObjectLike.js create mode 100644 npm-package/isPlainObject.js create mode 100644 npm-package/isRegExp.js create mode 100644 npm-package/isSafeInteger.js create mode 100644 npm-package/isSet.js create mode 100644 npm-package/isString.js create mode 100644 npm-package/isSymbol.js create mode 100644 npm-package/isTypedArray.js create mode 100644 npm-package/isUndefined.js create mode 100644 npm-package/isWeakMap.js create mode 100644 npm-package/isWeakSet.js create mode 100644 npm-package/iteratee.js create mode 100644 npm-package/join.js create mode 100644 npm-package/kebabCase.js create mode 100644 npm-package/keyBy.js create mode 100644 npm-package/keys.js create mode 100644 npm-package/keysIn.js create mode 100644 npm-package/lang.js create mode 100644 npm-package/last.js create mode 100644 npm-package/lastIndexOf.js create mode 100644 npm-package/lodash.js create mode 100644 npm-package/lodash.min.js create mode 100644 npm-package/lowerCase.js create mode 100644 npm-package/lowerFirst.js create mode 100644 npm-package/lt.js create mode 100644 npm-package/lte.js create mode 100644 npm-package/map.js create mode 100644 npm-package/mapKeys.js create mode 100644 npm-package/mapValues.js create mode 100644 npm-package/matches.js create mode 100644 npm-package/matchesProperty.js create mode 100644 npm-package/math.js create mode 100644 npm-package/max.js create mode 100644 npm-package/maxBy.js create mode 100644 npm-package/mean.js create mode 100644 npm-package/meanBy.js create mode 100644 npm-package/memoize.js create mode 100644 npm-package/merge.js create mode 100644 npm-package/mergeWith.js create mode 100644 npm-package/method.js create mode 100644 npm-package/methodOf.js create mode 100644 npm-package/min.js create mode 100644 npm-package/minBy.js create mode 100644 npm-package/mixin.js create mode 100644 npm-package/multiply.js create mode 100644 npm-package/negate.js create mode 100644 npm-package/next.js create mode 100644 npm-package/noop.js create mode 100644 npm-package/now.js create mode 100644 npm-package/nth.js create mode 100644 npm-package/nthArg.js create mode 100644 npm-package/number.js create mode 100644 npm-package/object.js create mode 100644 npm-package/omit.js create mode 100644 npm-package/omitBy.js create mode 100644 npm-package/once.js create mode 100644 npm-package/orderBy.js create mode 100644 npm-package/over.js create mode 100644 npm-package/overArgs.js create mode 100644 npm-package/overEvery.js create mode 100644 npm-package/overSome.js create mode 100644 npm-package/package.json create mode 100644 npm-package/pad.js create mode 100644 npm-package/padEnd.js create mode 100644 npm-package/padStart.js create mode 100644 npm-package/parseInt.js create mode 100644 npm-package/partial.js create mode 100644 npm-package/partialRight.js create mode 100644 npm-package/partition.js create mode 100644 npm-package/pick.js create mode 100644 npm-package/pickBy.js create mode 100644 npm-package/plant.js create mode 100644 npm-package/property.js create mode 100644 npm-package/propertyOf.js create mode 100644 npm-package/pull.js create mode 100644 npm-package/pullAll.js create mode 100644 npm-package/pullAllBy.js create mode 100644 npm-package/pullAllWith.js create mode 100644 npm-package/pullAt.js create mode 100644 npm-package/random.js create mode 100644 npm-package/range.js create mode 100644 npm-package/rangeRight.js create mode 100644 npm-package/rearg.js create mode 100644 npm-package/reduce.js create mode 100644 npm-package/reduceRight.js create mode 100644 npm-package/reject.js create mode 100644 npm-package/remove.js create mode 100644 npm-package/repeat.js create mode 100644 npm-package/replace.js create mode 100644 npm-package/rest.js create mode 100644 npm-package/result.js create mode 100644 npm-package/reverse.js create mode 100644 npm-package/round.js create mode 100644 npm-package/sample.js create mode 100644 npm-package/sampleSize.js create mode 100644 npm-package/seq.js create mode 100644 npm-package/set.js create mode 100644 npm-package/setWith.js create mode 100644 npm-package/shuffle.js create mode 100644 npm-package/size.js create mode 100644 npm-package/slice.js create mode 100644 npm-package/snakeCase.js create mode 100644 npm-package/some.js create mode 100644 npm-package/sortBy.js create mode 100644 npm-package/sortedIndex.js create mode 100644 npm-package/sortedIndexBy.js create mode 100644 npm-package/sortedIndexOf.js create mode 100644 npm-package/sortedLastIndex.js create mode 100644 npm-package/sortedLastIndexBy.js create mode 100644 npm-package/sortedLastIndexOf.js create mode 100644 npm-package/sortedUniq.js create mode 100644 npm-package/sortedUniqBy.js create mode 100644 npm-package/split.js create mode 100644 npm-package/spread.js create mode 100644 npm-package/startCase.js create mode 100644 npm-package/startsWith.js create mode 100644 npm-package/string.js create mode 100644 npm-package/stubArray.js create mode 100644 npm-package/stubFalse.js create mode 100644 npm-package/stubObject.js create mode 100644 npm-package/stubString.js create mode 100644 npm-package/stubTrue.js create mode 100644 npm-package/subtract.js create mode 100644 npm-package/sum.js create mode 100644 npm-package/sumBy.js create mode 100644 npm-package/tail.js create mode 100644 npm-package/take.js create mode 100644 npm-package/takeRight.js create mode 100644 npm-package/takeRightWhile.js create mode 100644 npm-package/takeWhile.js create mode 100644 npm-package/tap.js create mode 100644 npm-package/template.js create mode 100644 npm-package/templateSettings.js create mode 100644 npm-package/throttle.js create mode 100644 npm-package/thru.js create mode 100644 npm-package/times.js create mode 100644 npm-package/toArray.js create mode 100644 npm-package/toFinite.js create mode 100644 npm-package/toInteger.js create mode 100644 npm-package/toIterator.js create mode 100644 npm-package/toJSON.js create mode 100644 npm-package/toLength.js create mode 100644 npm-package/toLower.js create mode 100644 npm-package/toNumber.js create mode 100644 npm-package/toPairs.js create mode 100644 npm-package/toPairsIn.js create mode 100644 npm-package/toPath.js create mode 100644 npm-package/toPlainObject.js create mode 100644 npm-package/toSafeInteger.js create mode 100644 npm-package/toString.js create mode 100644 npm-package/toUpper.js create mode 100644 npm-package/transform.js create mode 100644 npm-package/trim.js create mode 100644 npm-package/trimEnd.js create mode 100644 npm-package/trimStart.js create mode 100644 npm-package/truncate.js create mode 100644 npm-package/unary.js create mode 100644 npm-package/unescape.js create mode 100644 npm-package/union.js create mode 100644 npm-package/unionBy.js create mode 100644 npm-package/unionWith.js create mode 100644 npm-package/uniq.js create mode 100644 npm-package/uniqBy.js create mode 100644 npm-package/uniqWith.js create mode 100644 npm-package/uniqueId.js create mode 100644 npm-package/unset.js create mode 100644 npm-package/unzip.js create mode 100644 npm-package/unzipWith.js create mode 100644 npm-package/update.js create mode 100644 npm-package/updateWith.js create mode 100644 npm-package/upperCase.js create mode 100644 npm-package/upperFirst.js create mode 100644 npm-package/util.js create mode 100644 npm-package/value.js create mode 100644 npm-package/valueOf.js create mode 100644 npm-package/values.js create mode 100644 npm-package/valuesIn.js create mode 100644 npm-package/without.js create mode 100644 npm-package/words.js create mode 100644 npm-package/wrap.js create mode 100644 npm-package/wrapperAt.js create mode 100644 npm-package/wrapperChain.js create mode 100644 npm-package/wrapperLodash.js create mode 100644 npm-package/wrapperReverse.js create mode 100644 npm-package/wrapperValue.js create mode 100644 npm-package/xor.js create mode 100644 npm-package/xorBy.js create mode 100644 npm-package/xorWith.js create mode 100644 npm-package/zip.js create mode 100644 npm-package/zipObject.js create mode 100644 npm-package/zipObjectDeep.js create mode 100644 npm-package/zipWith.js diff --git a/npm-package/README.md b/npm-package/README.md new file mode 100644 index 0000000000..729579e56e --- /dev/null +++ b/npm-package/README.md @@ -0,0 +1,39 @@ +# lodash v4.17.18 + +The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. + +## Installation + +Using npm: +```shell +$ npm i -g npm +$ npm i --save lodash +``` + +In Node.js: +```js +// Load the full build. +var _ = require('lodash'); +// Load the core build. +var _ = require('lodash/core'); +// Load the FP build for immutable auto-curried iteratee-first data-last methods. +var fp = require('lodash/fp'); + +// Load method categories. +var array = require('lodash/array'); +var object = require('lodash/fp/object'); + +// Cherry-pick methods for smaller browserify/rollup/webpack bundles. +var at = require('lodash/at'); +var curryN = require('lodash/fp/curryN'); +``` + +See the [package source](https://github.com/lodash/lodash/tree/4.17.18-npm) for more details. + +**Note:**
+Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. + +## Support + +Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.
+Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/npm-package/_DataView.js b/npm-package/_DataView.js new file mode 100644 index 0000000000..ac2d57ca67 --- /dev/null +++ b/npm-package/_DataView.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'); + +module.exports = DataView; diff --git a/npm-package/_Hash.js b/npm-package/_Hash.js new file mode 100644 index 0000000000..b504fe3407 --- /dev/null +++ b/npm-package/_Hash.js @@ -0,0 +1,32 @@ +var hashClear = require('./_hashClear'), + hashDelete = require('./_hashDelete'), + hashGet = require('./_hashGet'), + hashHas = require('./_hashHas'), + hashSet = require('./_hashSet'); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +module.exports = Hash; diff --git a/npm-package/_LazyWrapper.js b/npm-package/_LazyWrapper.js new file mode 100644 index 0000000000..81786c7f1e --- /dev/null +++ b/npm-package/_LazyWrapper.js @@ -0,0 +1,28 @@ +var baseCreate = require('./_baseCreate'), + baseLodash = require('./_baseLodash'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295; + +/** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ +function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; +} + +// Ensure `LazyWrapper` is an instance of `baseLodash`. +LazyWrapper.prototype = baseCreate(baseLodash.prototype); +LazyWrapper.prototype.constructor = LazyWrapper; + +module.exports = LazyWrapper; diff --git a/npm-package/_ListCache.js b/npm-package/_ListCache.js new file mode 100644 index 0000000000..26895c3a8d --- /dev/null +++ b/npm-package/_ListCache.js @@ -0,0 +1,32 @@ +var listCacheClear = require('./_listCacheClear'), + listCacheDelete = require('./_listCacheDelete'), + listCacheGet = require('./_listCacheGet'), + listCacheHas = require('./_listCacheHas'), + listCacheSet = require('./_listCacheSet'); + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +module.exports = ListCache; diff --git a/npm-package/_LodashWrapper.js b/npm-package/_LodashWrapper.js new file mode 100644 index 0000000000..c1e4d9df76 --- /dev/null +++ b/npm-package/_LodashWrapper.js @@ -0,0 +1,22 @@ +var baseCreate = require('./_baseCreate'), + baseLodash = require('./_baseLodash'); + +/** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ +function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; +} + +LodashWrapper.prototype = baseCreate(baseLodash.prototype); +LodashWrapper.prototype.constructor = LodashWrapper; + +module.exports = LodashWrapper; diff --git a/npm-package/_Map.js b/npm-package/_Map.js new file mode 100644 index 0000000000..b73f29a0f9 --- /dev/null +++ b/npm-package/_Map.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'); + +module.exports = Map; diff --git a/npm-package/_MapCache.js b/npm-package/_MapCache.js new file mode 100644 index 0000000000..4a4eea7bf9 --- /dev/null +++ b/npm-package/_MapCache.js @@ -0,0 +1,32 @@ +var mapCacheClear = require('./_mapCacheClear'), + mapCacheDelete = require('./_mapCacheDelete'), + mapCacheGet = require('./_mapCacheGet'), + mapCacheHas = require('./_mapCacheHas'), + mapCacheSet = require('./_mapCacheSet'); + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +module.exports = MapCache; diff --git a/npm-package/_Promise.js b/npm-package/_Promise.js new file mode 100644 index 0000000000..247b9e1bac --- /dev/null +++ b/npm-package/_Promise.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Promise = getNative(root, 'Promise'); + +module.exports = Promise; diff --git a/npm-package/_Set.js b/npm-package/_Set.js new file mode 100644 index 0000000000..b3c8dcbf03 --- /dev/null +++ b/npm-package/_Set.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Set = getNative(root, 'Set'); + +module.exports = Set; diff --git a/npm-package/_SetCache.js b/npm-package/_SetCache.js new file mode 100644 index 0000000000..6468b0647f --- /dev/null +++ b/npm-package/_SetCache.js @@ -0,0 +1,27 @@ +var MapCache = require('./_MapCache'), + setCacheAdd = require('./_setCacheAdd'), + setCacheHas = require('./_setCacheHas'); + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +module.exports = SetCache; diff --git a/npm-package/_Stack.js b/npm-package/_Stack.js new file mode 100644 index 0000000000..80b2cf1b0c --- /dev/null +++ b/npm-package/_Stack.js @@ -0,0 +1,27 @@ +var ListCache = require('./_ListCache'), + stackClear = require('./_stackClear'), + stackDelete = require('./_stackDelete'), + stackGet = require('./_stackGet'), + stackHas = require('./_stackHas'), + stackSet = require('./_stackSet'); + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +module.exports = Stack; diff --git a/npm-package/_Symbol.js b/npm-package/_Symbol.js new file mode 100644 index 0000000000..a013f7c5b7 --- /dev/null +++ b/npm-package/_Symbol.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; diff --git a/npm-package/_Uint8Array.js b/npm-package/_Uint8Array.js new file mode 100644 index 0000000000..2fb30e1573 --- /dev/null +++ b/npm-package/_Uint8Array.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Built-in value references. */ +var Uint8Array = root.Uint8Array; + +module.exports = Uint8Array; diff --git a/npm-package/_WeakMap.js b/npm-package/_WeakMap.js new file mode 100644 index 0000000000..567f86c61e --- /dev/null +++ b/npm-package/_WeakMap.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var WeakMap = getNative(root, 'WeakMap'); + +module.exports = WeakMap; diff --git a/npm-package/_apply.js b/npm-package/_apply.js new file mode 100644 index 0000000000..36436dda50 --- /dev/null +++ b/npm-package/_apply.js @@ -0,0 +1,21 @@ +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +module.exports = apply; diff --git a/npm-package/_arrayAggregator.js b/npm-package/_arrayAggregator.js new file mode 100644 index 0000000000..d96c3ca47c --- /dev/null +++ b/npm-package/_arrayAggregator.js @@ -0,0 +1,22 @@ +/** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; +} + +module.exports = arrayAggregator; diff --git a/npm-package/_arrayEach.js b/npm-package/_arrayEach.js new file mode 100644 index 0000000000..2c5f579688 --- /dev/null +++ b/npm-package/_arrayEach.js @@ -0,0 +1,22 @@ +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEach; diff --git a/npm-package/_arrayEachRight.js b/npm-package/_arrayEachRight.js new file mode 100644 index 0000000000..976ca5c29b --- /dev/null +++ b/npm-package/_arrayEachRight.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEachRight; diff --git a/npm-package/_arrayEvery.js b/npm-package/_arrayEvery.js new file mode 100644 index 0000000000..e26a918450 --- /dev/null +++ b/npm-package/_arrayEvery.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ +function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; +} + +module.exports = arrayEvery; diff --git a/npm-package/_arrayFilter.js b/npm-package/_arrayFilter.js new file mode 100644 index 0000000000..75ea254459 --- /dev/null +++ b/npm-package/_arrayFilter.js @@ -0,0 +1,25 @@ +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +module.exports = arrayFilter; diff --git a/npm-package/_arrayIncludes.js b/npm-package/_arrayIncludes.js new file mode 100644 index 0000000000..3737a6d9eb --- /dev/null +++ b/npm-package/_arrayIncludes.js @@ -0,0 +1,17 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; +} + +module.exports = arrayIncludes; diff --git a/npm-package/_arrayIncludesWith.js b/npm-package/_arrayIncludesWith.js new file mode 100644 index 0000000000..235fd97580 --- /dev/null +++ b/npm-package/_arrayIncludesWith.js @@ -0,0 +1,22 @@ +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +module.exports = arrayIncludesWith; diff --git a/npm-package/_arrayLikeKeys.js b/npm-package/_arrayLikeKeys.js new file mode 100644 index 0000000000..b2ec9ce786 --- /dev/null +++ b/npm-package/_arrayLikeKeys.js @@ -0,0 +1,49 @@ +var baseTimes = require('./_baseTimes'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isIndex = require('./_isIndex'), + isTypedArray = require('./isTypedArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +module.exports = arrayLikeKeys; diff --git a/npm-package/_arrayMap.js b/npm-package/_arrayMap.js new file mode 100644 index 0000000000..22b22464e2 --- /dev/null +++ b/npm-package/_arrayMap.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +module.exports = arrayMap; diff --git a/npm-package/_arrayPush.js b/npm-package/_arrayPush.js new file mode 100644 index 0000000000..7d742b383e --- /dev/null +++ b/npm-package/_arrayPush.js @@ -0,0 +1,20 @@ +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +module.exports = arrayPush; diff --git a/npm-package/_arrayReduce.js b/npm-package/_arrayReduce.js new file mode 100644 index 0000000000..de8b79b287 --- /dev/null +++ b/npm-package/_arrayReduce.js @@ -0,0 +1,26 @@ +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +module.exports = arrayReduce; diff --git a/npm-package/_arrayReduceRight.js b/npm-package/_arrayReduceRight.js new file mode 100644 index 0000000000..22d8976deb --- /dev/null +++ b/npm-package/_arrayReduceRight.js @@ -0,0 +1,24 @@ +/** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; +} + +module.exports = arrayReduceRight; diff --git a/npm-package/_arraySample.js b/npm-package/_arraySample.js new file mode 100644 index 0000000000..fcab0105e8 --- /dev/null +++ b/npm-package/_arraySample.js @@ -0,0 +1,15 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ +function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; +} + +module.exports = arraySample; diff --git a/npm-package/_arraySampleSize.js b/npm-package/_arraySampleSize.js new file mode 100644 index 0000000000..8c7e364f51 --- /dev/null +++ b/npm-package/_arraySampleSize.js @@ -0,0 +1,17 @@ +var baseClamp = require('./_baseClamp'), + copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); +} + +module.exports = arraySampleSize; diff --git a/npm-package/_arrayShuffle.js b/npm-package/_arrayShuffle.js new file mode 100644 index 0000000000..46313a39b7 --- /dev/null +++ b/npm-package/_arrayShuffle.js @@ -0,0 +1,15 @@ +var copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); +} + +module.exports = arrayShuffle; diff --git a/npm-package/_arraySome.js b/npm-package/_arraySome.js new file mode 100644 index 0000000000..6fd02fd4ae --- /dev/null +++ b/npm-package/_arraySome.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +module.exports = arraySome; diff --git a/npm-package/_asciiSize.js b/npm-package/_asciiSize.js new file mode 100644 index 0000000000..11d29c33ad --- /dev/null +++ b/npm-package/_asciiSize.js @@ -0,0 +1,12 @@ +var baseProperty = require('./_baseProperty'); + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = baseProperty('length'); + +module.exports = asciiSize; diff --git a/npm-package/_asciiToArray.js b/npm-package/_asciiToArray.js new file mode 100644 index 0000000000..8e3dd5b47f --- /dev/null +++ b/npm-package/_asciiToArray.js @@ -0,0 +1,12 @@ +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +module.exports = asciiToArray; diff --git a/npm-package/_asciiWords.js b/npm-package/_asciiWords.js new file mode 100644 index 0000000000..d765f0f763 --- /dev/null +++ b/npm-package/_asciiWords.js @@ -0,0 +1,15 @@ +/** Used to match words composed of alphanumeric characters. */ +var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + +/** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function asciiWords(string) { + return string.match(reAsciiWord) || []; +} + +module.exports = asciiWords; diff --git a/npm-package/_assignMergeValue.js b/npm-package/_assignMergeValue.js new file mode 100644 index 0000000000..cb1185e992 --- /dev/null +++ b/npm-package/_assignMergeValue.js @@ -0,0 +1,20 @@ +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignMergeValue; diff --git a/npm-package/_assignValue.js b/npm-package/_assignValue.js new file mode 100644 index 0000000000..40839575b5 --- /dev/null +++ b/npm-package/_assignValue.js @@ -0,0 +1,28 @@ +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignValue; diff --git a/npm-package/_assocIndexOf.js b/npm-package/_assocIndexOf.js new file mode 100644 index 0000000000..5b77a2bdd3 --- /dev/null +++ b/npm-package/_assocIndexOf.js @@ -0,0 +1,21 @@ +var eq = require('./eq'); + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +module.exports = assocIndexOf; diff --git a/npm-package/_baseAggregator.js b/npm-package/_baseAggregator.js new file mode 100644 index 0000000000..4bc9e91f41 --- /dev/null +++ b/npm-package/_baseAggregator.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; +} + +module.exports = baseAggregator; diff --git a/npm-package/_baseAssign.js b/npm-package/_baseAssign.js new file mode 100644 index 0000000000..e5c4a1a5b0 --- /dev/null +++ b/npm-package/_baseAssign.js @@ -0,0 +1,17 @@ +var copyObject = require('./_copyObject'), + keys = require('./keys'); + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +module.exports = baseAssign; diff --git a/npm-package/_baseAssignIn.js b/npm-package/_baseAssignIn.js new file mode 100644 index 0000000000..6624f90067 --- /dev/null +++ b/npm-package/_baseAssignIn.js @@ -0,0 +1,17 @@ +var copyObject = require('./_copyObject'), + keysIn = require('./keysIn'); + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); +} + +module.exports = baseAssignIn; diff --git a/npm-package/_baseAssignValue.js b/npm-package/_baseAssignValue.js new file mode 100644 index 0000000000..d6f66ef3a5 --- /dev/null +++ b/npm-package/_baseAssignValue.js @@ -0,0 +1,25 @@ +var defineProperty = require('./_defineProperty'); + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +module.exports = baseAssignValue; diff --git a/npm-package/_baseAt.js b/npm-package/_baseAt.js new file mode 100644 index 0000000000..90e4237a06 --- /dev/null +++ b/npm-package/_baseAt.js @@ -0,0 +1,23 @@ +var get = require('./get'); + +/** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ +function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; +} + +module.exports = baseAt; diff --git a/npm-package/_baseClamp.js b/npm-package/_baseClamp.js new file mode 100644 index 0000000000..a1c5692927 --- /dev/null +++ b/npm-package/_baseClamp.js @@ -0,0 +1,22 @@ +/** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ +function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; +} + +module.exports = baseClamp; diff --git a/npm-package/_baseClone.js b/npm-package/_baseClone.js new file mode 100644 index 0000000000..290de9275d --- /dev/null +++ b/npm-package/_baseClone.js @@ -0,0 +1,165 @@ +var Stack = require('./_Stack'), + arrayEach = require('./_arrayEach'), + assignValue = require('./_assignValue'), + baseAssign = require('./_baseAssign'), + baseAssignIn = require('./_baseAssignIn'), + cloneBuffer = require('./_cloneBuffer'), + copyArray = require('./_copyArray'), + copySymbols = require('./_copySymbols'), + copySymbolsIn = require('./_copySymbolsIn'), + getAllKeys = require('./_getAllKeys'), + getAllKeysIn = require('./_getAllKeysIn'), + getTag = require('./_getTag'), + initCloneArray = require('./_initCloneArray'), + initCloneByTag = require('./_initCloneByTag'), + initCloneObject = require('./_initCloneObject'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isMap = require('./isMap'), + isObject = require('./isObject'), + isSet = require('./isSet'), + keys = require('./keys'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +module.exports = baseClone; diff --git a/npm-package/_baseConforms.js b/npm-package/_baseConforms.js new file mode 100644 index 0000000000..947e20d409 --- /dev/null +++ b/npm-package/_baseConforms.js @@ -0,0 +1,18 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ +function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; +} + +module.exports = baseConforms; diff --git a/npm-package/_baseConformsTo.js b/npm-package/_baseConformsTo.js new file mode 100644 index 0000000000..e449cb84bd --- /dev/null +++ b/npm-package/_baseConformsTo.js @@ -0,0 +1,27 @@ +/** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ +function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; +} + +module.exports = baseConformsTo; diff --git a/npm-package/_baseCreate.js b/npm-package/_baseCreate.js new file mode 100644 index 0000000000..ffa6a52acd --- /dev/null +++ b/npm-package/_baseCreate.js @@ -0,0 +1,30 @@ +var isObject = require('./isObject'); + +/** Built-in value references. */ +var objectCreate = Object.create; + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +module.exports = baseCreate; diff --git a/npm-package/_baseDelay.js b/npm-package/_baseDelay.js new file mode 100644 index 0000000000..1486d697e3 --- /dev/null +++ b/npm-package/_baseDelay.js @@ -0,0 +1,21 @@ +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ +function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); +} + +module.exports = baseDelay; diff --git a/npm-package/_baseDifference.js b/npm-package/_baseDifference.js new file mode 100644 index 0000000000..343ac19f02 --- /dev/null +++ b/npm-package/_baseDifference.js @@ -0,0 +1,67 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + arrayMap = require('./_arrayMap'), + baseUnary = require('./_baseUnary'), + cacheHas = require('./_cacheHas'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ +function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; +} + +module.exports = baseDifference; diff --git a/npm-package/_baseEach.js b/npm-package/_baseEach.js new file mode 100644 index 0000000000..512c067682 --- /dev/null +++ b/npm-package/_baseEach.js @@ -0,0 +1,14 @@ +var baseForOwn = require('./_baseForOwn'), + createBaseEach = require('./_createBaseEach'); + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = createBaseEach(baseForOwn); + +module.exports = baseEach; diff --git a/npm-package/_baseEachRight.js b/npm-package/_baseEachRight.js new file mode 100644 index 0000000000..0a8feeca44 --- /dev/null +++ b/npm-package/_baseEachRight.js @@ -0,0 +1,14 @@ +var baseForOwnRight = require('./_baseForOwnRight'), + createBaseEach = require('./_createBaseEach'); + +/** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEachRight = createBaseEach(baseForOwnRight, true); + +module.exports = baseEachRight; diff --git a/npm-package/_baseEvery.js b/npm-package/_baseEvery.js new file mode 100644 index 0000000000..fa52f7bc7d --- /dev/null +++ b/npm-package/_baseEvery.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ +function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; +} + +module.exports = baseEvery; diff --git a/npm-package/_baseExtremum.js b/npm-package/_baseExtremum.js new file mode 100644 index 0000000000..9d6aa77edb --- /dev/null +++ b/npm-package/_baseExtremum.js @@ -0,0 +1,32 @@ +var isSymbol = require('./isSymbol'); + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +module.exports = baseExtremum; diff --git a/npm-package/_baseFill.js b/npm-package/_baseFill.js new file mode 100644 index 0000000000..46ef9c761a --- /dev/null +++ b/npm-package/_baseFill.js @@ -0,0 +1,32 @@ +var toInteger = require('./toInteger'), + toLength = require('./toLength'); + +/** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ +function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; +} + +module.exports = baseFill; diff --git a/npm-package/_baseFilter.js b/npm-package/_baseFilter.js new file mode 100644 index 0000000000..467847736a --- /dev/null +++ b/npm-package/_baseFilter.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; +} + +module.exports = baseFilter; diff --git a/npm-package/_baseFindIndex.js b/npm-package/_baseFindIndex.js new file mode 100644 index 0000000000..e3f5d8aa2b --- /dev/null +++ b/npm-package/_baseFindIndex.js @@ -0,0 +1,24 @@ +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +module.exports = baseFindIndex; diff --git a/npm-package/_baseFindKey.js b/npm-package/_baseFindKey.js new file mode 100644 index 0000000000..2e430f3a21 --- /dev/null +++ b/npm-package/_baseFindKey.js @@ -0,0 +1,23 @@ +/** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ +function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; +} + +module.exports = baseFindKey; diff --git a/npm-package/_baseFlatten.js b/npm-package/_baseFlatten.js new file mode 100644 index 0000000000..4b1e009b15 --- /dev/null +++ b/npm-package/_baseFlatten.js @@ -0,0 +1,38 @@ +var arrayPush = require('./_arrayPush'), + isFlattenable = require('./_isFlattenable'); + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +module.exports = baseFlatten; diff --git a/npm-package/_baseFor.js b/npm-package/_baseFor.js new file mode 100644 index 0000000000..d946590f8a --- /dev/null +++ b/npm-package/_baseFor.js @@ -0,0 +1,16 @@ +var createBaseFor = require('./_createBaseFor'); + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; diff --git a/npm-package/_baseForOwn.js b/npm-package/_baseForOwn.js new file mode 100644 index 0000000000..503d523441 --- /dev/null +++ b/npm-package/_baseForOwn.js @@ -0,0 +1,16 @@ +var baseFor = require('./_baseFor'), + keys = require('./keys'); + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); +} + +module.exports = baseForOwn; diff --git a/npm-package/_baseForOwnRight.js b/npm-package/_baseForOwnRight.js new file mode 100644 index 0000000000..a4b10e6c59 --- /dev/null +++ b/npm-package/_baseForOwnRight.js @@ -0,0 +1,16 @@ +var baseForRight = require('./_baseForRight'), + keys = require('./keys'); + +/** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); +} + +module.exports = baseForOwnRight; diff --git a/npm-package/_baseForRight.js b/npm-package/_baseForRight.js new file mode 100644 index 0000000000..32842cd817 --- /dev/null +++ b/npm-package/_baseForRight.js @@ -0,0 +1,15 @@ +var createBaseFor = require('./_createBaseFor'); + +/** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseForRight = createBaseFor(true); + +module.exports = baseForRight; diff --git a/npm-package/_baseFunctions.js b/npm-package/_baseFunctions.js new file mode 100644 index 0000000000..d23bc9b475 --- /dev/null +++ b/npm-package/_baseFunctions.js @@ -0,0 +1,19 @@ +var arrayFilter = require('./_arrayFilter'), + isFunction = require('./isFunction'); + +/** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ +function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); +} + +module.exports = baseFunctions; diff --git a/npm-package/_baseGet.js b/npm-package/_baseGet.js new file mode 100644 index 0000000000..a194913d21 --- /dev/null +++ b/npm-package/_baseGet.js @@ -0,0 +1,24 @@ +var castPath = require('./_castPath'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; diff --git a/npm-package/_baseGetAllKeys.js b/npm-package/_baseGetAllKeys.js new file mode 100644 index 0000000000..8ad204ea41 --- /dev/null +++ b/npm-package/_baseGetAllKeys.js @@ -0,0 +1,20 @@ +var arrayPush = require('./_arrayPush'), + isArray = require('./isArray'); + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +module.exports = baseGetAllKeys; diff --git a/npm-package/_baseGetTag.js b/npm-package/_baseGetTag.js new file mode 100644 index 0000000000..b927ccc172 --- /dev/null +++ b/npm-package/_baseGetTag.js @@ -0,0 +1,28 @@ +var Symbol = require('./_Symbol'), + getRawTag = require('./_getRawTag'), + objectToString = require('./_objectToString'); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; diff --git a/npm-package/_baseGt.js b/npm-package/_baseGt.js new file mode 100644 index 0000000000..502d273ca8 --- /dev/null +++ b/npm-package/_baseGt.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +module.exports = baseGt; diff --git a/npm-package/_baseHas.js b/npm-package/_baseHas.js new file mode 100644 index 0000000000..1b730321c2 --- /dev/null +++ b/npm-package/_baseHas.js @@ -0,0 +1,19 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); +} + +module.exports = baseHas; diff --git a/npm-package/_baseHasIn.js b/npm-package/_baseHasIn.js new file mode 100644 index 0000000000..2e0d04269f --- /dev/null +++ b/npm-package/_baseHasIn.js @@ -0,0 +1,13 @@ +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +module.exports = baseHasIn; diff --git a/npm-package/_baseInRange.js b/npm-package/_baseInRange.js new file mode 100644 index 0000000000..ec95666187 --- /dev/null +++ b/npm-package/_baseInRange.js @@ -0,0 +1,18 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ +function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); +} + +module.exports = baseInRange; diff --git a/npm-package/_baseIndexOf.js b/npm-package/_baseIndexOf.js new file mode 100644 index 0000000000..167e706e79 --- /dev/null +++ b/npm-package/_baseIndexOf.js @@ -0,0 +1,20 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictIndexOf = require('./_strictIndexOf'); + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); +} + +module.exports = baseIndexOf; diff --git a/npm-package/_baseIndexOfWith.js b/npm-package/_baseIndexOfWith.js new file mode 100644 index 0000000000..f815fe0dda --- /dev/null +++ b/npm-package/_baseIndexOfWith.js @@ -0,0 +1,23 @@ +/** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; +} + +module.exports = baseIndexOfWith; diff --git a/npm-package/_baseIntersection.js b/npm-package/_baseIntersection.js new file mode 100644 index 0000000000..c1d250c2aa --- /dev/null +++ b/npm-package/_baseIntersection.js @@ -0,0 +1,74 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + arrayMap = require('./_arrayMap'), + baseUnary = require('./_baseUnary'), + cacheHas = require('./_cacheHas'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ +function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +module.exports = baseIntersection; diff --git a/npm-package/_baseInverter.js b/npm-package/_baseInverter.js new file mode 100644 index 0000000000..fbc337f01e --- /dev/null +++ b/npm-package/_baseInverter.js @@ -0,0 +1,21 @@ +var baseForOwn = require('./_baseForOwn'); + +/** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ +function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; +} + +module.exports = baseInverter; diff --git a/npm-package/_baseInvoke.js b/npm-package/_baseInvoke.js new file mode 100644 index 0000000000..49bcf3c353 --- /dev/null +++ b/npm-package/_baseInvoke.js @@ -0,0 +1,24 @@ +var apply = require('./_apply'), + castPath = require('./_castPath'), + last = require('./last'), + parent = require('./_parent'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ +function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); +} + +module.exports = baseInvoke; diff --git a/npm-package/_baseIsArguments.js b/npm-package/_baseIsArguments.js new file mode 100644 index 0000000000..b3562cca2c --- /dev/null +++ b/npm-package/_baseIsArguments.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +module.exports = baseIsArguments; diff --git a/npm-package/_baseIsArrayBuffer.js b/npm-package/_baseIsArrayBuffer.js new file mode 100644 index 0000000000..a2c4f30a82 --- /dev/null +++ b/npm-package/_baseIsArrayBuffer.js @@ -0,0 +1,17 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +var arrayBufferTag = '[object ArrayBuffer]'; + +/** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ +function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; +} + +module.exports = baseIsArrayBuffer; diff --git a/npm-package/_baseIsDate.js b/npm-package/_baseIsDate.js new file mode 100644 index 0000000000..ba67c7857f --- /dev/null +++ b/npm-package/_baseIsDate.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var dateTag = '[object Date]'; + +/** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ +function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; +} + +module.exports = baseIsDate; diff --git a/npm-package/_baseIsEqual.js b/npm-package/_baseIsEqual.js new file mode 100644 index 0000000000..00a68a4f51 --- /dev/null +++ b/npm-package/_baseIsEqual.js @@ -0,0 +1,28 @@ +var baseIsEqualDeep = require('./_baseIsEqualDeep'), + isObjectLike = require('./isObjectLike'); + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +module.exports = baseIsEqual; diff --git a/npm-package/_baseIsEqualDeep.js b/npm-package/_baseIsEqualDeep.js new file mode 100644 index 0000000000..e3cfd6a8d0 --- /dev/null +++ b/npm-package/_baseIsEqualDeep.js @@ -0,0 +1,83 @@ +var Stack = require('./_Stack'), + equalArrays = require('./_equalArrays'), + equalByTag = require('./_equalByTag'), + equalObjects = require('./_equalObjects'), + getTag = require('./_getTag'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isTypedArray = require('./isTypedArray'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +module.exports = baseIsEqualDeep; diff --git a/npm-package/_baseIsMap.js b/npm-package/_baseIsMap.js new file mode 100644 index 0000000000..02a4021cab --- /dev/null +++ b/npm-package/_baseIsMap.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; +} + +module.exports = baseIsMap; diff --git a/npm-package/_baseIsMatch.js b/npm-package/_baseIsMatch.js new file mode 100644 index 0000000000..72494bed40 --- /dev/null +++ b/npm-package/_baseIsMatch.js @@ -0,0 +1,62 @@ +var Stack = require('./_Stack'), + baseIsEqual = require('./_baseIsEqual'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +module.exports = baseIsMatch; diff --git a/npm-package/_baseIsNaN.js b/npm-package/_baseIsNaN.js new file mode 100644 index 0000000000..316f1eb1ef --- /dev/null +++ b/npm-package/_baseIsNaN.js @@ -0,0 +1,12 @@ +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +module.exports = baseIsNaN; diff --git a/npm-package/_baseIsNative.js b/npm-package/_baseIsNative.js new file mode 100644 index 0000000000..8702330495 --- /dev/null +++ b/npm-package/_baseIsNative.js @@ -0,0 +1,47 @@ +var isFunction = require('./isFunction'), + isMasked = require('./_isMasked'), + isObject = require('./isObject'), + toSource = require('./_toSource'); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +module.exports = baseIsNative; diff --git a/npm-package/_baseIsRegExp.js b/npm-package/_baseIsRegExp.js new file mode 100644 index 0000000000..6cd7c1aee7 --- /dev/null +++ b/npm-package/_baseIsRegExp.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var regexpTag = '[object RegExp]'; + +/** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ +function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; +} + +module.exports = baseIsRegExp; diff --git a/npm-package/_baseIsSet.js b/npm-package/_baseIsSet.js new file mode 100644 index 0000000000..6dee36716e --- /dev/null +++ b/npm-package/_baseIsSet.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; +} + +module.exports = baseIsSet; diff --git a/npm-package/_baseIsTypedArray.js b/npm-package/_baseIsTypedArray.js new file mode 100644 index 0000000000..1edb32ff3f --- /dev/null +++ b/npm-package/_baseIsTypedArray.js @@ -0,0 +1,60 @@ +var baseGetTag = require('./_baseGetTag'), + isLength = require('./isLength'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +module.exports = baseIsTypedArray; diff --git a/npm-package/_baseIteratee.js b/npm-package/_baseIteratee.js new file mode 100644 index 0000000000..995c257567 --- /dev/null +++ b/npm-package/_baseIteratee.js @@ -0,0 +1,31 @@ +var baseMatches = require('./_baseMatches'), + baseMatchesProperty = require('./_baseMatchesProperty'), + identity = require('./identity'), + isArray = require('./isArray'), + property = require('./property'); + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); +} + +module.exports = baseIteratee; diff --git a/npm-package/_baseKeys.js b/npm-package/_baseKeys.js new file mode 100644 index 0000000000..45e9e6f39f --- /dev/null +++ b/npm-package/_baseKeys.js @@ -0,0 +1,30 @@ +var isPrototype = require('./_isPrototype'), + nativeKeys = require('./_nativeKeys'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +module.exports = baseKeys; diff --git a/npm-package/_baseKeysIn.js b/npm-package/_baseKeysIn.js new file mode 100644 index 0000000000..ea8a0a1742 --- /dev/null +++ b/npm-package/_baseKeysIn.js @@ -0,0 +1,33 @@ +var isObject = require('./isObject'), + isPrototype = require('./_isPrototype'), + nativeKeysIn = require('./_nativeKeysIn'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = baseKeysIn; diff --git a/npm-package/_baseLodash.js b/npm-package/_baseLodash.js new file mode 100644 index 0000000000..f76c790e2e --- /dev/null +++ b/npm-package/_baseLodash.js @@ -0,0 +1,10 @@ +/** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ +function baseLodash() { + // No operation performed. +} + +module.exports = baseLodash; diff --git a/npm-package/_baseLt.js b/npm-package/_baseLt.js new file mode 100644 index 0000000000..8674d2946a --- /dev/null +++ b/npm-package/_baseLt.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +module.exports = baseLt; diff --git a/npm-package/_baseMap.js b/npm-package/_baseMap.js new file mode 100644 index 0000000000..0bf5cead5c --- /dev/null +++ b/npm-package/_baseMap.js @@ -0,0 +1,22 @@ +var baseEach = require('./_baseEach'), + isArrayLike = require('./isArrayLike'); + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +module.exports = baseMap; diff --git a/npm-package/_baseMatches.js b/npm-package/_baseMatches.js new file mode 100644 index 0000000000..e56582ad88 --- /dev/null +++ b/npm-package/_baseMatches.js @@ -0,0 +1,22 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'), + matchesStrictComparable = require('./_matchesStrictComparable'); + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; +} + +module.exports = baseMatches; diff --git a/npm-package/_baseMatchesProperty.js b/npm-package/_baseMatchesProperty.js new file mode 100644 index 0000000000..24afd893d2 --- /dev/null +++ b/npm-package/_baseMatchesProperty.js @@ -0,0 +1,33 @@ +var baseIsEqual = require('./_baseIsEqual'), + get = require('./get'), + hasIn = require('./hasIn'), + isKey = require('./_isKey'), + isStrictComparable = require('./_isStrictComparable'), + matchesStrictComparable = require('./_matchesStrictComparable'), + toKey = require('./_toKey'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; +} + +module.exports = baseMatchesProperty; diff --git a/npm-package/_baseMean.js b/npm-package/_baseMean.js new file mode 100644 index 0000000000..fa9e00a0a2 --- /dev/null +++ b/npm-package/_baseMean.js @@ -0,0 +1,20 @@ +var baseSum = require('./_baseSum'); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ +function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; +} + +module.exports = baseMean; diff --git a/npm-package/_baseMerge.js b/npm-package/_baseMerge.js new file mode 100644 index 0000000000..c98b5eb0b6 --- /dev/null +++ b/npm-package/_baseMerge.js @@ -0,0 +1,42 @@ +var Stack = require('./_Stack'), + assignMergeValue = require('./_assignMergeValue'), + baseFor = require('./_baseFor'), + baseMergeDeep = require('./_baseMergeDeep'), + isObject = require('./isObject'), + keysIn = require('./keysIn'), + safeGet = require('./_safeGet'); + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); +} + +module.exports = baseMerge; diff --git a/npm-package/_baseMergeDeep.js b/npm-package/_baseMergeDeep.js new file mode 100644 index 0000000000..4679e8dce4 --- /dev/null +++ b/npm-package/_baseMergeDeep.js @@ -0,0 +1,94 @@ +var assignMergeValue = require('./_assignMergeValue'), + cloneBuffer = require('./_cloneBuffer'), + cloneTypedArray = require('./_cloneTypedArray'), + copyArray = require('./_copyArray'), + initCloneObject = require('./_initCloneObject'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLikeObject = require('./isArrayLikeObject'), + isBuffer = require('./isBuffer'), + isFunction = require('./isFunction'), + isObject = require('./isObject'), + isPlainObject = require('./isPlainObject'), + isTypedArray = require('./isTypedArray'), + safeGet = require('./_safeGet'), + toPlainObject = require('./toPlainObject'); + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} + +module.exports = baseMergeDeep; diff --git a/npm-package/_baseNth.js b/npm-package/_baseNth.js new file mode 100644 index 0000000000..0403c2a368 --- /dev/null +++ b/npm-package/_baseNth.js @@ -0,0 +1,20 @@ +var isIndex = require('./_isIndex'); + +/** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ +function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; +} + +module.exports = baseNth; diff --git a/npm-package/_baseOrderBy.js b/npm-package/_baseOrderBy.js new file mode 100644 index 0000000000..d8a46ab20a --- /dev/null +++ b/npm-package/_baseOrderBy.js @@ -0,0 +1,34 @@ +var arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseMap = require('./_baseMap'), + baseSortBy = require('./_baseSortBy'), + baseUnary = require('./_baseUnary'), + compareMultiple = require('./_compareMultiple'), + identity = require('./identity'); + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee)); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); +} + +module.exports = baseOrderBy; diff --git a/npm-package/_basePick.js b/npm-package/_basePick.js new file mode 100644 index 0000000000..09b458a600 --- /dev/null +++ b/npm-package/_basePick.js @@ -0,0 +1,19 @@ +var basePickBy = require('./_basePickBy'), + hasIn = require('./hasIn'); + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); +} + +module.exports = basePick; diff --git a/npm-package/_basePickBy.js b/npm-package/_basePickBy.js new file mode 100644 index 0000000000..85be68c84f --- /dev/null +++ b/npm-package/_basePickBy.js @@ -0,0 +1,30 @@ +var baseGet = require('./_baseGet'), + baseSet = require('./_baseSet'), + castPath = require('./_castPath'); + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; +} + +module.exports = basePickBy; diff --git a/npm-package/_baseProperty.js b/npm-package/_baseProperty.js new file mode 100644 index 0000000000..496281ec40 --- /dev/null +++ b/npm-package/_baseProperty.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = baseProperty; diff --git a/npm-package/_basePropertyDeep.js b/npm-package/_basePropertyDeep.js new file mode 100644 index 0000000000..1e5aae50c4 --- /dev/null +++ b/npm-package/_basePropertyDeep.js @@ -0,0 +1,16 @@ +var baseGet = require('./_baseGet'); + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; +} + +module.exports = basePropertyDeep; diff --git a/npm-package/_basePropertyOf.js b/npm-package/_basePropertyOf.js new file mode 100644 index 0000000000..4617399908 --- /dev/null +++ b/npm-package/_basePropertyOf.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = basePropertyOf; diff --git a/npm-package/_basePullAll.js b/npm-package/_basePullAll.js new file mode 100644 index 0000000000..305720edea --- /dev/null +++ b/npm-package/_basePullAll.js @@ -0,0 +1,51 @@ +var arrayMap = require('./_arrayMap'), + baseIndexOf = require('./_baseIndexOf'), + baseIndexOfWith = require('./_baseIndexOfWith'), + baseUnary = require('./_baseUnary'), + copyArray = require('./_copyArray'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ +function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; +} + +module.exports = basePullAll; diff --git a/npm-package/_basePullAt.js b/npm-package/_basePullAt.js new file mode 100644 index 0000000000..c3e9e71023 --- /dev/null +++ b/npm-package/_basePullAt.js @@ -0,0 +1,37 @@ +var baseUnset = require('./_baseUnset'), + isIndex = require('./_isIndex'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ +function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; +} + +module.exports = basePullAt; diff --git a/npm-package/_baseRandom.js b/npm-package/_baseRandom.js new file mode 100644 index 0000000000..94f76a7663 --- /dev/null +++ b/npm-package/_baseRandom.js @@ -0,0 +1,18 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeRandom = Math.random; + +/** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ +function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); +} + +module.exports = baseRandom; diff --git a/npm-package/_baseRange.js b/npm-package/_baseRange.js new file mode 100644 index 0000000000..0fb8e419fb --- /dev/null +++ b/npm-package/_baseRange.js @@ -0,0 +1,28 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +module.exports = baseRange; diff --git a/npm-package/_baseReduce.js b/npm-package/_baseReduce.js new file mode 100644 index 0000000000..5a1f8b57f1 --- /dev/null +++ b/npm-package/_baseReduce.js @@ -0,0 +1,23 @@ +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; +} + +module.exports = baseReduce; diff --git a/npm-package/_baseRepeat.js b/npm-package/_baseRepeat.js new file mode 100644 index 0000000000..ee44c31ab0 --- /dev/null +++ b/npm-package/_baseRepeat.js @@ -0,0 +1,35 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor; + +/** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ +function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; +} + +module.exports = baseRepeat; diff --git a/npm-package/_baseRest.js b/npm-package/_baseRest.js new file mode 100644 index 0000000000..d0dc4bdd1f --- /dev/null +++ b/npm-package/_baseRest.js @@ -0,0 +1,17 @@ +var identity = require('./identity'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); +} + +module.exports = baseRest; diff --git a/npm-package/_baseSample.js b/npm-package/_baseSample.js new file mode 100644 index 0000000000..58582b9112 --- /dev/null +++ b/npm-package/_baseSample.js @@ -0,0 +1,15 @@ +var arraySample = require('./_arraySample'), + values = require('./values'); + +/** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ +function baseSample(collection) { + return arraySample(values(collection)); +} + +module.exports = baseSample; diff --git a/npm-package/_baseSampleSize.js b/npm-package/_baseSampleSize.js new file mode 100644 index 0000000000..5c90ec5181 --- /dev/null +++ b/npm-package/_baseSampleSize.js @@ -0,0 +1,18 @@ +var baseClamp = require('./_baseClamp'), + shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); +} + +module.exports = baseSampleSize; diff --git a/npm-package/_baseSet.js b/npm-package/_baseSet.js new file mode 100644 index 0000000000..612a24cc85 --- /dev/null +++ b/npm-package/_baseSet.js @@ -0,0 +1,47 @@ +var assignValue = require('./_assignValue'), + castPath = require('./_castPath'), + isIndex = require('./_isIndex'), + isObject = require('./isObject'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +module.exports = baseSet; diff --git a/npm-package/_baseSetData.js b/npm-package/_baseSetData.js new file mode 100644 index 0000000000..c409947ddb --- /dev/null +++ b/npm-package/_baseSetData.js @@ -0,0 +1,17 @@ +var identity = require('./identity'), + metaMap = require('./_metaMap'); + +/** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ +var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; +}; + +module.exports = baseSetData; diff --git a/npm-package/_baseSetToString.js b/npm-package/_baseSetToString.js new file mode 100644 index 0000000000..89eaca38df --- /dev/null +++ b/npm-package/_baseSetToString.js @@ -0,0 +1,22 @@ +var constant = require('./constant'), + defineProperty = require('./_defineProperty'), + identity = require('./identity'); + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; + +module.exports = baseSetToString; diff --git a/npm-package/_baseShuffle.js b/npm-package/_baseShuffle.js new file mode 100644 index 0000000000..023077ac4e --- /dev/null +++ b/npm-package/_baseShuffle.js @@ -0,0 +1,15 @@ +var shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function baseShuffle(collection) { + return shuffleSelf(values(collection)); +} + +module.exports = baseShuffle; diff --git a/npm-package/_baseSlice.js b/npm-package/_baseSlice.js new file mode 100644 index 0000000000..786f6c99e9 --- /dev/null +++ b/npm-package/_baseSlice.js @@ -0,0 +1,31 @@ +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; diff --git a/npm-package/_baseSome.js b/npm-package/_baseSome.js new file mode 100644 index 0000000000..58f3f447a3 --- /dev/null +++ b/npm-package/_baseSome.js @@ -0,0 +1,22 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; +} + +module.exports = baseSome; diff --git a/npm-package/_baseSortBy.js b/npm-package/_baseSortBy.js new file mode 100644 index 0000000000..a25c92eda6 --- /dev/null +++ b/npm-package/_baseSortBy.js @@ -0,0 +1,21 @@ +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +module.exports = baseSortBy; diff --git a/npm-package/_baseSortedIndex.js b/npm-package/_baseSortedIndex.js new file mode 100644 index 0000000000..638c366c77 --- /dev/null +++ b/npm-package/_baseSortedIndex.js @@ -0,0 +1,42 @@ +var baseSortedIndexBy = require('./_baseSortedIndexBy'), + identity = require('./identity'), + isSymbol = require('./isSymbol'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + +/** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); +} + +module.exports = baseSortedIndex; diff --git a/npm-package/_baseSortedIndexBy.js b/npm-package/_baseSortedIndexBy.js new file mode 100644 index 0000000000..bb22e36dcd --- /dev/null +++ b/npm-package/_baseSortedIndexBy.js @@ -0,0 +1,64 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeMin = Math.min; + +/** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); +} + +module.exports = baseSortedIndexBy; diff --git a/npm-package/_baseSortedUniq.js b/npm-package/_baseSortedUniq.js new file mode 100644 index 0000000000..802159a3db --- /dev/null +++ b/npm-package/_baseSortedUniq.js @@ -0,0 +1,30 @@ +var eq = require('./eq'); + +/** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; +} + +module.exports = baseSortedUniq; diff --git a/npm-package/_baseSum.js b/npm-package/_baseSum.js new file mode 100644 index 0000000000..a9e84c13c9 --- /dev/null +++ b/npm-package/_baseSum.js @@ -0,0 +1,24 @@ +/** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ +function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; +} + +module.exports = baseSum; diff --git a/npm-package/_baseTimes.js b/npm-package/_baseTimes.js new file mode 100644 index 0000000000..0603fc37ea --- /dev/null +++ b/npm-package/_baseTimes.js @@ -0,0 +1,20 @@ +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +module.exports = baseTimes; diff --git a/npm-package/_baseToNumber.js b/npm-package/_baseToNumber.js new file mode 100644 index 0000000000..04859f391f --- /dev/null +++ b/npm-package/_baseToNumber.js @@ -0,0 +1,24 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ +function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; +} + +module.exports = baseToNumber; diff --git a/npm-package/_baseToPairs.js b/npm-package/_baseToPairs.js new file mode 100644 index 0000000000..bff199128f --- /dev/null +++ b/npm-package/_baseToPairs.js @@ -0,0 +1,18 @@ +var arrayMap = require('./_arrayMap'); + +/** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ +function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); +} + +module.exports = baseToPairs; diff --git a/npm-package/_baseToString.js b/npm-package/_baseToString.js new file mode 100644 index 0000000000..ada6ad298c --- /dev/null +++ b/npm-package/_baseToString.js @@ -0,0 +1,37 @@ +var Symbol = require('./_Symbol'), + arrayMap = require('./_arrayMap'), + isArray = require('./isArray'), + isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = baseToString; diff --git a/npm-package/_baseUnary.js b/npm-package/_baseUnary.js new file mode 100644 index 0000000000..98639e92f6 --- /dev/null +++ b/npm-package/_baseUnary.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +module.exports = baseUnary; diff --git a/npm-package/_baseUniq.js b/npm-package/_baseUniq.js new file mode 100644 index 0000000000..aea459dc71 --- /dev/null +++ b/npm-package/_baseUniq.js @@ -0,0 +1,72 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + cacheHas = require('./_cacheHas'), + createSet = require('./_createSet'), + setToArray = require('./_setToArray'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +module.exports = baseUniq; diff --git a/npm-package/_baseUnset.js b/npm-package/_baseUnset.js new file mode 100644 index 0000000000..eefc6e37d3 --- /dev/null +++ b/npm-package/_baseUnset.js @@ -0,0 +1,20 @@ +var castPath = require('./_castPath'), + last = require('./last'), + parent = require('./_parent'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ +function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; +} + +module.exports = baseUnset; diff --git a/npm-package/_baseUpdate.js b/npm-package/_baseUpdate.js new file mode 100644 index 0000000000..92a623777c --- /dev/null +++ b/npm-package/_baseUpdate.js @@ -0,0 +1,18 @@ +var baseGet = require('./_baseGet'), + baseSet = require('./_baseSet'); + +/** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); +} + +module.exports = baseUpdate; diff --git a/npm-package/_baseValues.js b/npm-package/_baseValues.js new file mode 100644 index 0000000000..b95faadcfe --- /dev/null +++ b/npm-package/_baseValues.js @@ -0,0 +1,19 @@ +var arrayMap = require('./_arrayMap'); + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); +} + +module.exports = baseValues; diff --git a/npm-package/_baseWhile.js b/npm-package/_baseWhile.js new file mode 100644 index 0000000000..07eac61b98 --- /dev/null +++ b/npm-package/_baseWhile.js @@ -0,0 +1,26 @@ +var baseSlice = require('./_baseSlice'); + +/** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ +function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); +} + +module.exports = baseWhile; diff --git a/npm-package/_baseWrapperValue.js b/npm-package/_baseWrapperValue.js new file mode 100644 index 0000000000..443e0df5e0 --- /dev/null +++ b/npm-package/_baseWrapperValue.js @@ -0,0 +1,25 @@ +var LazyWrapper = require('./_LazyWrapper'), + arrayPush = require('./_arrayPush'), + arrayReduce = require('./_arrayReduce'); + +/** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ +function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); +} + +module.exports = baseWrapperValue; diff --git a/npm-package/_baseXor.js b/npm-package/_baseXor.js new file mode 100644 index 0000000000..8e69338bf9 --- /dev/null +++ b/npm-package/_baseXor.js @@ -0,0 +1,36 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseUniq = require('./_baseUniq'); + +/** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ +function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); +} + +module.exports = baseXor; diff --git a/npm-package/_baseZipObject.js b/npm-package/_baseZipObject.js new file mode 100644 index 0000000000..401f85be20 --- /dev/null +++ b/npm-package/_baseZipObject.js @@ -0,0 +1,23 @@ +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; +} + +module.exports = baseZipObject; diff --git a/npm-package/_cacheHas.js b/npm-package/_cacheHas.js new file mode 100644 index 0000000000..2dec892689 --- /dev/null +++ b/npm-package/_cacheHas.js @@ -0,0 +1,13 @@ +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +module.exports = cacheHas; diff --git a/npm-package/_castArrayLikeObject.js b/npm-package/_castArrayLikeObject.js new file mode 100644 index 0000000000..92c75fa1a9 --- /dev/null +++ b/npm-package/_castArrayLikeObject.js @@ -0,0 +1,14 @@ +var isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ +function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; +} + +module.exports = castArrayLikeObject; diff --git a/npm-package/_castFunction.js b/npm-package/_castFunction.js new file mode 100644 index 0000000000..98c91ae637 --- /dev/null +++ b/npm-package/_castFunction.js @@ -0,0 +1,14 @@ +var identity = require('./identity'); + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : identity; +} + +module.exports = castFunction; diff --git a/npm-package/_castPath.js b/npm-package/_castPath.js new file mode 100644 index 0000000000..017e4c1b45 --- /dev/null +++ b/npm-package/_castPath.js @@ -0,0 +1,21 @@ +var isArray = require('./isArray'), + isKey = require('./_isKey'), + stringToPath = require('./_stringToPath'), + toString = require('./toString'); + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); +} + +module.exports = castPath; diff --git a/npm-package/_castRest.js b/npm-package/_castRest.js new file mode 100644 index 0000000000..213c66f19f --- /dev/null +++ b/npm-package/_castRest.js @@ -0,0 +1,14 @@ +var baseRest = require('./_baseRest'); + +/** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +var castRest = baseRest; + +module.exports = castRest; diff --git a/npm-package/_castSlice.js b/npm-package/_castSlice.js new file mode 100644 index 0000000000..071faeba52 --- /dev/null +++ b/npm-package/_castSlice.js @@ -0,0 +1,18 @@ +var baseSlice = require('./_baseSlice'); + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} + +module.exports = castSlice; diff --git a/npm-package/_charsEndIndex.js b/npm-package/_charsEndIndex.js new file mode 100644 index 0000000000..07908ff3aa --- /dev/null +++ b/npm-package/_charsEndIndex.js @@ -0,0 +1,19 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ +function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +module.exports = charsEndIndex; diff --git a/npm-package/_charsStartIndex.js b/npm-package/_charsStartIndex.js new file mode 100644 index 0000000000..b17afd2547 --- /dev/null +++ b/npm-package/_charsStartIndex.js @@ -0,0 +1,20 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ +function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +module.exports = charsStartIndex; diff --git a/npm-package/_cloneArrayBuffer.js b/npm-package/_cloneArrayBuffer.js new file mode 100644 index 0000000000..c3d8f6e39a --- /dev/null +++ b/npm-package/_cloneArrayBuffer.js @@ -0,0 +1,16 @@ +var Uint8Array = require('./_Uint8Array'); + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +module.exports = cloneArrayBuffer; diff --git a/npm-package/_cloneBuffer.js b/npm-package/_cloneBuffer.js new file mode 100644 index 0000000000..27c48109b4 --- /dev/null +++ b/npm-package/_cloneBuffer.js @@ -0,0 +1,35 @@ +var root = require('./_root'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; +} + +module.exports = cloneBuffer; diff --git a/npm-package/_cloneDataView.js b/npm-package/_cloneDataView.js new file mode 100644 index 0000000000..9c9b7b054d --- /dev/null +++ b/npm-package/_cloneDataView.js @@ -0,0 +1,16 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'); + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +module.exports = cloneDataView; diff --git a/npm-package/_cloneRegExp.js b/npm-package/_cloneRegExp.js new file mode 100644 index 0000000000..64a30dfb4a --- /dev/null +++ b/npm-package/_cloneRegExp.js @@ -0,0 +1,17 @@ +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +module.exports = cloneRegExp; diff --git a/npm-package/_cloneSymbol.js b/npm-package/_cloneSymbol.js new file mode 100644 index 0000000000..bede39f50a --- /dev/null +++ b/npm-package/_cloneSymbol.js @@ -0,0 +1,18 @@ +var Symbol = require('./_Symbol'); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +module.exports = cloneSymbol; diff --git a/npm-package/_cloneTypedArray.js b/npm-package/_cloneTypedArray.js new file mode 100644 index 0000000000..7aad84d4fe --- /dev/null +++ b/npm-package/_cloneTypedArray.js @@ -0,0 +1,16 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'); + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +module.exports = cloneTypedArray; diff --git a/npm-package/_compareAscending.js b/npm-package/_compareAscending.js new file mode 100644 index 0000000000..8dc2791088 --- /dev/null +++ b/npm-package/_compareAscending.js @@ -0,0 +1,41 @@ +var isSymbol = require('./isSymbol'); + +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +module.exports = compareAscending; diff --git a/npm-package/_compareMultiple.js b/npm-package/_compareMultiple.js new file mode 100644 index 0000000000..ad61f0fbca --- /dev/null +++ b/npm-package/_compareMultiple.js @@ -0,0 +1,44 @@ +var compareAscending = require('./_compareAscending'); + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +module.exports = compareMultiple; diff --git a/npm-package/_composeArgs.js b/npm-package/_composeArgs.js new file mode 100644 index 0000000000..1ce40f4f93 --- /dev/null +++ b/npm-package/_composeArgs.js @@ -0,0 +1,39 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; +} + +module.exports = composeArgs; diff --git a/npm-package/_composeArgsRight.js b/npm-package/_composeArgsRight.js new file mode 100644 index 0000000000..8dc588d0a9 --- /dev/null +++ b/npm-package/_composeArgsRight.js @@ -0,0 +1,41 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; +} + +module.exports = composeArgsRight; diff --git a/npm-package/_copyArray.js b/npm-package/_copyArray.js new file mode 100644 index 0000000000..cd94d5d09a --- /dev/null +++ b/npm-package/_copyArray.js @@ -0,0 +1,20 @@ +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +module.exports = copyArray; diff --git a/npm-package/_copyObject.js b/npm-package/_copyObject.js new file mode 100644 index 0000000000..2f2a5c23b7 --- /dev/null +++ b/npm-package/_copyObject.js @@ -0,0 +1,40 @@ +var assignValue = require('./_assignValue'), + baseAssignValue = require('./_baseAssignValue'); + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; +} + +module.exports = copyObject; diff --git a/npm-package/_copySymbols.js b/npm-package/_copySymbols.js new file mode 100644 index 0000000000..c35944ab5e --- /dev/null +++ b/npm-package/_copySymbols.js @@ -0,0 +1,16 @@ +var copyObject = require('./_copyObject'), + getSymbols = require('./_getSymbols'); + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +module.exports = copySymbols; diff --git a/npm-package/_copySymbolsIn.js b/npm-package/_copySymbolsIn.js new file mode 100644 index 0000000000..fdf20a73c2 --- /dev/null +++ b/npm-package/_copySymbolsIn.js @@ -0,0 +1,16 @@ +var copyObject = require('./_copyObject'), + getSymbolsIn = require('./_getSymbolsIn'); + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); +} + +module.exports = copySymbolsIn; diff --git a/npm-package/_coreJsData.js b/npm-package/_coreJsData.js new file mode 100644 index 0000000000..f8e5b4e349 --- /dev/null +++ b/npm-package/_coreJsData.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +module.exports = coreJsData; diff --git a/npm-package/_countHolders.js b/npm-package/_countHolders.js new file mode 100644 index 0000000000..718fcdaa8d --- /dev/null +++ b/npm-package/_countHolders.js @@ -0,0 +1,21 @@ +/** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ +function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; +} + +module.exports = countHolders; diff --git a/npm-package/_createAggregator.js b/npm-package/_createAggregator.js new file mode 100644 index 0000000000..0be42c41cd --- /dev/null +++ b/npm-package/_createAggregator.js @@ -0,0 +1,23 @@ +var arrayAggregator = require('./_arrayAggregator'), + baseAggregator = require('./_baseAggregator'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'); + +/** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ +function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, baseIteratee(iteratee, 2), accumulator); + }; +} + +module.exports = createAggregator; diff --git a/npm-package/_createAssigner.js b/npm-package/_createAssigner.js new file mode 100644 index 0000000000..1f904c51bd --- /dev/null +++ b/npm-package/_createAssigner.js @@ -0,0 +1,37 @@ +var baseRest = require('./_baseRest'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +module.exports = createAssigner; diff --git a/npm-package/_createBaseEach.js b/npm-package/_createBaseEach.js new file mode 100644 index 0000000000..d24fdd1bbc --- /dev/null +++ b/npm-package/_createBaseEach.js @@ -0,0 +1,32 @@ +var isArrayLike = require('./isArrayLike'); + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +module.exports = createBaseEach; diff --git a/npm-package/_createBaseFor.js b/npm-package/_createBaseFor.js new file mode 100644 index 0000000000..94cbf297aa --- /dev/null +++ b/npm-package/_createBaseFor.js @@ -0,0 +1,25 @@ +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +module.exports = createBaseFor; diff --git a/npm-package/_createBind.js b/npm-package/_createBind.js new file mode 100644 index 0000000000..07cb99f4db --- /dev/null +++ b/npm-package/_createBind.js @@ -0,0 +1,28 @@ +var createCtor = require('./_createCtor'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1; + +/** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; +} + +module.exports = createBind; diff --git a/npm-package/_createCaseFirst.js b/npm-package/_createCaseFirst.js new file mode 100644 index 0000000000..fe8ea48303 --- /dev/null +++ b/npm-package/_createCaseFirst.js @@ -0,0 +1,33 @@ +var castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), + stringToArray = require('./_stringToArray'), + toString = require('./toString'); + +/** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ +function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; +} + +module.exports = createCaseFirst; diff --git a/npm-package/_createCompounder.js b/npm-package/_createCompounder.js new file mode 100644 index 0000000000..8d4cee2cd3 --- /dev/null +++ b/npm-package/_createCompounder.js @@ -0,0 +1,24 @@ +var arrayReduce = require('./_arrayReduce'), + deburr = require('./deburr'), + words = require('./words'); + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]"; + +/** Used to match apostrophes. */ +var reApos = RegExp(rsApos, 'g'); + +/** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ +function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; +} + +module.exports = createCompounder; diff --git a/npm-package/_createCtor.js b/npm-package/_createCtor.js new file mode 100644 index 0000000000..9047aa5fac --- /dev/null +++ b/npm-package/_createCtor.js @@ -0,0 +1,37 @@ +var baseCreate = require('./_baseCreate'), + isObject = require('./isObject'); + +/** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ +function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; +} + +module.exports = createCtor; diff --git a/npm-package/_createCurry.js b/npm-package/_createCurry.js new file mode 100644 index 0000000000..f06c2cdd85 --- /dev/null +++ b/npm-package/_createCurry.js @@ -0,0 +1,46 @@ +var apply = require('./_apply'), + createCtor = require('./_createCtor'), + createHybrid = require('./_createHybrid'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'), + root = require('./_root'); + +/** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; +} + +module.exports = createCurry; diff --git a/npm-package/_createFind.js b/npm-package/_createFind.js new file mode 100644 index 0000000000..8859ff89f4 --- /dev/null +++ b/npm-package/_createFind.js @@ -0,0 +1,25 @@ +var baseIteratee = require('./_baseIteratee'), + isArrayLike = require('./isArrayLike'), + keys = require('./keys'); + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +module.exports = createFind; diff --git a/npm-package/_createFlow.js b/npm-package/_createFlow.js new file mode 100644 index 0000000000..baaddbf5e8 --- /dev/null +++ b/npm-package/_createFlow.js @@ -0,0 +1,78 @@ +var LodashWrapper = require('./_LodashWrapper'), + flatRest = require('./_flatRest'), + getData = require('./_getData'), + getFuncName = require('./_getFuncName'), + isArray = require('./isArray'), + isLaziable = require('./_isLaziable'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8, + WRAP_PARTIAL_FLAG = 32, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256; + +/** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ +function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); +} + +module.exports = createFlow; diff --git a/npm-package/_createHybrid.js b/npm-package/_createHybrid.js new file mode 100644 index 0000000000..b671bd11f6 --- /dev/null +++ b/npm-package/_createHybrid.js @@ -0,0 +1,92 @@ +var composeArgs = require('./_composeArgs'), + composeArgsRight = require('./_composeArgsRight'), + countHolders = require('./_countHolders'), + createCtor = require('./_createCtor'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), + reorder = require('./_reorder'), + replaceHolders = require('./_replaceHolders'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_ARY_FLAG = 128, + WRAP_FLIP_FLAG = 512; + +/** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; +} + +module.exports = createHybrid; diff --git a/npm-package/_createInverter.js b/npm-package/_createInverter.js new file mode 100644 index 0000000000..6c0c56299b --- /dev/null +++ b/npm-package/_createInverter.js @@ -0,0 +1,17 @@ +var baseInverter = require('./_baseInverter'); + +/** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ +function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; +} + +module.exports = createInverter; diff --git a/npm-package/_createMathOperation.js b/npm-package/_createMathOperation.js new file mode 100644 index 0000000000..f1e238ac0a --- /dev/null +++ b/npm-package/_createMathOperation.js @@ -0,0 +1,38 @@ +var baseToNumber = require('./_baseToNumber'), + baseToString = require('./_baseToString'); + +/** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ +function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; +} + +module.exports = createMathOperation; diff --git a/npm-package/_createOver.js b/npm-package/_createOver.js new file mode 100644 index 0000000000..3b9455161b --- /dev/null +++ b/npm-package/_createOver.js @@ -0,0 +1,27 @@ +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + baseUnary = require('./_baseUnary'), + flatRest = require('./_flatRest'); + +/** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ +function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); +} + +module.exports = createOver; diff --git a/npm-package/_createPadding.js b/npm-package/_createPadding.js new file mode 100644 index 0000000000..2124612b81 --- /dev/null +++ b/npm-package/_createPadding.js @@ -0,0 +1,33 @@ +var baseRepeat = require('./_baseRepeat'), + baseToString = require('./_baseToString'), + castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), + stringSize = require('./_stringSize'), + stringToArray = require('./_stringToArray'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil; + +/** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ +function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); +} + +module.exports = createPadding; diff --git a/npm-package/_createPartial.js b/npm-package/_createPartial.js new file mode 100644 index 0000000000..e16c248b5e --- /dev/null +++ b/npm-package/_createPartial.js @@ -0,0 +1,43 @@ +var apply = require('./_apply'), + createCtor = require('./_createCtor'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1; + +/** + * 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. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ +function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; +} + +module.exports = createPartial; diff --git a/npm-package/_createRange.js b/npm-package/_createRange.js new file mode 100644 index 0000000000..9f52c77932 --- /dev/null +++ b/npm-package/_createRange.js @@ -0,0 +1,30 @@ +var baseRange = require('./_baseRange'), + isIterateeCall = require('./_isIterateeCall'), + toFinite = require('./toFinite'); + +/** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; +} + +module.exports = createRange; diff --git a/npm-package/_createRecurry.js b/npm-package/_createRecurry.js new file mode 100644 index 0000000000..eb29fb24c0 --- /dev/null +++ b/npm-package/_createRecurry.js @@ -0,0 +1,56 @@ +var isLaziable = require('./_isLaziable'), + setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64; + +/** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); +} + +module.exports = createRecurry; diff --git a/npm-package/_createRelationalOperation.js b/npm-package/_createRelationalOperation.js new file mode 100644 index 0000000000..a17c6b5e72 --- /dev/null +++ b/npm-package/_createRelationalOperation.js @@ -0,0 +1,20 @@ +var toNumber = require('./toNumber'); + +/** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ +function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; +} + +module.exports = createRelationalOperation; diff --git a/npm-package/_createRound.js b/npm-package/_createRound.js new file mode 100644 index 0000000000..88be5df396 --- /dev/null +++ b/npm-package/_createRound.js @@ -0,0 +1,35 @@ +var root = require('./_root'), + toInteger = require('./toInteger'), + toNumber = require('./toNumber'), + toString = require('./toString'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = root.isFinite, + nativeMin = Math.min; + +/** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ +function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; +} + +module.exports = createRound; diff --git a/npm-package/_createSet.js b/npm-package/_createSet.js new file mode 100644 index 0000000000..0f644eeae6 --- /dev/null +++ b/npm-package/_createSet.js @@ -0,0 +1,19 @@ +var Set = require('./_Set'), + noop = require('./noop'), + setToArray = require('./_setToArray'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); +}; + +module.exports = createSet; diff --git a/npm-package/_createToPairs.js b/npm-package/_createToPairs.js new file mode 100644 index 0000000000..568417afda --- /dev/null +++ b/npm-package/_createToPairs.js @@ -0,0 +1,30 @@ +var baseToPairs = require('./_baseToPairs'), + getTag = require('./_getTag'), + mapToArray = require('./_mapToArray'), + setToPairs = require('./_setToPairs'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ +function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; +} + +module.exports = createToPairs; diff --git a/npm-package/_createWrap.js b/npm-package/_createWrap.js new file mode 100644 index 0000000000..33f0633e40 --- /dev/null +++ b/npm-package/_createWrap.js @@ -0,0 +1,106 @@ +var baseSetData = require('./_baseSetData'), + createBind = require('./_createBind'), + createCurry = require('./_createCurry'), + createHybrid = require('./_createHybrid'), + createPartial = require('./_createPartial'), + getData = require('./_getData'), + mergeData = require('./_mergeData'), + setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'), + toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); +} + +module.exports = createWrap; diff --git a/npm-package/_customDefaultsAssignIn.js b/npm-package/_customDefaultsAssignIn.js new file mode 100644 index 0000000000..1f49e6fc4f --- /dev/null +++ b/npm-package/_customDefaultsAssignIn.js @@ -0,0 +1,29 @@ +var eq = require('./eq'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ +function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; +} + +module.exports = customDefaultsAssignIn; diff --git a/npm-package/_customDefaultsMerge.js b/npm-package/_customDefaultsMerge.js new file mode 100644 index 0000000000..4cab31751b --- /dev/null +++ b/npm-package/_customDefaultsMerge.js @@ -0,0 +1,28 @@ +var baseMerge = require('./_baseMerge'), + isObject = require('./isObject'); + +/** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ +function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; +} + +module.exports = customDefaultsMerge; diff --git a/npm-package/_customOmitClone.js b/npm-package/_customOmitClone.js new file mode 100644 index 0000000000..968db2ef3e --- /dev/null +++ b/npm-package/_customOmitClone.js @@ -0,0 +1,16 @@ +var isPlainObject = require('./isPlainObject'); + +/** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ +function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; +} + +module.exports = customOmitClone; diff --git a/npm-package/_deburrLetter.js b/npm-package/_deburrLetter.js new file mode 100644 index 0000000000..3e531edcf3 --- /dev/null +++ b/npm-package/_deburrLetter.js @@ -0,0 +1,71 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map Latin Unicode letters to basic Latin letters. */ +var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' +}; + +/** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ +var deburrLetter = basePropertyOf(deburredLetters); + +module.exports = deburrLetter; diff --git a/npm-package/_defineProperty.js b/npm-package/_defineProperty.js new file mode 100644 index 0000000000..b6116d92ab --- /dev/null +++ b/npm-package/_defineProperty.js @@ -0,0 +1,11 @@ +var getNative = require('./_getNative'); + +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +module.exports = defineProperty; diff --git a/npm-package/_equalArrays.js b/npm-package/_equalArrays.js new file mode 100644 index 0000000000..f6a3b7c9f2 --- /dev/null +++ b/npm-package/_equalArrays.js @@ -0,0 +1,83 @@ +var SetCache = require('./_SetCache'), + arraySome = require('./_arraySome'), + cacheHas = require('./_cacheHas'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +module.exports = equalArrays; diff --git a/npm-package/_equalByTag.js b/npm-package/_equalByTag.js new file mode 100644 index 0000000000..71919e8673 --- /dev/null +++ b/npm-package/_equalByTag.js @@ -0,0 +1,112 @@ +var Symbol = require('./_Symbol'), + Uint8Array = require('./_Uint8Array'), + eq = require('./eq'), + equalArrays = require('./_equalArrays'), + mapToArray = require('./_mapToArray'), + setToArray = require('./_setToArray'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +module.exports = equalByTag; diff --git a/npm-package/_equalObjects.js b/npm-package/_equalObjects.js new file mode 100644 index 0000000000..17421f374c --- /dev/null +++ b/npm-package/_equalObjects.js @@ -0,0 +1,89 @@ +var getAllKeys = require('./_getAllKeys'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +module.exports = equalObjects; diff --git a/npm-package/_escapeHtmlChar.js b/npm-package/_escapeHtmlChar.js new file mode 100644 index 0000000000..7ca68ee625 --- /dev/null +++ b/npm-package/_escapeHtmlChar.js @@ -0,0 +1,21 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map characters to HTML entities. */ +var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}; + +/** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +var escapeHtmlChar = basePropertyOf(htmlEscapes); + +module.exports = escapeHtmlChar; diff --git a/npm-package/_escapeStringChar.js b/npm-package/_escapeStringChar.js new file mode 100644 index 0000000000..44eca96ca8 --- /dev/null +++ b/npm-package/_escapeStringChar.js @@ -0,0 +1,22 @@ +/** Used to escape characters for inclusion in compiled string literals. */ +var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' +}; + +/** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; +} + +module.exports = escapeStringChar; diff --git a/npm-package/_flatRest.js b/npm-package/_flatRest.js new file mode 100644 index 0000000000..94ab6cca77 --- /dev/null +++ b/npm-package/_flatRest.js @@ -0,0 +1,16 @@ +var flatten = require('./flatten'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); +} + +module.exports = flatRest; diff --git a/npm-package/_freeGlobal.js b/npm-package/_freeGlobal.js new file mode 100644 index 0000000000..bbec998fc8 --- /dev/null +++ b/npm-package/_freeGlobal.js @@ -0,0 +1,4 @@ +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; diff --git a/npm-package/_getAllKeys.js b/npm-package/_getAllKeys.js new file mode 100644 index 0000000000..a9ce6995a6 --- /dev/null +++ b/npm-package/_getAllKeys.js @@ -0,0 +1,16 @@ +var baseGetAllKeys = require('./_baseGetAllKeys'), + getSymbols = require('./_getSymbols'), + keys = require('./keys'); + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +module.exports = getAllKeys; diff --git a/npm-package/_getAllKeysIn.js b/npm-package/_getAllKeysIn.js new file mode 100644 index 0000000000..1b4667841d --- /dev/null +++ b/npm-package/_getAllKeysIn.js @@ -0,0 +1,17 @@ +var baseGetAllKeys = require('./_baseGetAllKeys'), + getSymbolsIn = require('./_getSymbolsIn'), + keysIn = require('./keysIn'); + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); +} + +module.exports = getAllKeysIn; diff --git a/npm-package/_getData.js b/npm-package/_getData.js new file mode 100644 index 0000000000..a1fe7b7790 --- /dev/null +++ b/npm-package/_getData.js @@ -0,0 +1,15 @@ +var metaMap = require('./_metaMap'), + noop = require('./noop'); + +/** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ +var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); +}; + +module.exports = getData; diff --git a/npm-package/_getFuncName.js b/npm-package/_getFuncName.js new file mode 100644 index 0000000000..21e15b3377 --- /dev/null +++ b/npm-package/_getFuncName.js @@ -0,0 +1,31 @@ +var realNames = require('./_realNames'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ +function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; +} + +module.exports = getFuncName; diff --git a/npm-package/_getHolder.js b/npm-package/_getHolder.js new file mode 100644 index 0000000000..65e94b5c24 --- /dev/null +++ b/npm-package/_getHolder.js @@ -0,0 +1,13 @@ +/** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ +function getHolder(func) { + var object = func; + return object.placeholder; +} + +module.exports = getHolder; diff --git a/npm-package/_getMapData.js b/npm-package/_getMapData.js new file mode 100644 index 0000000000..17f63032e1 --- /dev/null +++ b/npm-package/_getMapData.js @@ -0,0 +1,18 @@ +var isKeyable = require('./_isKeyable'); + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +module.exports = getMapData; diff --git a/npm-package/_getMatchData.js b/npm-package/_getMatchData.js new file mode 100644 index 0000000000..2cc70f917f --- /dev/null +++ b/npm-package/_getMatchData.js @@ -0,0 +1,24 @@ +var isStrictComparable = require('./_isStrictComparable'), + keys = require('./keys'); + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; +} + +module.exports = getMatchData; diff --git a/npm-package/_getNative.js b/npm-package/_getNative.js new file mode 100644 index 0000000000..97a622b83a --- /dev/null +++ b/npm-package/_getNative.js @@ -0,0 +1,17 @@ +var baseIsNative = require('./_baseIsNative'), + getValue = require('./_getValue'); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +module.exports = getNative; diff --git a/npm-package/_getPrototype.js b/npm-package/_getPrototype.js new file mode 100644 index 0000000000..e808612129 --- /dev/null +++ b/npm-package/_getPrototype.js @@ -0,0 +1,6 @@ +var overArg = require('./_overArg'); + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +module.exports = getPrototype; diff --git a/npm-package/_getRawTag.js b/npm-package/_getRawTag.js new file mode 100644 index 0000000000..49a95c9c65 --- /dev/null +++ b/npm-package/_getRawTag.js @@ -0,0 +1,46 @@ +var Symbol = require('./_Symbol'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; diff --git a/npm-package/_getSymbols.js b/npm-package/_getSymbols.js new file mode 100644 index 0000000000..7d6eafebb3 --- /dev/null +++ b/npm-package/_getSymbols.js @@ -0,0 +1,30 @@ +var arrayFilter = require('./_arrayFilter'), + stubArray = require('./stubArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +module.exports = getSymbols; diff --git a/npm-package/_getSymbolsIn.js b/npm-package/_getSymbolsIn.js new file mode 100644 index 0000000000..cec0855a4a --- /dev/null +++ b/npm-package/_getSymbolsIn.js @@ -0,0 +1,25 @@ +var arrayPush = require('./_arrayPush'), + getPrototype = require('./_getPrototype'), + getSymbols = require('./_getSymbols'), + stubArray = require('./stubArray'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; +}; + +module.exports = getSymbolsIn; diff --git a/npm-package/_getTag.js b/npm-package/_getTag.js new file mode 100644 index 0000000000..deaf89d582 --- /dev/null +++ b/npm-package/_getTag.js @@ -0,0 +1,58 @@ +var DataView = require('./_DataView'), + Map = require('./_Map'), + Promise = require('./_Promise'), + Set = require('./_Set'), + WeakMap = require('./_WeakMap'), + baseGetTag = require('./_baseGetTag'), + toSource = require('./_toSource'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; + +var dataViewTag = '[object DataView]'; + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +module.exports = getTag; diff --git a/npm-package/_getValue.js b/npm-package/_getValue.js new file mode 100644 index 0000000000..5f7d773673 --- /dev/null +++ b/npm-package/_getValue.js @@ -0,0 +1,13 @@ +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +module.exports = getValue; diff --git a/npm-package/_getView.js b/npm-package/_getView.js new file mode 100644 index 0000000000..df1e5d44b5 --- /dev/null +++ b/npm-package/_getView.js @@ -0,0 +1,33 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ +function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; +} + +module.exports = getView; diff --git a/npm-package/_getWrapDetails.js b/npm-package/_getWrapDetails.js new file mode 100644 index 0000000000..3bcc6e48a3 --- /dev/null +++ b/npm-package/_getWrapDetails.js @@ -0,0 +1,17 @@ +/** Used to match wrap detail comments. */ +var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + +/** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ +function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; +} + +module.exports = getWrapDetails; diff --git a/npm-package/_hasPath.js b/npm-package/_hasPath.js new file mode 100644 index 0000000000..93dbde152e --- /dev/null +++ b/npm-package/_hasPath.js @@ -0,0 +1,39 @@ +var castPath = require('./_castPath'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isIndex = require('./_isIndex'), + isLength = require('./isLength'), + toKey = require('./_toKey'); + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); +} + +module.exports = hasPath; diff --git a/npm-package/_hasUnicode.js b/npm-package/_hasUnicode.js new file mode 100644 index 0000000000..cb6ca15f66 --- /dev/null +++ b/npm-package/_hasUnicode.js @@ -0,0 +1,26 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +module.exports = hasUnicode; diff --git a/npm-package/_hasUnicodeWord.js b/npm-package/_hasUnicodeWord.js new file mode 100644 index 0000000000..95d52c444c --- /dev/null +++ b/npm-package/_hasUnicodeWord.js @@ -0,0 +1,15 @@ +/** Used to detect strings that need a more robust regexp to match words. */ +var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + +/** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ +function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); +} + +module.exports = hasUnicodeWord; diff --git a/npm-package/_hashClear.js b/npm-package/_hashClear.js new file mode 100644 index 0000000000..5d4b70cc46 --- /dev/null +++ b/npm-package/_hashClear.js @@ -0,0 +1,15 @@ +var nativeCreate = require('./_nativeCreate'); + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; +} + +module.exports = hashClear; diff --git a/npm-package/_hashDelete.js b/npm-package/_hashDelete.js new file mode 100644 index 0000000000..ea9dabf131 --- /dev/null +++ b/npm-package/_hashDelete.js @@ -0,0 +1,17 @@ +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} + +module.exports = hashDelete; diff --git a/npm-package/_hashGet.js b/npm-package/_hashGet.js new file mode 100644 index 0000000000..1fc2f34b10 --- /dev/null +++ b/npm-package/_hashGet.js @@ -0,0 +1,30 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +module.exports = hashGet; diff --git a/npm-package/_hashHas.js b/npm-package/_hashHas.js new file mode 100644 index 0000000000..281a5517c6 --- /dev/null +++ b/npm-package/_hashHas.js @@ -0,0 +1,23 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +} + +module.exports = hashHas; diff --git a/npm-package/_hashSet.js b/npm-package/_hashSet.js new file mode 100644 index 0000000000..e1055283e4 --- /dev/null +++ b/npm-package/_hashSet.js @@ -0,0 +1,23 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +module.exports = hashSet; diff --git a/npm-package/_initCloneArray.js b/npm-package/_initCloneArray.js new file mode 100644 index 0000000000..078c15af98 --- /dev/null +++ b/npm-package/_initCloneArray.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +module.exports = initCloneArray; diff --git a/npm-package/_initCloneByTag.js b/npm-package/_initCloneByTag.js new file mode 100644 index 0000000000..f69a008ca3 --- /dev/null +++ b/npm-package/_initCloneByTag.js @@ -0,0 +1,77 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'), + cloneDataView = require('./_cloneDataView'), + cloneRegExp = require('./_cloneRegExp'), + cloneSymbol = require('./_cloneSymbol'), + cloneTypedArray = require('./_cloneTypedArray'); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); + } +} + +module.exports = initCloneByTag; diff --git a/npm-package/_initCloneObject.js b/npm-package/_initCloneObject.js new file mode 100644 index 0000000000..5a13e64a52 --- /dev/null +++ b/npm-package/_initCloneObject.js @@ -0,0 +1,18 @@ +var baseCreate = require('./_baseCreate'), + getPrototype = require('./_getPrototype'), + isPrototype = require('./_isPrototype'); + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +module.exports = initCloneObject; diff --git a/npm-package/_insertWrapDetails.js b/npm-package/_insertWrapDetails.js new file mode 100644 index 0000000000..e790808646 --- /dev/null +++ b/npm-package/_insertWrapDetails.js @@ -0,0 +1,23 @@ +/** Used to match wrap detail comments. */ +var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; + +/** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ +function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); +} + +module.exports = insertWrapDetails; diff --git a/npm-package/_isFlattenable.js b/npm-package/_isFlattenable.js new file mode 100644 index 0000000000..4cc2c249cc --- /dev/null +++ b/npm-package/_isFlattenable.js @@ -0,0 +1,20 @@ +var Symbol = require('./_Symbol'), + isArguments = require('./isArguments'), + isArray = require('./isArray'); + +/** Built-in value references. */ +var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +module.exports = isFlattenable; diff --git a/npm-package/_isIndex.js b/npm-package/_isIndex.js new file mode 100644 index 0000000000..061cd390c3 --- /dev/null +++ b/npm-package/_isIndex.js @@ -0,0 +1,25 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); +} + +module.exports = isIndex; diff --git a/npm-package/_isIterateeCall.js b/npm-package/_isIterateeCall.js new file mode 100644 index 0000000000..a0bb5a9cf6 --- /dev/null +++ b/npm-package/_isIterateeCall.js @@ -0,0 +1,30 @@ +var eq = require('./eq'), + isArrayLike = require('./isArrayLike'), + isIndex = require('./_isIndex'), + isObject = require('./isObject'); + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; +} + +module.exports = isIterateeCall; diff --git a/npm-package/_isKey.js b/npm-package/_isKey.js new file mode 100644 index 0000000000..ff08b06808 --- /dev/null +++ b/npm-package/_isKey.js @@ -0,0 +1,29 @@ +var isArray = require('./isArray'), + isSymbol = require('./isSymbol'); + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +module.exports = isKey; diff --git a/npm-package/_isKeyable.js b/npm-package/_isKeyable.js new file mode 100644 index 0000000000..39f1828d4a --- /dev/null +++ b/npm-package/_isKeyable.js @@ -0,0 +1,15 @@ +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +module.exports = isKeyable; diff --git a/npm-package/_isLaziable.js b/npm-package/_isLaziable.js new file mode 100644 index 0000000000..a57c4f2dc7 --- /dev/null +++ b/npm-package/_isLaziable.js @@ -0,0 +1,28 @@ +var LazyWrapper = require('./_LazyWrapper'), + getData = require('./_getData'), + getFuncName = require('./_getFuncName'), + lodash = require('./wrapperLodash'); + +/** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ +function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; +} + +module.exports = isLaziable; diff --git a/npm-package/_isMaskable.js b/npm-package/_isMaskable.js new file mode 100644 index 0000000000..eb98d09f31 --- /dev/null +++ b/npm-package/_isMaskable.js @@ -0,0 +1,14 @@ +var coreJsData = require('./_coreJsData'), + isFunction = require('./isFunction'), + stubFalse = require('./stubFalse'); + +/** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ +var isMaskable = coreJsData ? isFunction : stubFalse; + +module.exports = isMaskable; diff --git a/npm-package/_isMasked.js b/npm-package/_isMasked.js new file mode 100644 index 0000000000..4b0f21ba89 --- /dev/null +++ b/npm-package/_isMasked.js @@ -0,0 +1,20 @@ +var coreJsData = require('./_coreJsData'); + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +module.exports = isMasked; diff --git a/npm-package/_isPrototype.js b/npm-package/_isPrototype.js new file mode 100644 index 0000000000..0f29498d47 --- /dev/null +++ b/npm-package/_isPrototype.js @@ -0,0 +1,18 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +module.exports = isPrototype; diff --git a/npm-package/_isStrictComparable.js b/npm-package/_isStrictComparable.js new file mode 100644 index 0000000000..b59f40b857 --- /dev/null +++ b/npm-package/_isStrictComparable.js @@ -0,0 +1,15 @@ +var isObject = require('./isObject'); + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !isObject(value); +} + +module.exports = isStrictComparable; diff --git a/npm-package/_iteratorToArray.js b/npm-package/_iteratorToArray.js new file mode 100644 index 0000000000..476856647c --- /dev/null +++ b/npm-package/_iteratorToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ +function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; +} + +module.exports = iteratorToArray; diff --git a/npm-package/_lazyClone.js b/npm-package/_lazyClone.js new file mode 100644 index 0000000000..d8a51f8703 --- /dev/null +++ b/npm-package/_lazyClone.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'), + copyArray = require('./_copyArray'); + +/** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ +function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; +} + +module.exports = lazyClone; diff --git a/npm-package/_lazyReverse.js b/npm-package/_lazyReverse.js new file mode 100644 index 0000000000..c5b52190f4 --- /dev/null +++ b/npm-package/_lazyReverse.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'); + +/** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ +function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; +} + +module.exports = lazyReverse; diff --git a/npm-package/_lazyValue.js b/npm-package/_lazyValue.js new file mode 100644 index 0000000000..371ca8d223 --- /dev/null +++ b/npm-package/_lazyValue.js @@ -0,0 +1,69 @@ +var baseWrapperValue = require('./_baseWrapperValue'), + getView = require('./_getView'), + isArray = require('./isArray'); + +/** Used to indicate the type of lazy iteratees. */ +var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ +function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; +} + +module.exports = lazyValue; diff --git a/npm-package/_listCacheClear.js b/npm-package/_listCacheClear.js new file mode 100644 index 0000000000..acbe39a597 --- /dev/null +++ b/npm-package/_listCacheClear.js @@ -0,0 +1,13 @@ +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +module.exports = listCacheClear; diff --git a/npm-package/_listCacheDelete.js b/npm-package/_listCacheDelete.js new file mode 100644 index 0000000000..b1384ade97 --- /dev/null +++ b/npm-package/_listCacheDelete.js @@ -0,0 +1,35 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} + +module.exports = listCacheDelete; diff --git a/npm-package/_listCacheGet.js b/npm-package/_listCacheGet.js new file mode 100644 index 0000000000..f8192fc384 --- /dev/null +++ b/npm-package/_listCacheGet.js @@ -0,0 +1,19 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +module.exports = listCacheGet; diff --git a/npm-package/_listCacheHas.js b/npm-package/_listCacheHas.js new file mode 100644 index 0000000000..2adf67146f --- /dev/null +++ b/npm-package/_listCacheHas.js @@ -0,0 +1,16 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +module.exports = listCacheHas; diff --git a/npm-package/_listCacheSet.js b/npm-package/_listCacheSet.js new file mode 100644 index 0000000000..5855c95e40 --- /dev/null +++ b/npm-package/_listCacheSet.js @@ -0,0 +1,26 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +module.exports = listCacheSet; diff --git a/npm-package/_mapCacheClear.js b/npm-package/_mapCacheClear.js new file mode 100644 index 0000000000..bc9ca204ae --- /dev/null +++ b/npm-package/_mapCacheClear.js @@ -0,0 +1,21 @@ +var Hash = require('./_Hash'), + ListCache = require('./_ListCache'), + Map = require('./_Map'); + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +module.exports = mapCacheClear; diff --git a/npm-package/_mapCacheDelete.js b/npm-package/_mapCacheDelete.js new file mode 100644 index 0000000000..946ca3c939 --- /dev/null +++ b/npm-package/_mapCacheDelete.js @@ -0,0 +1,18 @@ +var getMapData = require('./_getMapData'); + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +module.exports = mapCacheDelete; diff --git a/npm-package/_mapCacheGet.js b/npm-package/_mapCacheGet.js new file mode 100644 index 0000000000..f29f55cfdd --- /dev/null +++ b/npm-package/_mapCacheGet.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +module.exports = mapCacheGet; diff --git a/npm-package/_mapCacheHas.js b/npm-package/_mapCacheHas.js new file mode 100644 index 0000000000..a1214c028b --- /dev/null +++ b/npm-package/_mapCacheHas.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +module.exports = mapCacheHas; diff --git a/npm-package/_mapCacheSet.js b/npm-package/_mapCacheSet.js new file mode 100644 index 0000000000..7346849273 --- /dev/null +++ b/npm-package/_mapCacheSet.js @@ -0,0 +1,22 @@ +var getMapData = require('./_getMapData'); + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +module.exports = mapCacheSet; diff --git a/npm-package/_mapToArray.js b/npm-package/_mapToArray.js new file mode 100644 index 0000000000..fe3dd531a3 --- /dev/null +++ b/npm-package/_mapToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +module.exports = mapToArray; diff --git a/npm-package/_matchesStrictComparable.js b/npm-package/_matchesStrictComparable.js new file mode 100644 index 0000000000..f608af9ec4 --- /dev/null +++ b/npm-package/_matchesStrictComparable.js @@ -0,0 +1,20 @@ +/** + * 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 spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +module.exports = matchesStrictComparable; diff --git a/npm-package/_memoizeCapped.js b/npm-package/_memoizeCapped.js new file mode 100644 index 0000000000..7f71c8fbae --- /dev/null +++ b/npm-package/_memoizeCapped.js @@ -0,0 +1,26 @@ +var memoize = require('./memoize'); + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +module.exports = memoizeCapped; diff --git a/npm-package/_mergeData.js b/npm-package/_mergeData.js new file mode 100644 index 0000000000..cb570f9767 --- /dev/null +++ b/npm-package/_mergeData.js @@ -0,0 +1,90 @@ +var composeArgs = require('./_composeArgs'), + composeArgsRight = require('./_composeArgsRight'), + replaceHolders = require('./_replaceHolders'); + +/** Used as the internal argument placeholder. */ +var PLACEHOLDER = '__lodash_placeholder__'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ +function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; +} + +module.exports = mergeData; diff --git a/npm-package/_metaMap.js b/npm-package/_metaMap.js new file mode 100644 index 0000000000..0157a0b095 --- /dev/null +++ b/npm-package/_metaMap.js @@ -0,0 +1,6 @@ +var WeakMap = require('./_WeakMap'); + +/** Used to store function metadata. */ +var metaMap = WeakMap && new WeakMap; + +module.exports = metaMap; diff --git a/npm-package/_nativeCreate.js b/npm-package/_nativeCreate.js new file mode 100644 index 0000000000..c7aede85b3 --- /dev/null +++ b/npm-package/_nativeCreate.js @@ -0,0 +1,6 @@ +var getNative = require('./_getNative'); + +/* Built-in method references that are verified to be native. */ +var nativeCreate = getNative(Object, 'create'); + +module.exports = nativeCreate; diff --git a/npm-package/_nativeKeys.js b/npm-package/_nativeKeys.js new file mode 100644 index 0000000000..479a104a1c --- /dev/null +++ b/npm-package/_nativeKeys.js @@ -0,0 +1,6 @@ +var overArg = require('./_overArg'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); + +module.exports = nativeKeys; diff --git a/npm-package/_nativeKeysIn.js b/npm-package/_nativeKeysIn.js new file mode 100644 index 0000000000..00ee505947 --- /dev/null +++ b/npm-package/_nativeKeysIn.js @@ -0,0 +1,20 @@ +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +module.exports = nativeKeysIn; diff --git a/npm-package/_nodeUtil.js b/npm-package/_nodeUtil.js new file mode 100644 index 0000000000..983d78f75b --- /dev/null +++ b/npm-package/_nodeUtil.js @@ -0,0 +1,30 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +module.exports = nodeUtil; diff --git a/npm-package/_objectToString.js b/npm-package/_objectToString.js new file mode 100644 index 0000000000..c614ec09b3 --- /dev/null +++ b/npm-package/_objectToString.js @@ -0,0 +1,22 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; diff --git a/npm-package/_overArg.js b/npm-package/_overArg.js new file mode 100644 index 0000000000..651c5c55f2 --- /dev/null +++ b/npm-package/_overArg.js @@ -0,0 +1,15 @@ +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; diff --git a/npm-package/_overRest.js b/npm-package/_overRest.js new file mode 100644 index 0000000000..c7cdef3399 --- /dev/null +++ b/npm-package/_overRest.js @@ -0,0 +1,36 @@ +var apply = require('./_apply'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; +} + +module.exports = overRest; diff --git a/npm-package/_parent.js b/npm-package/_parent.js new file mode 100644 index 0000000000..f174328fcf --- /dev/null +++ b/npm-package/_parent.js @@ -0,0 +1,16 @@ +var baseGet = require('./_baseGet'), + baseSlice = require('./_baseSlice'); + +/** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ +function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); +} + +module.exports = parent; diff --git a/npm-package/_reEscape.js b/npm-package/_reEscape.js new file mode 100644 index 0000000000..7f47eda68f --- /dev/null +++ b/npm-package/_reEscape.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reEscape = /<%-([\s\S]+?)%>/g; + +module.exports = reEscape; diff --git a/npm-package/_reEvaluate.js b/npm-package/_reEvaluate.js new file mode 100644 index 0000000000..6adfc312c8 --- /dev/null +++ b/npm-package/_reEvaluate.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reEvaluate = /<%([\s\S]+?)%>/g; + +module.exports = reEvaluate; diff --git a/npm-package/_reInterpolate.js b/npm-package/_reInterpolate.js new file mode 100644 index 0000000000..d02ff0b29a --- /dev/null +++ b/npm-package/_reInterpolate.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reInterpolate = /<%=([\s\S]+?)%>/g; + +module.exports = reInterpolate; diff --git a/npm-package/_realNames.js b/npm-package/_realNames.js new file mode 100644 index 0000000000..aa0d529261 --- /dev/null +++ b/npm-package/_realNames.js @@ -0,0 +1,4 @@ +/** Used to lookup unminified function names. */ +var realNames = {}; + +module.exports = realNames; diff --git a/npm-package/_reorder.js b/npm-package/_reorder.js new file mode 100644 index 0000000000..a3502b0517 --- /dev/null +++ b/npm-package/_reorder.js @@ -0,0 +1,29 @@ +var copyArray = require('./_copyArray'), + isIndex = require('./_isIndex'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ +function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; +} + +module.exports = reorder; diff --git a/npm-package/_replaceHolders.js b/npm-package/_replaceHolders.js new file mode 100644 index 0000000000..74360ec4d3 --- /dev/null +++ b/npm-package/_replaceHolders.js @@ -0,0 +1,29 @@ +/** Used as the internal argument placeholder. */ +var PLACEHOLDER = '__lodash_placeholder__'; + +/** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ +function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; +} + +module.exports = replaceHolders; diff --git a/npm-package/_root.js b/npm-package/_root.js new file mode 100644 index 0000000000..d2852bed4d --- /dev/null +++ b/npm-package/_root.js @@ -0,0 +1,9 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; diff --git a/npm-package/_safeGet.js b/npm-package/_safeGet.js new file mode 100644 index 0000000000..b070897db2 --- /dev/null +++ b/npm-package/_safeGet.js @@ -0,0 +1,21 @@ +/** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; +} + +module.exports = safeGet; diff --git a/npm-package/_setCacheAdd.js b/npm-package/_setCacheAdd.js new file mode 100644 index 0000000000..1081a74426 --- /dev/null +++ b/npm-package/_setCacheAdd.js @@ -0,0 +1,19 @@ +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +module.exports = setCacheAdd; diff --git a/npm-package/_setCacheHas.js b/npm-package/_setCacheHas.js new file mode 100644 index 0000000000..9a492556e0 --- /dev/null +++ b/npm-package/_setCacheHas.js @@ -0,0 +1,14 @@ +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +module.exports = setCacheHas; diff --git a/npm-package/_setData.js b/npm-package/_setData.js new file mode 100644 index 0000000000..e5cf3eb96a --- /dev/null +++ b/npm-package/_setData.js @@ -0,0 +1,20 @@ +var baseSetData = require('./_baseSetData'), + shortOut = require('./_shortOut'); + +/** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ +var setData = shortOut(baseSetData); + +module.exports = setData; diff --git a/npm-package/_setToArray.js b/npm-package/_setToArray.js new file mode 100644 index 0000000000..b87f07418c --- /dev/null +++ b/npm-package/_setToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +module.exports = setToArray; diff --git a/npm-package/_setToPairs.js b/npm-package/_setToPairs.js new file mode 100644 index 0000000000..36ad37a058 --- /dev/null +++ b/npm-package/_setToPairs.js @@ -0,0 +1,18 @@ +/** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ +function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; +} + +module.exports = setToPairs; diff --git a/npm-package/_setToString.js b/npm-package/_setToString.js new file mode 100644 index 0000000000..6ca8419678 --- /dev/null +++ b/npm-package/_setToString.js @@ -0,0 +1,14 @@ +var baseSetToString = require('./_baseSetToString'), + shortOut = require('./_shortOut'); + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = shortOut(baseSetToString); + +module.exports = setToString; diff --git a/npm-package/_setWrapToString.js b/npm-package/_setWrapToString.js new file mode 100644 index 0000000000..decdc44998 --- /dev/null +++ b/npm-package/_setWrapToString.js @@ -0,0 +1,21 @@ +var getWrapDetails = require('./_getWrapDetails'), + insertWrapDetails = require('./_insertWrapDetails'), + setToString = require('./_setToString'), + updateWrapDetails = require('./_updateWrapDetails'); + +/** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ +function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); +} + +module.exports = setWrapToString; diff --git a/npm-package/_shortOut.js b/npm-package/_shortOut.js new file mode 100644 index 0000000000..3300a07969 --- /dev/null +++ b/npm-package/_shortOut.js @@ -0,0 +1,37 @@ +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + +module.exports = shortOut; diff --git a/npm-package/_shuffleSelf.js b/npm-package/_shuffleSelf.js new file mode 100644 index 0000000000..8bcc4f5c32 --- /dev/null +++ b/npm-package/_shuffleSelf.js @@ -0,0 +1,28 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ +function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; +} + +module.exports = shuffleSelf; diff --git a/npm-package/_stackClear.js b/npm-package/_stackClear.js new file mode 100644 index 0000000000..ce8e5a92ff --- /dev/null +++ b/npm-package/_stackClear.js @@ -0,0 +1,15 @@ +var ListCache = require('./_ListCache'); + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; + this.size = 0; +} + +module.exports = stackClear; diff --git a/npm-package/_stackDelete.js b/npm-package/_stackDelete.js new file mode 100644 index 0000000000..ff9887ab64 --- /dev/null +++ b/npm-package/_stackDelete.js @@ -0,0 +1,18 @@ +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; +} + +module.exports = stackDelete; diff --git a/npm-package/_stackGet.js b/npm-package/_stackGet.js new file mode 100644 index 0000000000..1cdf004091 --- /dev/null +++ b/npm-package/_stackGet.js @@ -0,0 +1,14 @@ +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +module.exports = stackGet; diff --git a/npm-package/_stackHas.js b/npm-package/_stackHas.js new file mode 100644 index 0000000000..16a3ad11b9 --- /dev/null +++ b/npm-package/_stackHas.js @@ -0,0 +1,14 @@ +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +module.exports = stackHas; diff --git a/npm-package/_stackSet.js b/npm-package/_stackSet.js new file mode 100644 index 0000000000..b790ac5f41 --- /dev/null +++ b/npm-package/_stackSet.js @@ -0,0 +1,34 @@ +var ListCache = require('./_ListCache'), + Map = require('./_Map'), + MapCache = require('./_MapCache'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; +} + +module.exports = stackSet; diff --git a/npm-package/_strictIndexOf.js b/npm-package/_strictIndexOf.js new file mode 100644 index 0000000000..0486a4956b --- /dev/null +++ b/npm-package/_strictIndexOf.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +module.exports = strictIndexOf; diff --git a/npm-package/_strictLastIndexOf.js b/npm-package/_strictLastIndexOf.js new file mode 100644 index 0000000000..d7310dcc23 --- /dev/null +++ b/npm-package/_strictLastIndexOf.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; +} + +module.exports = strictLastIndexOf; diff --git a/npm-package/_stringSize.js b/npm-package/_stringSize.js new file mode 100644 index 0000000000..17ef462a68 --- /dev/null +++ b/npm-package/_stringSize.js @@ -0,0 +1,18 @@ +var asciiSize = require('./_asciiSize'), + hasUnicode = require('./_hasUnicode'), + unicodeSize = require('./_unicodeSize'); + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); +} + +module.exports = stringSize; diff --git a/npm-package/_stringToArray.js b/npm-package/_stringToArray.js new file mode 100644 index 0000000000..d161158c6f --- /dev/null +++ b/npm-package/_stringToArray.js @@ -0,0 +1,18 @@ +var asciiToArray = require('./_asciiToArray'), + hasUnicode = require('./_hasUnicode'), + unicodeToArray = require('./_unicodeToArray'); + +/** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); +} + +module.exports = stringToArray; diff --git a/npm-package/_stringToPath.js b/npm-package/_stringToPath.js new file mode 100644 index 0000000000..8f39f8a29b --- /dev/null +++ b/npm-package/_stringToPath.js @@ -0,0 +1,27 @@ +var memoizeCapped = require('./_memoizeCapped'); + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +module.exports = stringToPath; diff --git a/npm-package/_toKey.js b/npm-package/_toKey.js new file mode 100644 index 0000000000..c6d645c4d0 --- /dev/null +++ b/npm-package/_toKey.js @@ -0,0 +1,21 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = toKey; diff --git a/npm-package/_toSource.js b/npm-package/_toSource.js new file mode 100644 index 0000000000..a020b386ca --- /dev/null +++ b/npm-package/_toSource.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +module.exports = toSource; diff --git a/npm-package/_unescapeHtmlChar.js b/npm-package/_unescapeHtmlChar.js new file mode 100644 index 0000000000..a71fecb3f6 --- /dev/null +++ b/npm-package/_unescapeHtmlChar.js @@ -0,0 +1,21 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map HTML entities to characters. */ +var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}; + +/** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ +var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + +module.exports = unescapeHtmlChar; diff --git a/npm-package/_unicodeSize.js b/npm-package/_unicodeSize.js new file mode 100644 index 0000000000..68137ec2c5 --- /dev/null +++ b/npm-package/_unicodeSize.js @@ -0,0 +1,44 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +module.exports = unicodeSize; diff --git a/npm-package/_unicodeToArray.js b/npm-package/_unicodeToArray.js new file mode 100644 index 0000000000..2a725c062e --- /dev/null +++ b/npm-package/_unicodeToArray.js @@ -0,0 +1,40 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function unicodeToArray(string) { + return string.match(reUnicode) || []; +} + +module.exports = unicodeToArray; diff --git a/npm-package/_unicodeWords.js b/npm-package/_unicodeWords.js new file mode 100644 index 0000000000..e72e6e0f93 --- /dev/null +++ b/npm-package/_unicodeWords.js @@ -0,0 +1,69 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\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', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]", + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; + +/** Used to match complex or compound words. */ +var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji +].join('|'), 'g'); + +/** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function unicodeWords(string) { + return string.match(reUnicodeWord) || []; +} + +module.exports = unicodeWords; diff --git a/npm-package/_updateWrapDetails.js b/npm-package/_updateWrapDetails.js new file mode 100644 index 0000000000..8759fbdf79 --- /dev/null +++ b/npm-package/_updateWrapDetails.js @@ -0,0 +1,46 @@ +var arrayEach = require('./_arrayEach'), + arrayIncludes = require('./_arrayIncludes'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + +/** Used to associate wrap methods with their bit flags. */ +var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] +]; + +/** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ +function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); +} + +module.exports = updateWrapDetails; diff --git a/npm-package/_wrapperClone.js b/npm-package/_wrapperClone.js new file mode 100644 index 0000000000..7bb58a2e88 --- /dev/null +++ b/npm-package/_wrapperClone.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'), + LodashWrapper = require('./_LodashWrapper'), + copyArray = require('./_copyArray'); + +/** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ +function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; +} + +module.exports = wrapperClone; diff --git a/npm-package/add.js b/npm-package/add.js new file mode 100644 index 0000000000..f069515647 --- /dev/null +++ b/npm-package/add.js @@ -0,0 +1,22 @@ +var createMathOperation = require('./_createMathOperation'); + +/** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ +var add = createMathOperation(function(augend, addend) { + return augend + addend; +}, 0); + +module.exports = add; diff --git a/npm-package/after.js b/npm-package/after.js new file mode 100644 index 0000000000..3900c979a1 --- /dev/null +++ b/npm-package/after.js @@ -0,0 +1,42 @@ +var toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ +function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; +} + +module.exports = after; diff --git a/npm-package/array.js b/npm-package/array.js new file mode 100644 index 0000000000..af688d3ee6 --- /dev/null +++ b/npm-package/array.js @@ -0,0 +1,67 @@ +module.exports = { + 'chunk': require('./chunk'), + 'compact': require('./compact'), + 'concat': require('./concat'), + 'difference': require('./difference'), + 'differenceBy': require('./differenceBy'), + 'differenceWith': require('./differenceWith'), + 'drop': require('./drop'), + 'dropRight': require('./dropRight'), + 'dropRightWhile': require('./dropRightWhile'), + 'dropWhile': require('./dropWhile'), + 'fill': require('./fill'), + 'findIndex': require('./findIndex'), + 'findLastIndex': require('./findLastIndex'), + 'first': require('./first'), + 'flatten': require('./flatten'), + 'flattenDeep': require('./flattenDeep'), + 'flattenDepth': require('./flattenDepth'), + 'fromPairs': require('./fromPairs'), + 'head': require('./head'), + 'indexOf': require('./indexOf'), + 'initial': require('./initial'), + 'intersection': require('./intersection'), + 'intersectionBy': require('./intersectionBy'), + 'intersectionWith': require('./intersectionWith'), + 'join': require('./join'), + 'last': require('./last'), + 'lastIndexOf': require('./lastIndexOf'), + 'nth': require('./nth'), + 'pull': require('./pull'), + 'pullAll': require('./pullAll'), + 'pullAllBy': require('./pullAllBy'), + 'pullAllWith': require('./pullAllWith'), + 'pullAt': require('./pullAt'), + 'remove': require('./remove'), + 'reverse': require('./reverse'), + 'slice': require('./slice'), + 'sortedIndex': require('./sortedIndex'), + 'sortedIndexBy': require('./sortedIndexBy'), + 'sortedIndexOf': require('./sortedIndexOf'), + 'sortedLastIndex': require('./sortedLastIndex'), + 'sortedLastIndexBy': require('./sortedLastIndexBy'), + 'sortedLastIndexOf': require('./sortedLastIndexOf'), + 'sortedUniq': require('./sortedUniq'), + 'sortedUniqBy': require('./sortedUniqBy'), + 'tail': require('./tail'), + 'take': require('./take'), + 'takeRight': require('./takeRight'), + 'takeRightWhile': require('./takeRightWhile'), + 'takeWhile': require('./takeWhile'), + 'union': require('./union'), + 'unionBy': require('./unionBy'), + 'unionWith': require('./unionWith'), + 'uniq': require('./uniq'), + 'uniqBy': require('./uniqBy'), + 'uniqWith': require('./uniqWith'), + 'unzip': require('./unzip'), + 'unzipWith': require('./unzipWith'), + 'without': require('./without'), + 'xor': require('./xor'), + 'xorBy': require('./xorBy'), + 'xorWith': require('./xorWith'), + 'zip': require('./zip'), + 'zipObject': require('./zipObject'), + 'zipObjectDeep': require('./zipObjectDeep'), + 'zipWith': require('./zipWith') +}; diff --git a/npm-package/ary.js b/npm-package/ary.js new file mode 100644 index 0000000000..70c87d094c --- /dev/null +++ b/npm-package/ary.js @@ -0,0 +1,29 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_ARY_FLAG = 128; + +/** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ +function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); +} + +module.exports = ary; diff --git a/npm-package/assign.js b/npm-package/assign.js new file mode 100644 index 0000000000..909db26a34 --- /dev/null +++ b/npm-package/assign.js @@ -0,0 +1,58 @@ +var assignValue = require('./_assignValue'), + copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + isArrayLike = require('./isArrayLike'), + isPrototype = require('./_isPrototype'), + keys = require('./keys'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ +var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } +}); + +module.exports = assign; diff --git a/npm-package/assignIn.js b/npm-package/assignIn.js new file mode 100644 index 0000000000..e663473a0c --- /dev/null +++ b/npm-package/assignIn.js @@ -0,0 +1,40 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ +var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); +}); + +module.exports = assignIn; diff --git a/npm-package/assignInWith.js b/npm-package/assignInWith.js new file mode 100644 index 0000000000..68fcc0b03a --- /dev/null +++ b/npm-package/assignInWith.js @@ -0,0 +1,38 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); +}); + +module.exports = assignInWith; diff --git a/npm-package/assignWith.js b/npm-package/assignWith.js new file mode 100644 index 0000000000..7dc6c761b8 --- /dev/null +++ b/npm-package/assignWith.js @@ -0,0 +1,37 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keys = require('./keys'); + +/** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); +}); + +module.exports = assignWith; diff --git a/npm-package/at.js b/npm-package/at.js new file mode 100644 index 0000000000..781ee9e5f1 --- /dev/null +++ b/npm-package/at.js @@ -0,0 +1,23 @@ +var baseAt = require('./_baseAt'), + flatRest = require('./_flatRest'); + +/** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ +var at = flatRest(baseAt); + +module.exports = at; diff --git a/npm-package/attempt.js b/npm-package/attempt.js new file mode 100644 index 0000000000..624d01524d --- /dev/null +++ b/npm-package/attempt.js @@ -0,0 +1,35 @@ +var apply = require('./_apply'), + baseRest = require('./_baseRest'), + isError = require('./isError'); + +/** + * Attempts to invoke `func`, returning either the result or the caught error + * object. Any additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Function} func The function to attempt. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {*} Returns the `func` result or error object. + * @example + * + * // Avoid throwing errors for invalid selectors. + * var elements = _.attempt(function(selector) { + * return document.querySelectorAll(selector); + * }, '>_>'); + * + * if (_.isError(elements)) { + * elements = []; + * } + */ +var attempt = baseRest(function(func, args) { + try { + return apply(func, undefined, args); + } catch (e) { + return isError(e) ? e : new Error(e); + } +}); + +module.exports = attempt; diff --git a/npm-package/before.js b/npm-package/before.js new file mode 100644 index 0000000000..a3e0a16c7a --- /dev/null +++ b/npm-package/before.js @@ -0,0 +1,40 @@ +var toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * 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 + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ +function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; +} + +module.exports = before; diff --git a/npm-package/bind.js b/npm-package/bind.js new file mode 100644 index 0000000000..b1076e93e6 --- /dev/null +++ b/npm-package/bind.js @@ -0,0 +1,57 @@ +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * 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. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ +var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); +}); + +// Assign default placeholders. +bind.placeholder = {}; + +module.exports = bind; diff --git a/npm-package/bindAll.js b/npm-package/bindAll.js new file mode 100644 index 0000000000..a35706deed --- /dev/null +++ b/npm-package/bindAll.js @@ -0,0 +1,41 @@ +var arrayEach = require('./_arrayEach'), + baseAssignValue = require('./_baseAssignValue'), + bind = require('./bind'), + flatRest = require('./_flatRest'), + toKey = require('./_toKey'); + +/** + * Binds methods of an object to the object itself, overwriting the existing + * method. + * + * **Note:** This method doesn't set the "length" property of bound functions. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} methodNames The object method names to bind. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'click': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); + * // => Logs 'clicked docs' when clicked. + */ +var bindAll = flatRest(function(object, methodNames) { + arrayEach(methodNames, function(key) { + key = toKey(key); + baseAssignValue(object, key, bind(object[key], object)); + }); + return object; +}); + +module.exports = bindAll; diff --git a/npm-package/bindKey.js b/npm-package/bindKey.js new file mode 100644 index 0000000000..f7fd64cd4e --- /dev/null +++ b/npm-package/bindKey.js @@ -0,0 +1,68 @@ +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_PARTIAL_FLAG = 32; + +/** + * 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 + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ +var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); +}); + +// Assign default placeholders. +bindKey.placeholder = {}; + +module.exports = bindKey; diff --git a/npm-package/camelCase.js b/npm-package/camelCase.js new file mode 100644 index 0000000000..d7390def55 --- /dev/null +++ b/npm-package/camelCase.js @@ -0,0 +1,29 @@ +var capitalize = require('./capitalize'), + createCompounder = require('./_createCompounder'); + +/** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ +var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); +}); + +module.exports = camelCase; diff --git a/npm-package/capitalize.js b/npm-package/capitalize.js new file mode 100644 index 0000000000..3e1600e7d9 --- /dev/null +++ b/npm-package/capitalize.js @@ -0,0 +1,23 @@ +var toString = require('./toString'), + upperFirst = require('./upperFirst'); + +/** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ +function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); +} + +module.exports = capitalize; diff --git a/npm-package/castArray.js b/npm-package/castArray.js new file mode 100644 index 0000000000..e470bdb9b9 --- /dev/null +++ b/npm-package/castArray.js @@ -0,0 +1,44 @@ +var isArray = require('./isArray'); + +/** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ +function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; +} + +module.exports = castArray; diff --git a/npm-package/ceil.js b/npm-package/ceil.js new file mode 100644 index 0000000000..56c8722cfc --- /dev/null +++ b/npm-package/ceil.js @@ -0,0 +1,26 @@ +var createRound = require('./_createRound'); + +/** + * Computes `number` rounded up to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round up. + * @param {number} [precision=0] The precision to round up to. + * @returns {number} Returns the rounded up number. + * @example + * + * _.ceil(4.006); + * // => 5 + * + * _.ceil(6.004, 2); + * // => 6.01 + * + * _.ceil(6040, -2); + * // => 6100 + */ +var ceil = createRound('ceil'); + +module.exports = ceil; diff --git a/npm-package/chain.js b/npm-package/chain.js new file mode 100644 index 0000000000..f6cd6475ff --- /dev/null +++ b/npm-package/chain.js @@ -0,0 +1,38 @@ +var lodash = require('./wrapperLodash'); + +/** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ +function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; +} + +module.exports = chain; diff --git a/npm-package/chunk.js b/npm-package/chunk.js new file mode 100644 index 0000000000..5b562fef3c --- /dev/null +++ b/npm-package/chunk.js @@ -0,0 +1,50 @@ +var baseSlice = require('./_baseSlice'), + isIterateeCall = require('./_isIterateeCall'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * 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 + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @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 of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ +function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; +} + +module.exports = chunk; diff --git a/npm-package/clamp.js b/npm-package/clamp.js new file mode 100644 index 0000000000..91a72c9782 --- /dev/null +++ b/npm-package/clamp.js @@ -0,0 +1,39 @@ +var baseClamp = require('./_baseClamp'), + toNumber = require('./toNumber'); + +/** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ +function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); +} + +module.exports = clamp; diff --git a/npm-package/clone.js b/npm-package/clone.js new file mode 100644 index 0000000000..dd439d6396 --- /dev/null +++ b/npm-package/clone.js @@ -0,0 +1,36 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ +function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); +} + +module.exports = clone; diff --git a/npm-package/cloneDeep.js b/npm-package/cloneDeep.js new file mode 100644 index 0000000000..4425fbe8b9 --- /dev/null +++ b/npm-package/cloneDeep.js @@ -0,0 +1,29 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +module.exports = cloneDeep; diff --git a/npm-package/cloneDeepWith.js b/npm-package/cloneDeepWith.js new file mode 100644 index 0000000000..fd9c6c050c --- /dev/null +++ b/npm-package/cloneDeepWith.js @@ -0,0 +1,40 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ +function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); +} + +module.exports = cloneDeepWith; diff --git a/npm-package/cloneWith.js b/npm-package/cloneWith.js new file mode 100644 index 0000000000..d2f4e756d5 --- /dev/null +++ b/npm-package/cloneWith.js @@ -0,0 +1,42 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ +function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); +} + +module.exports = cloneWith; diff --git a/npm-package/collection.js b/npm-package/collection.js new file mode 100644 index 0000000000..77fe837f32 --- /dev/null +++ b/npm-package/collection.js @@ -0,0 +1,30 @@ +module.exports = { + 'countBy': require('./countBy'), + 'each': require('./each'), + 'eachRight': require('./eachRight'), + 'every': require('./every'), + 'filter': require('./filter'), + 'find': require('./find'), + 'findLast': require('./findLast'), + 'flatMap': require('./flatMap'), + 'flatMapDeep': require('./flatMapDeep'), + 'flatMapDepth': require('./flatMapDepth'), + 'forEach': require('./forEach'), + 'forEachRight': require('./forEachRight'), + 'groupBy': require('./groupBy'), + 'includes': require('./includes'), + 'invokeMap': require('./invokeMap'), + 'keyBy': require('./keyBy'), + 'map': require('./map'), + 'orderBy': require('./orderBy'), + 'partition': require('./partition'), + 'reduce': require('./reduce'), + 'reduceRight': require('./reduceRight'), + 'reject': require('./reject'), + 'sample': require('./sample'), + 'sampleSize': require('./sampleSize'), + 'shuffle': require('./shuffle'), + 'size': require('./size'), + 'some': require('./some'), + 'sortBy': require('./sortBy') +}; diff --git a/npm-package/commit.js b/npm-package/commit.js new file mode 100644 index 0000000000..fe4db71783 --- /dev/null +++ b/npm-package/commit.js @@ -0,0 +1,33 @@ +var LodashWrapper = require('./_LodashWrapper'); + +/** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ +function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); +} + +module.exports = wrapperCommit; diff --git a/npm-package/compact.js b/npm-package/compact.js new file mode 100644 index 0000000000..031fab4e6d --- /dev/null +++ b/npm-package/compact.js @@ -0,0 +1,31 @@ +/** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ +function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; +} + +module.exports = compact; diff --git a/npm-package/concat.js b/npm-package/concat.js new file mode 100644 index 0000000000..1da48a4fc7 --- /dev/null +++ b/npm-package/concat.js @@ -0,0 +1,43 @@ +var arrayPush = require('./_arrayPush'), + baseFlatten = require('./_baseFlatten'), + copyArray = require('./_copyArray'), + isArray = require('./isArray'); + +/** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ +function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); +} + +module.exports = concat; diff --git a/npm-package/cond.js b/npm-package/cond.js new file mode 100644 index 0000000000..64555986aa --- /dev/null +++ b/npm-package/cond.js @@ -0,0 +1,60 @@ +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that iterates over `pairs` and invokes the corresponding + * function of the first predicate to return truthy. The predicate-function + * pairs are invoked with the `this` binding and arguments of the created + * function. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Array} pairs The predicate-function pairs. + * @returns {Function} Returns the new composite function. + * @example + * + * var func = _.cond([ + * [_.matches({ 'a': 1 }), _.constant('matches A')], + * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], + * [_.stubTrue, _.constant('no match')] + * ]); + * + * func({ 'a': 1, 'b': 2 }); + * // => 'matches A' + * + * func({ 'a': 0, 'b': 1 }); + * // => 'matches B' + * + * func({ 'a': '1', 'b': '2' }); + * // => 'no match' + */ +function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, + toIteratee = baseIteratee; + + pairs = !length ? [] : arrayMap(pairs, function(pair) { + if (typeof pair[1] != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + + return baseRest(function(args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (apply(pair[0], this, args)) { + return apply(pair[1], this, args); + } + } + }); +} + +module.exports = cond; diff --git a/npm-package/conforms.js b/npm-package/conforms.js new file mode 100644 index 0000000000..5501a949a9 --- /dev/null +++ b/npm-package/conforms.js @@ -0,0 +1,35 @@ +var baseClone = require('./_baseClone'), + baseConforms = require('./_baseConforms'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that invokes the predicate properties of `source` with + * the corresponding property values of a given object, returning `true` if + * all predicates return truthy, else `false`. + * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } + * ]; + * + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] + */ +function conforms(source) { + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); +} + +module.exports = conforms; diff --git a/npm-package/conformsTo.js b/npm-package/conformsTo.js new file mode 100644 index 0000000000..b8a93ebf45 --- /dev/null +++ b/npm-package/conformsTo.js @@ -0,0 +1,32 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ +function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); +} + +module.exports = conformsTo; diff --git a/npm-package/constant.js b/npm-package/constant.js new file mode 100644 index 0000000000..655ece3fb3 --- /dev/null +++ b/npm-package/constant.js @@ -0,0 +1,26 @@ +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +module.exports = constant; diff --git a/npm-package/countBy.js b/npm-package/countBy.js new file mode 100644 index 0000000000..0e88abc276 --- /dev/null +++ b/npm-package/countBy.js @@ -0,0 +1,40 @@ +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ +var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } +}); + +module.exports = countBy; diff --git a/npm-package/create.js b/npm-package/create.js new file mode 100644 index 0000000000..919edb850f --- /dev/null +++ b/npm-package/create.js @@ -0,0 +1,43 @@ +var baseAssign = require('./_baseAssign'), + baseCreate = require('./_baseCreate'); + +/** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ +function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); +} + +module.exports = create; diff --git a/npm-package/curry.js b/npm-package/curry.js new file mode 100644 index 0000000000..918db1a4a7 --- /dev/null +++ b/npm-package/curry.js @@ -0,0 +1,57 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8; + +/** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ +function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; +} + +// Assign default placeholders. +curry.placeholder = {}; + +module.exports = curry; diff --git a/npm-package/curryRight.js b/npm-package/curryRight.js new file mode 100644 index 0000000000..c85b6f339b --- /dev/null +++ b/npm-package/curryRight.js @@ -0,0 +1,54 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_RIGHT_FLAG = 16; + +/** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ +function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; +} + +// Assign default placeholders. +curryRight.placeholder = {}; + +module.exports = curryRight; diff --git a/npm-package/date.js b/npm-package/date.js new file mode 100644 index 0000000000..cbf5b41098 --- /dev/null +++ b/npm-package/date.js @@ -0,0 +1,3 @@ +module.exports = { + 'now': require('./now') +}; diff --git a/npm-package/debounce.js b/npm-package/debounce.js new file mode 100644 index 0000000000..8f751d53d1 --- /dev/null +++ b/npm-package/debounce.js @@ -0,0 +1,191 @@ +var isObject = require('./isObject'), + now = require('./now'), + toNumber = require('./toNumber'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +module.exports = debounce; diff --git a/npm-package/deburr.js b/npm-package/deburr.js new file mode 100644 index 0000000000..f85e314a0c --- /dev/null +++ b/npm-package/deburr.js @@ -0,0 +1,45 @@ +var deburrLetter = require('./_deburrLetter'), + toString = require('./toString'); + +/** Used to match Latin Unicode letters (excluding mathematical operators). */ +var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + +/** Used to compose unicode character classes. */ +var rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; + +/** Used to compose unicode capture groups. */ +var rsCombo = '[' + rsComboRange + ']'; + +/** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ +var reComboMark = RegExp(rsCombo, 'g'); + +/** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ +function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); +} + +module.exports = deburr; diff --git a/npm-package/defaultTo.js b/npm-package/defaultTo.js new file mode 100644 index 0000000000..5b333592e9 --- /dev/null +++ b/npm-package/defaultTo.js @@ -0,0 +1,25 @@ +/** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ +function defaultTo(value, defaultValue) { + return (value == null || value !== value) ? defaultValue : value; +} + +module.exports = defaultTo; diff --git a/npm-package/defaults.js b/npm-package/defaults.js new file mode 100644 index 0000000000..c74df044c4 --- /dev/null +++ b/npm-package/defaults.js @@ -0,0 +1,64 @@ +var baseRest = require('./_baseRest'), + eq = require('./eq'), + isIterateeCall = require('./_isIterateeCall'), + keysIn = require('./keysIn'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; +}); + +module.exports = defaults; diff --git a/npm-package/defaultsDeep.js b/npm-package/defaultsDeep.js new file mode 100644 index 0000000000..9b5fa3ee22 --- /dev/null +++ b/npm-package/defaultsDeep.js @@ -0,0 +1,30 @@ +var apply = require('./_apply'), + baseRest = require('./_baseRest'), + customDefaultsMerge = require('./_customDefaultsMerge'), + mergeWith = require('./mergeWith'); + +/** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ +var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); +}); + +module.exports = defaultsDeep; diff --git a/npm-package/defer.js b/npm-package/defer.js new file mode 100644 index 0000000000..f6d6c6fa67 --- /dev/null +++ b/npm-package/defer.js @@ -0,0 +1,26 @@ +var baseDelay = require('./_baseDelay'), + baseRest = require('./_baseRest'); + +/** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ +var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); +}); + +module.exports = defer; diff --git a/npm-package/delay.js b/npm-package/delay.js new file mode 100644 index 0000000000..bd554796fd --- /dev/null +++ b/npm-package/delay.js @@ -0,0 +1,28 @@ +var baseDelay = require('./_baseDelay'), + baseRest = require('./_baseRest'), + toNumber = require('./toNumber'); + +/** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ +var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); +}); + +module.exports = delay; diff --git a/npm-package/difference.js b/npm-package/difference.js new file mode 100644 index 0000000000..fa28bb301f --- /dev/null +++ b/npm-package/difference.js @@ -0,0 +1,33 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ +var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; +}); + +module.exports = difference; diff --git a/npm-package/differenceBy.js b/npm-package/differenceBy.js new file mode 100644 index 0000000000..2cd63e7ec0 --- /dev/null +++ b/npm-package/differenceBy.js @@ -0,0 +1,44 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ +var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2)) + : []; +}); + +module.exports = differenceBy; diff --git a/npm-package/differenceWith.js b/npm-package/differenceWith.js new file mode 100644 index 0000000000..c0233f4b9c --- /dev/null +++ b/npm-package/differenceWith.js @@ -0,0 +1,40 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ +var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; +}); + +module.exports = differenceWith; diff --git a/npm-package/divide.js b/npm-package/divide.js new file mode 100644 index 0000000000..8cae0cd1b0 --- /dev/null +++ b/npm-package/divide.js @@ -0,0 +1,22 @@ +var createMathOperation = require('./_createMathOperation'); + +/** + * Divide two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} dividend The first number in a division. + * @param {number} divisor The second number in a division. + * @returns {number} Returns the quotient. + * @example + * + * _.divide(6, 4); + * // => 1.5 + */ +var divide = createMathOperation(function(dividend, divisor) { + return dividend / divisor; +}, 1); + +module.exports = divide; diff --git a/npm-package/drop.js b/npm-package/drop.js new file mode 100644 index 0000000000..d5c3cbaa4e --- /dev/null +++ b/npm-package/drop.js @@ -0,0 +1,38 @@ +var baseSlice = require('./_baseSlice'), + toInteger = require('./toInteger'); + +/** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); +} + +module.exports = drop; diff --git a/npm-package/dropRight.js b/npm-package/dropRight.js new file mode 100644 index 0000000000..441fe99681 --- /dev/null +++ b/npm-package/dropRight.js @@ -0,0 +1,39 @@ +var baseSlice = require('./_baseSlice'), + toInteger = require('./toInteger'); + +/** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); +} + +module.exports = dropRight; diff --git a/npm-package/dropRightWhile.js b/npm-package/dropRightWhile.js new file mode 100644 index 0000000000..9ad36a0445 --- /dev/null +++ b/npm-package/dropRightWhile.js @@ -0,0 +1,45 @@ +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ +function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, baseIteratee(predicate, 3), true, true) + : []; +} + +module.exports = dropRightWhile; diff --git a/npm-package/dropWhile.js b/npm-package/dropWhile.js new file mode 100644 index 0000000000..903ef568c9 --- /dev/null +++ b/npm-package/dropWhile.js @@ -0,0 +1,45 @@ +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ +function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, baseIteratee(predicate, 3), true) + : []; +} + +module.exports = dropWhile; diff --git a/npm-package/each.js b/npm-package/each.js new file mode 100644 index 0000000000..8800f42046 --- /dev/null +++ b/npm-package/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/npm-package/eachRight.js b/npm-package/eachRight.js new file mode 100644 index 0000000000..3252b2aba3 --- /dev/null +++ b/npm-package/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/npm-package/endsWith.js b/npm-package/endsWith.js new file mode 100644 index 0000000000..76fc866e3e --- /dev/null +++ b/npm-package/endsWith.js @@ -0,0 +1,43 @@ +var baseClamp = require('./_baseClamp'), + baseToString = require('./_baseToString'), + toInteger = require('./toInteger'), + toString = require('./toString'); + +/** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ +function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; +} + +module.exports = endsWith; diff --git a/npm-package/entries.js b/npm-package/entries.js new file mode 100644 index 0000000000..7a88df2044 --- /dev/null +++ b/npm-package/entries.js @@ -0,0 +1 @@ +module.exports = require('./toPairs'); diff --git a/npm-package/entriesIn.js b/npm-package/entriesIn.js new file mode 100644 index 0000000000..f6c6331c1d --- /dev/null +++ b/npm-package/entriesIn.js @@ -0,0 +1 @@ +module.exports = require('./toPairsIn'); diff --git a/npm-package/eq.js b/npm-package/eq.js new file mode 100644 index 0000000000..a940688053 --- /dev/null +++ b/npm-package/eq.js @@ -0,0 +1,37 @@ +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +module.exports = eq; diff --git a/npm-package/escape.js b/npm-package/escape.js new file mode 100644 index 0000000000..9247e0029b --- /dev/null +++ b/npm-package/escape.js @@ -0,0 +1,43 @@ +var escapeHtmlChar = require('./_escapeHtmlChar'), + toString = require('./toString'); + +/** Used to match HTML entities and HTML characters. */ +var reUnescapedHtml = /[&<>"']/g, + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + +/** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ +function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; +} + +module.exports = escape; diff --git a/npm-package/escapeRegExp.js b/npm-package/escapeRegExp.js new file mode 100644 index 0000000000..0a58c69fc8 --- /dev/null +++ b/npm-package/escapeRegExp.js @@ -0,0 +1,32 @@ +var toString = require('./toString'); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + +/** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ +function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; +} + +module.exports = escapeRegExp; diff --git a/npm-package/every.js b/npm-package/every.js new file mode 100644 index 0000000000..25080dac49 --- /dev/null +++ b/npm-package/every.js @@ -0,0 +1,56 @@ +var arrayEvery = require('./_arrayEvery'), + baseEvery = require('./_baseEvery'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ +function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, baseIteratee(predicate, 3)); +} + +module.exports = every; diff --git a/npm-package/extend.js b/npm-package/extend.js new file mode 100644 index 0000000000..e00166c206 --- /dev/null +++ b/npm-package/extend.js @@ -0,0 +1 @@ +module.exports = require('./assignIn'); diff --git a/npm-package/extendWith.js b/npm-package/extendWith.js new file mode 100644 index 0000000000..dbdcb3b4e4 --- /dev/null +++ b/npm-package/extendWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInWith'); diff --git a/npm-package/fill.js b/npm-package/fill.js new file mode 100644 index 0000000000..ae13aa1c99 --- /dev/null +++ b/npm-package/fill.js @@ -0,0 +1,45 @@ +var baseFill = require('./_baseFill'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ +function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); +} + +module.exports = fill; diff --git a/npm-package/filter.js b/npm-package/filter.js new file mode 100644 index 0000000000..52616be8b0 --- /dev/null +++ b/npm-package/filter.js @@ -0,0 +1,48 @@ +var arrayFilter = require('./_arrayFilter'), + baseFilter = require('./_baseFilter'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'); + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ +function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, baseIteratee(predicate, 3)); +} + +module.exports = filter; diff --git a/npm-package/find.js b/npm-package/find.js new file mode 100644 index 0000000000..de732ccb49 --- /dev/null +++ b/npm-package/find.js @@ -0,0 +1,42 @@ +var createFind = require('./_createFind'), + findIndex = require('./findIndex'); + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = createFind(findIndex); + +module.exports = find; diff --git a/npm-package/findIndex.js b/npm-package/findIndex.js new file mode 100644 index 0000000000..4689069f81 --- /dev/null +++ b/npm-package/findIndex.js @@ -0,0 +1,55 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); +} + +module.exports = findIndex; diff --git a/npm-package/findKey.js b/npm-package/findKey.js new file mode 100644 index 0000000000..cac0248a9d --- /dev/null +++ b/npm-package/findKey.js @@ -0,0 +1,44 @@ +var baseFindKey = require('./_baseFindKey'), + baseForOwn = require('./_baseForOwn'), + baseIteratee = require('./_baseIteratee'); + +/** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ +function findKey(object, predicate) { + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn); +} + +module.exports = findKey; diff --git a/npm-package/findLast.js b/npm-package/findLast.js new file mode 100644 index 0000000000..70b4271dc3 --- /dev/null +++ b/npm-package/findLast.js @@ -0,0 +1,25 @@ +var createFind = require('./_createFind'), + findLastIndex = require('./findLastIndex'); + +/** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ +var findLast = createFind(findLastIndex); + +module.exports = findLast; diff --git a/npm-package/findLastIndex.js b/npm-package/findLastIndex.js new file mode 100644 index 0000000000..7da3431f6d --- /dev/null +++ b/npm-package/findLastIndex.js @@ -0,0 +1,59 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ +function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index, true); +} + +module.exports = findLastIndex; diff --git a/npm-package/findLastKey.js b/npm-package/findLastKey.js new file mode 100644 index 0000000000..66fb9fbcec --- /dev/null +++ b/npm-package/findLastKey.js @@ -0,0 +1,44 @@ +var baseFindKey = require('./_baseFindKey'), + baseForOwnRight = require('./_baseForOwnRight'), + baseIteratee = require('./_baseIteratee'); + +/** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ +function findLastKey(object, predicate) { + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight); +} + +module.exports = findLastKey; diff --git a/npm-package/first.js b/npm-package/first.js new file mode 100644 index 0000000000..53f4ad13ee --- /dev/null +++ b/npm-package/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/npm-package/flatMap.js b/npm-package/flatMap.js new file mode 100644 index 0000000000..e6685068f5 --- /dev/null +++ b/npm-package/flatMap.js @@ -0,0 +1,29 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'); + +/** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); +} + +module.exports = flatMap; diff --git a/npm-package/flatMapDeep.js b/npm-package/flatMapDeep.js new file mode 100644 index 0000000000..4653d60333 --- /dev/null +++ b/npm-package/flatMapDeep.js @@ -0,0 +1,31 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); +} + +module.exports = flatMapDeep; diff --git a/npm-package/flatMapDepth.js b/npm-package/flatMapDepth.js new file mode 100644 index 0000000000..6d72005c97 --- /dev/null +++ b/npm-package/flatMapDepth.js @@ -0,0 +1,31 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'), + toInteger = require('./toInteger'); + +/** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ +function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); +} + +module.exports = flatMapDepth; diff --git a/npm-package/flatten.js b/npm-package/flatten.js new file mode 100644 index 0000000000..3f09f7f770 --- /dev/null +++ b/npm-package/flatten.js @@ -0,0 +1,22 @@ +var baseFlatten = require('./_baseFlatten'); + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; +} + +module.exports = flatten; diff --git a/npm-package/flattenDeep.js b/npm-package/flattenDeep.js new file mode 100644 index 0000000000..8ad585cf49 --- /dev/null +++ b/npm-package/flattenDeep.js @@ -0,0 +1,25 @@ +var baseFlatten = require('./_baseFlatten'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ +function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; +} + +module.exports = flattenDeep; diff --git a/npm-package/flattenDepth.js b/npm-package/flattenDepth.js new file mode 100644 index 0000000000..441fdcc224 --- /dev/null +++ b/npm-package/flattenDepth.js @@ -0,0 +1,33 @@ +var baseFlatten = require('./_baseFlatten'), + toInteger = require('./toInteger'); + +/** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ +function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); +} + +module.exports = flattenDepth; diff --git a/npm-package/flip.js b/npm-package/flip.js new file mode 100644 index 0000000000..c28dd7896f --- /dev/null +++ b/npm-package/flip.js @@ -0,0 +1,28 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_FLIP_FLAG = 512; + +/** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ +function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); +} + +module.exports = flip; diff --git a/npm-package/floor.js b/npm-package/floor.js new file mode 100644 index 0000000000..ab6dfa28a4 --- /dev/null +++ b/npm-package/floor.js @@ -0,0 +1,26 @@ +var createRound = require('./_createRound'); + +/** + * Computes `number` rounded down to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round down. + * @param {number} [precision=0] The precision to round down to. + * @returns {number} Returns the rounded down number. + * @example + * + * _.floor(4.006); + * // => 4 + * + * _.floor(0.046, 2); + * // => 0.04 + * + * _.floor(4060, -2); + * // => 4000 + */ +var floor = createRound('floor'); + +module.exports = floor; diff --git a/npm-package/flow.js b/npm-package/flow.js new file mode 100644 index 0000000000..74b6b62d40 --- /dev/null +++ b/npm-package/flow.js @@ -0,0 +1,27 @@ +var createFlow = require('./_createFlow'); + +/** + * Creates a function that returns the result of invoking the given functions + * with the `this` binding of the created function, where each successive + * invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flowRight + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow([_.add, square]); + * addSquare(1, 2); + * // => 9 + */ +var flow = createFlow(); + +module.exports = flow; diff --git a/npm-package/flowRight.js b/npm-package/flowRight.js new file mode 100644 index 0000000000..1146141059 --- /dev/null +++ b/npm-package/flowRight.js @@ -0,0 +1,26 @@ +var createFlow = require('./_createFlow'); + +/** + * This method is like `_.flow` except that it creates a function that + * invokes the given functions from right to left. + * + * @static + * @since 3.0.0 + * @memberOf _ + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flow + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight([square, _.add]); + * addSquare(1, 2); + * // => 9 + */ +var flowRight = createFlow(true); + +module.exports = flowRight; diff --git a/npm-package/forEach.js b/npm-package/forEach.js new file mode 100644 index 0000000000..c64eaa73f1 --- /dev/null +++ b/npm-package/forEach.js @@ -0,0 +1,41 @@ +var arrayEach = require('./_arrayEach'), + baseEach = require('./_baseEach'), + castFunction = require('./_castFunction'), + isArray = require('./isArray'); + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, castFunction(iteratee)); +} + +module.exports = forEach; diff --git a/npm-package/forEachRight.js b/npm-package/forEachRight.js new file mode 100644 index 0000000000..7390ebaf85 --- /dev/null +++ b/npm-package/forEachRight.js @@ -0,0 +1,31 @@ +var arrayEachRight = require('./_arrayEachRight'), + baseEachRight = require('./_baseEachRight'), + castFunction = require('./_castFunction'), + isArray = require('./isArray'); + +/** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ +function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, castFunction(iteratee)); +} + +module.exports = forEachRight; diff --git a/npm-package/forIn.js b/npm-package/forIn.js new file mode 100644 index 0000000000..583a59638f --- /dev/null +++ b/npm-package/forIn.js @@ -0,0 +1,39 @@ +var baseFor = require('./_baseFor'), + castFunction = require('./_castFunction'), + keysIn = require('./keysIn'); + +/** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ +function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, castFunction(iteratee), keysIn); +} + +module.exports = forIn; diff --git a/npm-package/forInRight.js b/npm-package/forInRight.js new file mode 100644 index 0000000000..4aedf58af5 --- /dev/null +++ b/npm-package/forInRight.js @@ -0,0 +1,37 @@ +var baseForRight = require('./_baseForRight'), + castFunction = require('./_castFunction'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ +function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, castFunction(iteratee), keysIn); +} + +module.exports = forInRight; diff --git a/npm-package/forOwn.js b/npm-package/forOwn.js new file mode 100644 index 0000000000..94eed8402a --- /dev/null +++ b/npm-package/forOwn.js @@ -0,0 +1,36 @@ +var baseForOwn = require('./_baseForOwn'), + castFunction = require('./_castFunction'); + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && baseForOwn(object, castFunction(iteratee)); +} + +module.exports = forOwn; diff --git a/npm-package/forOwnRight.js b/npm-package/forOwnRight.js new file mode 100644 index 0000000000..86f338f032 --- /dev/null +++ b/npm-package/forOwnRight.js @@ -0,0 +1,34 @@ +var baseForOwnRight = require('./_baseForOwnRight'), + castFunction = require('./_castFunction'); + +/** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ +function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, castFunction(iteratee)); +} + +module.exports = forOwnRight; diff --git a/npm-package/fp.js b/npm-package/fp.js new file mode 100644 index 0000000000..e372dbbdf6 --- /dev/null +++ b/npm-package/fp.js @@ -0,0 +1,2 @@ +var _ = require('./lodash.min').runInContext(); +module.exports = require('./fp/_baseConvert')(_, _); diff --git a/npm-package/fp/F.js b/npm-package/fp/F.js new file mode 100644 index 0000000000..a05a63ad9c --- /dev/null +++ b/npm-package/fp/F.js @@ -0,0 +1 @@ +module.exports = require('./stubFalse'); diff --git a/npm-package/fp/T.js b/npm-package/fp/T.js new file mode 100644 index 0000000000..e2ba8ea569 --- /dev/null +++ b/npm-package/fp/T.js @@ -0,0 +1 @@ +module.exports = require('./stubTrue'); diff --git a/npm-package/fp/__.js b/npm-package/fp/__.js new file mode 100644 index 0000000000..4af98deb4e --- /dev/null +++ b/npm-package/fp/__.js @@ -0,0 +1 @@ +module.exports = require('./placeholder'); diff --git a/npm-package/fp/_baseConvert.js b/npm-package/fp/_baseConvert.js new file mode 100644 index 0000000000..9baf8e1902 --- /dev/null +++ b/npm-package/fp/_baseConvert.js @@ -0,0 +1,569 @@ +var mapping = require('./_mapping'), + fallbackHolder = require('./placeholder'); + +/** Built-in value reference. */ +var push = Array.prototype.push; + +/** + * 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); + }; +} + +/** + * A specialized version of `_.spread` which flattens the spread array into + * the arguments of the invoked `func`. + * + * @private + * @param {Function} func The function to spread arguments over. + * @param {number} start The start position of the spread. + * @returns {Function} Returns the new function. + */ +function flatSpread(func, start) { + return function() { + var length = arguments.length, + lastIndex = length - 1, + args = Array(length); + + while (length--) { + args[length] = arguments[length]; + } + var array = args[start], + otherArgs = args.slice(0, start); + + if (array) { + push.apply(otherArgs, array); + } + if (start != lastIndex) { + push.apply(otherArgs, args.slice(start + 1)); + } + return func.apply(this, otherArgs); + }; +} + +/** + * 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 wrapImmutable(func, cloner) { + return function() { + var length = arguments.length; + if (!length) { + return; + } + 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 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. + * @param {boolean} [options.fixed=true] Specify fixed arity. + * @param {boolean} [options.immutable=true] Specify immutable operations. + * @param {boolean} [options.rearg=true] Specify rearranging arguments. + * @returns {Function|Object} Returns the converted function or object. + */ +function baseConvert(util, name, func, options) { + var isLib = typeof name == 'function', + isObj = name === Object(name); + + if (isObj) { + options = func; + func = name; + name = undefined; + } + if (func == null) { + throw new TypeError; + } + options || (options = {}); + + var config = { + 'cap': 'cap' in options ? options.cap : true, + 'curry': 'curry' in options ? options.curry : true, + 'fixed': 'fixed' in options ? options.fixed : true, + 'immutable': 'immutable' in options ? options.immutable : true, + 'rearg': 'rearg' in options ? options.rearg : true + }; + + var defaultHolder = isLib ? func : fallbackHolder, + forceCurry = ('curry' in options) && options.curry, + forceFixed = ('fixed' in options) && options.fixed, + forceRearg = ('rearg' in options) && options.rearg, + pristine = isLib ? func.runInContext() : undefined; + + var helpers = isLib ? func : { + 'ary': util.ary, + 'assign': util.assign, + 'clone': util.clone, + 'curry': util.curry, + 'forEach': util.forEach, + 'isArray': util.isArray, + 'isError': util.isError, + 'isFunction': util.isFunction, + 'isWeakMap': util.isWeakMap, + 'iteratee': util.iteratee, + 'keys': util.keys, + 'rearg': util.rearg, + 'toInteger': util.toInteger, + 'toPath': util.toPath + }; + + var ary = helpers.ary, + assign = helpers.assign, + clone = helpers.clone, + curry = helpers.curry, + each = helpers.forEach, + isArray = helpers.isArray, + isError = helpers.isError, + isFunction = helpers.isFunction, + isWeakMap = helpers.isWeakMap, + keys = helpers.keys, + rearg = helpers.rearg, + toInteger = helpers.toInteger, + toPath = helpers.toPath; + + var aryMethodKeys = keys(mapping.aryMethod); + + var wrappers = { + 'castArray': function(castArray) { + return function() { + var value = arguments[0]; + return isArray(value) + ? castArray(cloneArray(value)) + : castArray.apply(undefined, arguments); + }; + }, + 'iteratee': function(iteratee) { + return function() { + var func = arguments[0], + arity = arguments[1], + result = iteratee(func, arity), + length = result.length; + + if (config.cap && typeof arity == 'number') { + arity = arity > 2 ? (arity - 2) : 1; + return (length && length <= arity) ? result : baseAry(result, arity); + } + return result; + }; + }, + 'mixin': function(mixin) { + return function(source) { + var func = this; + if (!isFunction(func)) { + return mixin(func, Object(source)); + } + var pairs = []; + each(keys(source), function(key) { + if (isFunction(source[key])) { + pairs.push([key, func.prototype[key]]); + } + }); + + mixin(func, Object(source)); + + each(pairs, function(pair) { + var value = pair[1]; + if (isFunction(value)) { + func.prototype[pair[0]] = value; + } else { + delete func.prototype[pair[0]]; + } + }); + return func; + }; + }, + 'nthArg': function(nthArg) { + return function(n) { + var arity = n < 0 ? 1 : (toInteger(n) + 1); + return curry(nthArg(n), arity); + }; + }, + 'rearg': function(rearg) { + return function(func, indexes) { + var arity = indexes ? indexes.length : 0; + return curry(rearg(func, indexes), arity); + }; + }, + 'runInContext': function(runInContext) { + return function(context) { + return baseConvert(util, runInContext(context), options); + }; + } + }; + + /*--------------------------------------------------------------------------*/ + + /** + * Casts `func` to a function with an arity capped iteratee if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @returns {Function} Returns the cast function. + */ + function castCap(name, func) { + if (config.cap) { + var indexes = mapping.iterateeRearg[name]; + if (indexes) { + return iterateeRearg(func, indexes); + } + var n = !isLib && mapping.iterateeAry[name]; + if (n) { + return iterateeAry(func, n); + } + } + return func; + } + + /** + * Casts `func` to a curried function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castCurry(name, func, n) { + return (forceCurry || (config.curry && n > 1)) + ? curry(func, n) + : func; + } + + /** + * Casts `func` to a fixed arity function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity cap. + * @returns {Function} Returns the cast function. + */ + function castFixed(name, func, n) { + if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { + var data = mapping.methodSpread[name], + start = data && data.start; + + return start === undefined ? ary(func, n) : flatSpread(func, start); + } + return func; + } + + /** + * Casts `func` to an rearged function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castRearg(name, func, n) { + return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name])) + ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) + : 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, + lastIndex = length - 1, + result = clone(Object(object)), + nested = result; + + while (nested != null && ++index < length) { + var key = path[index], + value = nested[key]; + + if (value != null && + !(isFunction(value) || isError(value) || isWeakMap(value))) { + nested[key] = clone(index == lastIndex ? value : 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 realName = mapping.aliasToReal[name] || name, + methodName = mapping.remap[realName] || realName, + oldOptions = options; + + return function(options) { + var newUtil = isLib ? pristine : helpers, + newFunc = isLib ? pristine[methodName] : func, + newOptions = assign(assign({}, oldOptions), options); + + return baseConvert(newUtil, realName, 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 transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @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, placeholder) { + var result, + realName = mapping.aliasToReal[name] || name, + wrapped = func, + wrapper = wrappers[realName]; + + if (wrapper) { + wrapped = wrapper(func); + } + else if (config.immutable) { + if (mapping.mutate.array[realName]) { + wrapped = wrapImmutable(func, cloneArray); + } + else if (mapping.mutate.object[realName]) { + wrapped = wrapImmutable(func, createCloner(func)); + } + else if (mapping.mutate.set[realName]) { + wrapped = wrapImmutable(func, cloneByPath); + } + } + each(aryMethodKeys, function(aryKey) { + each(mapping.aryMethod[aryKey], function(otherName) { + if (realName == otherName) { + var data = mapping.methodSpread[realName], + afterRearg = data && data.afterRearg; + + result = afterRearg + ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) + : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); + + result = castCap(realName, result); + result = castCurry(realName, result, aryKey); + return false; + } + }); + return !result; + }); + + result || (result = wrapped); + if (result == func) { + result = forceCurry ? curry(result, 1) : function() { + return func.apply(this, arguments); + }; + } + result.convert = createConverter(realName, func); + result.placeholder = func.placeholder = placeholder; + + return result; + } + + /*--------------------------------------------------------------------------*/ + + if (!isObj) { + return wrap(name, func, defaultHolder); + } + var _ = func; + + // Convert methods by ary cap. + var pairs = []; + each(aryMethodKeys, function(aryKey) { + each(mapping.aryMethod[aryKey], function(key) { + var func = _[mapping.remap[key] || key]; + if (func) { + pairs.push([key, wrap(key, func, _)]); + } + }); + }); + + // 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]; + }); + + _.convert = convertLib; + _.placeholder = _; + + // Assign aliases. + each(keys(_), function(key) { + each(mapping.realToAlias[key] || [], function(alias) { + _[alias] = _[key]; + }); + }); + + return _; +} + +module.exports = baseConvert; diff --git a/npm-package/fp/_convertBrowser.js b/npm-package/fp/_convertBrowser.js new file mode 100644 index 0000000000..bde030dc08 --- /dev/null +++ b/npm-package/fp/_convertBrowser.js @@ -0,0 +1,18 @@ +var baseConvert = require('./_baseConvert'); + +/** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @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`. + */ +function browserConvert(lodash, options) { + return baseConvert(lodash, lodash, options); +} + +if (typeof _ == 'function' && typeof _.runInContext == 'function') { + _ = browserConvert(_.runInContext()); +} +module.exports = browserConvert; diff --git a/npm-package/fp/_falseOptions.js b/npm-package/fp/_falseOptions.js new file mode 100644 index 0000000000..773235e343 --- /dev/null +++ b/npm-package/fp/_falseOptions.js @@ -0,0 +1,7 @@ +module.exports = { + 'cap': false, + 'curry': false, + 'fixed': false, + 'immutable': false, + 'rearg': false +}; diff --git a/npm-package/fp/_mapping.js b/npm-package/fp/_mapping.js new file mode 100644 index 0000000000..a642ec0584 --- /dev/null +++ b/npm-package/fp/_mapping.js @@ -0,0 +1,358 @@ +/** Used to map aliases to their real names. */ +exports.aliasToReal = { + + // Lodash aliases. + 'each': 'forEach', + 'eachRight': 'forEachRight', + 'entries': 'toPairs', + 'entriesIn': 'toPairsIn', + 'extend': 'assignIn', + 'extendAll': 'assignInAll', + 'extendAllWith': 'assignInAllWith', + 'extendWith': 'assignInWith', + 'first': 'head', + + // Methods that are curried variants of others. + 'conforms': 'conformsTo', + 'matches': 'isMatch', + 'property': 'get', + + // Ramda aliases. + '__': 'placeholder', + 'F': 'stubFalse', + 'T': 'stubTrue', + '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', + 'dropLast': 'dropRight', + 'dropLastWhile': 'dropRightWhile', + 'equals': 'isEqual', + 'identical': 'eq', + 'indexBy': 'keyBy', + 'init': 'initial', + 'invertObj': 'invert', + 'juxt': 'over', + 'omitAll': 'omit', + 'nAry': 'ary', + 'path': 'get', + 'pathEq': 'matchesProperty', + 'pathOr': 'getOr', + 'paths': 'at', + 'pickAll': 'pick', + 'pipe': 'flow', + 'pluck': 'map', + 'prop': 'get', + 'propEq': 'matchesProperty', + 'propOr': 'getOr', + 'props': 'at', + 'symmetricDifference': 'xor', + 'symmetricDifferenceBy': 'xorBy', + 'symmetricDifferenceWith': 'xorWith', + 'takeLast': 'takeRight', + 'takeLastWhile': 'takeRightWhile', + 'unapply': 'rest', + 'unnest': 'flatten', + 'useWith': 'overArgs', + 'where': 'conformsTo', + 'whereEq': 'isMatch', + 'zipObj': 'zipObject' +}; + +/** Used to map ary to method names. */ +exports.aryMethod = { + '1': [ + 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create', + 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow', + 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll', + 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse', + 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', + 'uniqueId', 'words', 'zipAll' + ], + '2': [ + 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith', + 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith', + 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN', + 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference', + 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', + 'every', 'filter', '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', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit', + 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', + 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', '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', + 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr', + 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', + 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', + 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', + 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', + 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', + 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', + 'xorWith', 'zipWith' + ], + '4': [ + 'fill', 'setWith', 'updateWith' + ] +}; + +/** Used to map ary to rearg configs. */ +exports.aryRearg = { + '2': [1, 0], + '3': [2, 0, 1], + '4': [3, 2, 0, 1] +}; + +/** Used to map method names to their iteratee ary. */ +exports.iterateeAry = { + 'dropRightWhile': 1, + 'dropWhile': 1, + 'every': 1, + 'filter': 1, + 'find': 1, + 'findFrom': 1, + 'findIndex': 1, + 'findIndexFrom': 1, + 'findKey': 1, + 'findLast': 1, + 'findLastFrom': 1, + 'findLastIndex': 1, + 'findLastIndexFrom': 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 +}; + +/** Used to map method names to iteratee rearg configs. */ +exports.iterateeRearg = { + 'mapKeys': [1], + 'reduceRight': [1, 0] +}; + +/** Used to map method names to rearg configs. */ +exports.methodRearg = { + 'assignInAllWith': [1, 0], + 'assignInWith': [1, 2, 0], + 'assignAllWith': [1, 0], + 'assignWith': [1, 2, 0], + 'differenceBy': [1, 2, 0], + 'differenceWith': [1, 2, 0], + 'getOr': [2, 1, 0], + 'intersectionBy': [1, 2, 0], + 'intersectionWith': [1, 2, 0], + 'isEqualWith': [1, 2, 0], + 'isMatchWith': [2, 1, 0], + 'mergeAllWith': [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], + 'rangeStep': [1, 2, 0], + 'rangeStepRight': [1, 2, 0], + 'setWith': [3, 1, 2, 0], + 'sortedIndexBy': [2, 1, 0], + 'sortedLastIndexBy': [2, 1, 0], + 'unionBy': [1, 2, 0], + 'unionWith': [1, 2, 0], + 'updateWith': [3, 1, 2, 0], + 'xorBy': [1, 2, 0], + 'xorWith': [1, 2, 0], + 'zipWith': [1, 2, 0] +}; + +/** Used to map method names to spread configs. */ +exports.methodSpread = { + 'assignAll': { 'start': 0 }, + 'assignAllWith': { 'start': 0 }, + 'assignInAll': { 'start': 0 }, + 'assignInAllWith': { 'start': 0 }, + 'defaultsAll': { 'start': 0 }, + 'defaultsDeepAll': { 'start': 0 }, + 'invokeArgs': { 'start': 2 }, + 'invokeArgsMap': { 'start': 2 }, + 'mergeAll': { 'start': 0 }, + 'mergeAllWith': { 'start': 0 }, + 'partial': { 'start': 1 }, + 'partialRight': { 'start': 1 }, + 'without': { 'start': 1 }, + 'zipAll': { 'start': 0 } +}; + +/** Used to identify methods which mutate arrays or objects. */ +exports.mutate = { + 'array': { + 'fill': true, + 'pull': true, + 'pullAll': true, + 'pullAllBy': true, + 'pullAllWith': true, + 'pullAt': true, + 'remove': true, + 'reverse': true + }, + 'object': { + 'assign': true, + 'assignAll': true, + 'assignAllWith': true, + 'assignIn': true, + 'assignInAll': true, + 'assignInAllWith': true, + 'assignInWith': true, + 'assignWith': true, + 'defaults': true, + 'defaultsAll': true, + 'defaultsDeep': true, + 'defaultsDeepAll': true, + 'merge': true, + 'mergeAll': true, + 'mergeAllWith': true, + 'mergeWith': true, + }, + 'set': { + 'set': true, + 'setWith': true, + 'unset': true, + 'update': true, + 'updateWith': true + } +}; + +/** Used to map real names to their aliases. */ +exports.realToAlias = (function() { + var hasOwnProperty = Object.prototype.hasOwnProperty, + object = exports.aliasToReal, + result = {}; + + for (var key in object) { + var value = object[key]; + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + return result; +}()); + +/** Used to map method names to other names. */ +exports.remap = { + 'assignAll': 'assign', + 'assignAllWith': 'assignWith', + 'assignInAll': 'assignIn', + 'assignInAllWith': 'assignInWith', + 'curryN': 'curry', + 'curryRightN': 'curryRight', + 'defaultsAll': 'defaults', + 'defaultsDeepAll': 'defaultsDeep', + 'findFrom': 'find', + 'findIndexFrom': 'findIndex', + 'findLastFrom': 'findLast', + 'findLastIndexFrom': 'findLastIndex', + 'getOr': 'get', + 'includesFrom': 'includes', + 'indexOfFrom': 'indexOf', + 'invokeArgs': 'invoke', + 'invokeArgsMap': 'invokeMap', + 'lastIndexOfFrom': 'lastIndexOf', + 'mergeAll': 'merge', + 'mergeAllWith': 'mergeWith', + 'padChars': 'pad', + 'padCharsEnd': 'padEnd', + 'padCharsStart': 'padStart', + 'propertyOf': 'get', + 'rangeStep': 'range', + 'rangeStepRight': 'rangeRight', + 'restFrom': 'rest', + 'spreadFrom': 'spread', + 'trimChars': 'trim', + 'trimCharsEnd': 'trimEnd', + 'trimCharsStart': 'trimStart', + 'zipAll': 'zip' +}; + +/** Used to track methods that skip fixing their arity. */ +exports.skipFixed = { + 'castArray': true, + 'flow': true, + 'flowRight': true, + 'iteratee': true, + 'mixin': true, + 'rearg': true, + 'runInContext': true +}; + +/** Used to track methods that skip rearranging arguments. */ +exports.skipRearg = { + 'add': true, + 'assign': true, + 'assignIn': true, + 'bind': true, + 'bindKey': true, + 'concat': true, + 'difference': true, + 'divide': true, + 'eq': true, + 'gt': true, + 'gte': true, + 'isEqual': true, + 'lt': true, + 'lte': true, + 'matchesProperty': true, + 'merge': true, + 'multiply': true, + 'overArgs': true, + 'partial': true, + 'partialRight': true, + 'propertyOf': true, + 'random': true, + 'range': true, + 'rangeRight': true, + 'subtract': true, + 'zip': true, + 'zipObject': true, + 'zipObjectDeep': true +}; diff --git a/npm-package/fp/_util.js b/npm-package/fp/_util.js new file mode 100644 index 0000000000..1dbf36f5d2 --- /dev/null +++ b/npm-package/fp/_util.js @@ -0,0 +1,16 @@ +module.exports = { + 'ary': require('../ary'), + 'assign': require('../_baseAssign'), + 'clone': require('../clone'), + 'curry': require('../curry'), + 'forEach': require('../_arrayEach'), + 'isArray': require('../isArray'), + 'isError': require('../isError'), + 'isFunction': require('../isFunction'), + 'isWeakMap': require('../isWeakMap'), + 'iteratee': require('../iteratee'), + 'keys': require('../_baseKeys'), + 'rearg': require('../rearg'), + 'toInteger': require('../toInteger'), + 'toPath': require('../toPath') +}; diff --git a/npm-package/fp/add.js b/npm-package/fp/add.js new file mode 100644 index 0000000000..816eeece34 --- /dev/null +++ b/npm-package/fp/add.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('add', require('../add')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/after.js b/npm-package/fp/after.js new file mode 100644 index 0000000000..21a0167ab2 --- /dev/null +++ b/npm-package/fp/after.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('after', require('../after')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/all.js b/npm-package/fp/all.js new file mode 100644 index 0000000000..d0839f77ed --- /dev/null +++ b/npm-package/fp/all.js @@ -0,0 +1 @@ +module.exports = require('./every'); diff --git a/npm-package/fp/allPass.js b/npm-package/fp/allPass.js new file mode 100644 index 0000000000..79b73ef845 --- /dev/null +++ b/npm-package/fp/allPass.js @@ -0,0 +1 @@ +module.exports = require('./overEvery'); diff --git a/npm-package/fp/always.js b/npm-package/fp/always.js new file mode 100644 index 0000000000..988770307b --- /dev/null +++ b/npm-package/fp/always.js @@ -0,0 +1 @@ +module.exports = require('./constant'); diff --git a/npm-package/fp/any.js b/npm-package/fp/any.js new file mode 100644 index 0000000000..900ac25e83 --- /dev/null +++ b/npm-package/fp/any.js @@ -0,0 +1 @@ +module.exports = require('./some'); diff --git a/npm-package/fp/anyPass.js b/npm-package/fp/anyPass.js new file mode 100644 index 0000000000..2774ab37a4 --- /dev/null +++ b/npm-package/fp/anyPass.js @@ -0,0 +1 @@ +module.exports = require('./overSome'); diff --git a/npm-package/fp/apply.js b/npm-package/fp/apply.js new file mode 100644 index 0000000000..2b75712962 --- /dev/null +++ b/npm-package/fp/apply.js @@ -0,0 +1 @@ +module.exports = require('./spread'); diff --git a/npm-package/fp/array.js b/npm-package/fp/array.js new file mode 100644 index 0000000000..fe939c2c26 --- /dev/null +++ b/npm-package/fp/array.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../array')); diff --git a/npm-package/fp/ary.js b/npm-package/fp/ary.js new file mode 100644 index 0000000000..8edf18778d --- /dev/null +++ b/npm-package/fp/ary.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('ary', require('../ary')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/assign.js b/npm-package/fp/assign.js new file mode 100644 index 0000000000..23f47af17e --- /dev/null +++ b/npm-package/fp/assign.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assign', require('../assign')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/assignAll.js b/npm-package/fp/assignAll.js new file mode 100644 index 0000000000..b1d36c7ef8 --- /dev/null +++ b/npm-package/fp/assignAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAll', require('../assign')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/assignAllWith.js b/npm-package/fp/assignAllWith.js new file mode 100644 index 0000000000..21e836e6f0 --- /dev/null +++ b/npm-package/fp/assignAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAllWith', require('../assignWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/assignIn.js b/npm-package/fp/assignIn.js new file mode 100644 index 0000000000..6e7c65fad8 --- /dev/null +++ b/npm-package/fp/assignIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignIn', require('../assignIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/assignInAll.js b/npm-package/fp/assignInAll.js new file mode 100644 index 0000000000..7ba75dba11 --- /dev/null +++ b/npm-package/fp/assignInAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAll', require('../assignIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/assignInAllWith.js b/npm-package/fp/assignInAllWith.js new file mode 100644 index 0000000000..e766903d4c --- /dev/null +++ b/npm-package/fp/assignInAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAllWith', require('../assignInWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/assignInWith.js b/npm-package/fp/assignInWith.js new file mode 100644 index 0000000000..acb5923675 --- /dev/null +++ b/npm-package/fp/assignInWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInWith', require('../assignInWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/assignWith.js b/npm-package/fp/assignWith.js new file mode 100644 index 0000000000..eb925212d5 --- /dev/null +++ b/npm-package/fp/assignWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignWith', require('../assignWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/assoc.js b/npm-package/fp/assoc.js new file mode 100644 index 0000000000..7648820c99 --- /dev/null +++ b/npm-package/fp/assoc.js @@ -0,0 +1 @@ +module.exports = require('./set'); diff --git a/npm-package/fp/assocPath.js b/npm-package/fp/assocPath.js new file mode 100644 index 0000000000..7648820c99 --- /dev/null +++ b/npm-package/fp/assocPath.js @@ -0,0 +1 @@ +module.exports = require('./set'); diff --git a/npm-package/fp/at.js b/npm-package/fp/at.js new file mode 100644 index 0000000000..cc39d257c6 --- /dev/null +++ b/npm-package/fp/at.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('at', require('../at')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/attempt.js b/npm-package/fp/attempt.js new file mode 100644 index 0000000000..26ca42ea04 --- /dev/null +++ b/npm-package/fp/attempt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('attempt', require('../attempt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/before.js b/npm-package/fp/before.js new file mode 100644 index 0000000000..7a2de65d27 --- /dev/null +++ b/npm-package/fp/before.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('before', require('../before')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/bind.js b/npm-package/fp/bind.js new file mode 100644 index 0000000000..5cbe4f302f --- /dev/null +++ b/npm-package/fp/bind.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bind', require('../bind')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/bindAll.js b/npm-package/fp/bindAll.js new file mode 100644 index 0000000000..6b4a4a0f27 --- /dev/null +++ b/npm-package/fp/bindAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bindAll', require('../bindAll')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/bindKey.js b/npm-package/fp/bindKey.js new file mode 100644 index 0000000000..6a46c6b19c --- /dev/null +++ b/npm-package/fp/bindKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bindKey', require('../bindKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/camelCase.js b/npm-package/fp/camelCase.js new file mode 100644 index 0000000000..87b77b4937 --- /dev/null +++ b/npm-package/fp/camelCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('camelCase', require('../camelCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/capitalize.js b/npm-package/fp/capitalize.js new file mode 100644 index 0000000000..cac74e14f8 --- /dev/null +++ b/npm-package/fp/capitalize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('capitalize', require('../capitalize'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/castArray.js b/npm-package/fp/castArray.js new file mode 100644 index 0000000000..8681c099ea --- /dev/null +++ b/npm-package/fp/castArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('castArray', require('../castArray')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/ceil.js b/npm-package/fp/ceil.js new file mode 100644 index 0000000000..f416b7294c --- /dev/null +++ b/npm-package/fp/ceil.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('ceil', require('../ceil')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/chain.js b/npm-package/fp/chain.js new file mode 100644 index 0000000000..604fe398b1 --- /dev/null +++ b/npm-package/fp/chain.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('chain', require('../chain'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/chunk.js b/npm-package/fp/chunk.js new file mode 100644 index 0000000000..871ab08580 --- /dev/null +++ b/npm-package/fp/chunk.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('chunk', require('../chunk')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/clamp.js b/npm-package/fp/clamp.js new file mode 100644 index 0000000000..3b06c01ce1 --- /dev/null +++ b/npm-package/fp/clamp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('clamp', require('../clamp')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/clone.js b/npm-package/fp/clone.js new file mode 100644 index 0000000000..cadb59c917 --- /dev/null +++ b/npm-package/fp/clone.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('clone', require('../clone'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/cloneDeep.js b/npm-package/fp/cloneDeep.js new file mode 100644 index 0000000000..a6107aac94 --- /dev/null +++ b/npm-package/fp/cloneDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneDeep', require('../cloneDeep'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/cloneDeepWith.js b/npm-package/fp/cloneDeepWith.js new file mode 100644 index 0000000000..6f01e44a34 --- /dev/null +++ b/npm-package/fp/cloneDeepWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneDeepWith', require('../cloneDeepWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/cloneWith.js b/npm-package/fp/cloneWith.js new file mode 100644 index 0000000000..aa8857810e --- /dev/null +++ b/npm-package/fp/cloneWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneWith', require('../cloneWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/collection.js b/npm-package/fp/collection.js new file mode 100644 index 0000000000..fc8b328a0d --- /dev/null +++ b/npm-package/fp/collection.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../collection')); diff --git a/npm-package/fp/commit.js b/npm-package/fp/commit.js new file mode 100644 index 0000000000..130a894f89 --- /dev/null +++ b/npm-package/fp/commit.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('commit', require('../commit'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/compact.js b/npm-package/fp/compact.js new file mode 100644 index 0000000000..ce8f7a1ac3 --- /dev/null +++ b/npm-package/fp/compact.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('compact', require('../compact'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/complement.js b/npm-package/fp/complement.js new file mode 100644 index 0000000000..93eb462b35 --- /dev/null +++ b/npm-package/fp/complement.js @@ -0,0 +1 @@ +module.exports = require('./negate'); diff --git a/npm-package/fp/compose.js b/npm-package/fp/compose.js new file mode 100644 index 0000000000..1954e94239 --- /dev/null +++ b/npm-package/fp/compose.js @@ -0,0 +1 @@ +module.exports = require('./flowRight'); diff --git a/npm-package/fp/concat.js b/npm-package/fp/concat.js new file mode 100644 index 0000000000..e59346ad98 --- /dev/null +++ b/npm-package/fp/concat.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('concat', require('../concat')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/cond.js b/npm-package/fp/cond.js new file mode 100644 index 0000000000..6a0120efd4 --- /dev/null +++ b/npm-package/fp/cond.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cond', require('../cond'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/conforms.js b/npm-package/fp/conforms.js new file mode 100644 index 0000000000..3247f64a8c --- /dev/null +++ b/npm-package/fp/conforms.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/npm-package/fp/conformsTo.js b/npm-package/fp/conformsTo.js new file mode 100644 index 0000000000..aa7f41ec09 --- /dev/null +++ b/npm-package/fp/conformsTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('conformsTo', require('../conformsTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/constant.js b/npm-package/fp/constant.js new file mode 100644 index 0000000000..9e406fc09c --- /dev/null +++ b/npm-package/fp/constant.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('constant', require('../constant'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/contains.js b/npm-package/fp/contains.js new file mode 100644 index 0000000000..594722af59 --- /dev/null +++ b/npm-package/fp/contains.js @@ -0,0 +1 @@ +module.exports = require('./includes'); diff --git a/npm-package/fp/convert.js b/npm-package/fp/convert.js new file mode 100644 index 0000000000..4795dc4246 --- /dev/null +++ b/npm-package/fp/convert.js @@ -0,0 +1,18 @@ +var baseConvert = require('./_baseConvert'), + util = require('./_util'); + +/** + * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last + * 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. + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function|Object} Returns the converted function or object. + */ +function convert(name, func, options) { + return baseConvert(util, name, func, options); +} + +module.exports = convert; diff --git a/npm-package/fp/countBy.js b/npm-package/fp/countBy.js new file mode 100644 index 0000000000..dfa464326f --- /dev/null +++ b/npm-package/fp/countBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('countBy', require('../countBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/create.js b/npm-package/fp/create.js new file mode 100644 index 0000000000..752025fb83 --- /dev/null +++ b/npm-package/fp/create.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('create', require('../create')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/curry.js b/npm-package/fp/curry.js new file mode 100644 index 0000000000..b0b4168c50 --- /dev/null +++ b/npm-package/fp/curry.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curry', require('../curry')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/curryN.js b/npm-package/fp/curryN.js new file mode 100644 index 0000000000..2ae7d00a62 --- /dev/null +++ b/npm-package/fp/curryN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryN', require('../curry')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/curryRight.js b/npm-package/fp/curryRight.js new file mode 100644 index 0000000000..cb619eb5d9 --- /dev/null +++ b/npm-package/fp/curryRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryRight', require('../curryRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/curryRightN.js b/npm-package/fp/curryRightN.js new file mode 100644 index 0000000000..2495afc89c --- /dev/null +++ b/npm-package/fp/curryRightN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryRightN', require('../curryRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/date.js b/npm-package/fp/date.js new file mode 100644 index 0000000000..82cb952bc4 --- /dev/null +++ b/npm-package/fp/date.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../date')); diff --git a/npm-package/fp/debounce.js b/npm-package/fp/debounce.js new file mode 100644 index 0000000000..26122293af --- /dev/null +++ b/npm-package/fp/debounce.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('debounce', require('../debounce')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/deburr.js b/npm-package/fp/deburr.js new file mode 100644 index 0000000000..96463ab88e --- /dev/null +++ b/npm-package/fp/deburr.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('deburr', require('../deburr'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/defaultTo.js b/npm-package/fp/defaultTo.js new file mode 100644 index 0000000000..d6b52a4447 --- /dev/null +++ b/npm-package/fp/defaultTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultTo', require('../defaultTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/defaults.js b/npm-package/fp/defaults.js new file mode 100644 index 0000000000..e1a8e6e7db --- /dev/null +++ b/npm-package/fp/defaults.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaults', require('../defaults')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/defaultsAll.js b/npm-package/fp/defaultsAll.js new file mode 100644 index 0000000000..238fcc3c2f --- /dev/null +++ b/npm-package/fp/defaultsAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsAll', require('../defaults')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/defaultsDeep.js b/npm-package/fp/defaultsDeep.js new file mode 100644 index 0000000000..1f172ff944 --- /dev/null +++ b/npm-package/fp/defaultsDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsDeep', require('../defaultsDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/defaultsDeepAll.js b/npm-package/fp/defaultsDeepAll.js new file mode 100644 index 0000000000..6835f2f079 --- /dev/null +++ b/npm-package/fp/defaultsDeepAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsDeepAll', require('../defaultsDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/defer.js b/npm-package/fp/defer.js new file mode 100644 index 0000000000..ec7990fe22 --- /dev/null +++ b/npm-package/fp/defer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defer', require('../defer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/delay.js b/npm-package/fp/delay.js new file mode 100644 index 0000000000..556dbd568e --- /dev/null +++ b/npm-package/fp/delay.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('delay', require('../delay')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/difference.js b/npm-package/fp/difference.js new file mode 100644 index 0000000000..2d0376542a --- /dev/null +++ b/npm-package/fp/difference.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('difference', require('../difference')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/differenceBy.js b/npm-package/fp/differenceBy.js new file mode 100644 index 0000000000..2f914910a9 --- /dev/null +++ b/npm-package/fp/differenceBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('differenceBy', require('../differenceBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/differenceWith.js b/npm-package/fp/differenceWith.js new file mode 100644 index 0000000000..bcf5ad2e11 --- /dev/null +++ b/npm-package/fp/differenceWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('differenceWith', require('../differenceWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/dissoc.js b/npm-package/fp/dissoc.js new file mode 100644 index 0000000000..7ec7be190b --- /dev/null +++ b/npm-package/fp/dissoc.js @@ -0,0 +1 @@ +module.exports = require('./unset'); diff --git a/npm-package/fp/dissocPath.js b/npm-package/fp/dissocPath.js new file mode 100644 index 0000000000..7ec7be190b --- /dev/null +++ b/npm-package/fp/dissocPath.js @@ -0,0 +1 @@ +module.exports = require('./unset'); diff --git a/npm-package/fp/divide.js b/npm-package/fp/divide.js new file mode 100644 index 0000000000..82048c5e02 --- /dev/null +++ b/npm-package/fp/divide.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('divide', require('../divide')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/drop.js b/npm-package/fp/drop.js new file mode 100644 index 0000000000..2fa9b4faa5 --- /dev/null +++ b/npm-package/fp/drop.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('drop', require('../drop')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/dropLast.js b/npm-package/fp/dropLast.js new file mode 100644 index 0000000000..174e525512 --- /dev/null +++ b/npm-package/fp/dropLast.js @@ -0,0 +1 @@ +module.exports = require('./dropRight'); diff --git a/npm-package/fp/dropLastWhile.js b/npm-package/fp/dropLastWhile.js new file mode 100644 index 0000000000..be2a9d24ae --- /dev/null +++ b/npm-package/fp/dropLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./dropRightWhile'); diff --git a/npm-package/fp/dropRight.js b/npm-package/fp/dropRight.js new file mode 100644 index 0000000000..e98881fcd4 --- /dev/null +++ b/npm-package/fp/dropRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropRight', require('../dropRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/dropRightWhile.js b/npm-package/fp/dropRightWhile.js new file mode 100644 index 0000000000..cacaa70191 --- /dev/null +++ b/npm-package/fp/dropRightWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropRightWhile', require('../dropRightWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/dropWhile.js b/npm-package/fp/dropWhile.js new file mode 100644 index 0000000000..285f864d12 --- /dev/null +++ b/npm-package/fp/dropWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropWhile', require('../dropWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/each.js b/npm-package/fp/each.js new file mode 100644 index 0000000000..8800f42046 --- /dev/null +++ b/npm-package/fp/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/npm-package/fp/eachRight.js b/npm-package/fp/eachRight.js new file mode 100644 index 0000000000..3252b2aba3 --- /dev/null +++ b/npm-package/fp/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/npm-package/fp/endsWith.js b/npm-package/fp/endsWith.js new file mode 100644 index 0000000000..17dc2a4951 --- /dev/null +++ b/npm-package/fp/endsWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('endsWith', require('../endsWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/entries.js b/npm-package/fp/entries.js new file mode 100644 index 0000000000..7a88df2044 --- /dev/null +++ b/npm-package/fp/entries.js @@ -0,0 +1 @@ +module.exports = require('./toPairs'); diff --git a/npm-package/fp/entriesIn.js b/npm-package/fp/entriesIn.js new file mode 100644 index 0000000000..f6c6331c1d --- /dev/null +++ b/npm-package/fp/entriesIn.js @@ -0,0 +1 @@ +module.exports = require('./toPairsIn'); diff --git a/npm-package/fp/eq.js b/npm-package/fp/eq.js new file mode 100644 index 0000000000..9a3d21bf1d --- /dev/null +++ b/npm-package/fp/eq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('eq', require('../eq')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/equals.js b/npm-package/fp/equals.js new file mode 100644 index 0000000000..e6a5ce0caf --- /dev/null +++ b/npm-package/fp/equals.js @@ -0,0 +1 @@ +module.exports = require('./isEqual'); diff --git a/npm-package/fp/escape.js b/npm-package/fp/escape.js new file mode 100644 index 0000000000..52c1fbba60 --- /dev/null +++ b/npm-package/fp/escape.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('escape', require('../escape'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/escapeRegExp.js b/npm-package/fp/escapeRegExp.js new file mode 100644 index 0000000000..369b2eff6e --- /dev/null +++ b/npm-package/fp/escapeRegExp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('escapeRegExp', require('../escapeRegExp'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/every.js b/npm-package/fp/every.js new file mode 100644 index 0000000000..95c2776c33 --- /dev/null +++ b/npm-package/fp/every.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('every', require('../every')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/extend.js b/npm-package/fp/extend.js new file mode 100644 index 0000000000..e00166c206 --- /dev/null +++ b/npm-package/fp/extend.js @@ -0,0 +1 @@ +module.exports = require('./assignIn'); diff --git a/npm-package/fp/extendAll.js b/npm-package/fp/extendAll.js new file mode 100644 index 0000000000..cc55b64fcc --- /dev/null +++ b/npm-package/fp/extendAll.js @@ -0,0 +1 @@ +module.exports = require('./assignInAll'); diff --git a/npm-package/fp/extendAllWith.js b/npm-package/fp/extendAllWith.js new file mode 100644 index 0000000000..6679d208bc --- /dev/null +++ b/npm-package/fp/extendAllWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInAllWith'); diff --git a/npm-package/fp/extendWith.js b/npm-package/fp/extendWith.js new file mode 100644 index 0000000000..dbdcb3b4e4 --- /dev/null +++ b/npm-package/fp/extendWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInWith'); diff --git a/npm-package/fp/fill.js b/npm-package/fp/fill.js new file mode 100644 index 0000000000..b2d47e84eb --- /dev/null +++ b/npm-package/fp/fill.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('fill', require('../fill')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/filter.js b/npm-package/fp/filter.js new file mode 100644 index 0000000000..796d501ce8 --- /dev/null +++ b/npm-package/fp/filter.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('filter', require('../filter')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/find.js b/npm-package/fp/find.js new file mode 100644 index 0000000000..f805d336aa --- /dev/null +++ b/npm-package/fp/find.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('find', require('../find')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/findFrom.js b/npm-package/fp/findFrom.js new file mode 100644 index 0000000000..da8275e840 --- /dev/null +++ b/npm-package/fp/findFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findFrom', require('../find')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/findIndex.js b/npm-package/fp/findIndex.js new file mode 100644 index 0000000000..8c15fd1160 --- /dev/null +++ b/npm-package/fp/findIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findIndex', require('../findIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/findIndexFrom.js b/npm-package/fp/findIndexFrom.js new file mode 100644 index 0000000000..32e98cb953 --- /dev/null +++ b/npm-package/fp/findIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findIndexFrom', require('../findIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/findKey.js b/npm-package/fp/findKey.js new file mode 100644 index 0000000000..475bcfa8a5 --- /dev/null +++ b/npm-package/fp/findKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findKey', require('../findKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/findLast.js b/npm-package/fp/findLast.js new file mode 100644 index 0000000000..093fe94e74 --- /dev/null +++ b/npm-package/fp/findLast.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLast', require('../findLast')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/findLastFrom.js b/npm-package/fp/findLastFrom.js new file mode 100644 index 0000000000..76c38fbad2 --- /dev/null +++ b/npm-package/fp/findLastFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastFrom', require('../findLast')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/findLastIndex.js b/npm-package/fp/findLastIndex.js new file mode 100644 index 0000000000..36986df0b8 --- /dev/null +++ b/npm-package/fp/findLastIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastIndex', require('../findLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/findLastIndexFrom.js b/npm-package/fp/findLastIndexFrom.js new file mode 100644 index 0000000000..34c8176cf1 --- /dev/null +++ b/npm-package/fp/findLastIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastIndexFrom', require('../findLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/findLastKey.js b/npm-package/fp/findLastKey.js new file mode 100644 index 0000000000..5f81b604e8 --- /dev/null +++ b/npm-package/fp/findLastKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastKey', require('../findLastKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/first.js b/npm-package/fp/first.js new file mode 100644 index 0000000000..53f4ad13ee --- /dev/null +++ b/npm-package/fp/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/npm-package/fp/flatMap.js b/npm-package/fp/flatMap.js new file mode 100644 index 0000000000..d01dc4d048 --- /dev/null +++ b/npm-package/fp/flatMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMap', require('../flatMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/flatMapDeep.js b/npm-package/fp/flatMapDeep.js new file mode 100644 index 0000000000..569c42eb9f --- /dev/null +++ b/npm-package/fp/flatMapDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMapDeep', require('../flatMapDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/flatMapDepth.js b/npm-package/fp/flatMapDepth.js new file mode 100644 index 0000000000..6eb68fdeed --- /dev/null +++ b/npm-package/fp/flatMapDepth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMapDepth', require('../flatMapDepth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/flatten.js b/npm-package/fp/flatten.js new file mode 100644 index 0000000000..30425d8962 --- /dev/null +++ b/npm-package/fp/flatten.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatten', require('../flatten'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/flattenDeep.js b/npm-package/fp/flattenDeep.js new file mode 100644 index 0000000000..aed5db27c0 --- /dev/null +++ b/npm-package/fp/flattenDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flattenDeep', require('../flattenDeep'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/flattenDepth.js b/npm-package/fp/flattenDepth.js new file mode 100644 index 0000000000..ad65e378ef --- /dev/null +++ b/npm-package/fp/flattenDepth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flattenDepth', require('../flattenDepth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/flip.js b/npm-package/fp/flip.js new file mode 100644 index 0000000000..0547e7b4ea --- /dev/null +++ b/npm-package/fp/flip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flip', require('../flip'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/floor.js b/npm-package/fp/floor.js new file mode 100644 index 0000000000..a6cf3358ed --- /dev/null +++ b/npm-package/fp/floor.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('floor', require('../floor')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/flow.js b/npm-package/fp/flow.js new file mode 100644 index 0000000000..cd83677a62 --- /dev/null +++ b/npm-package/fp/flow.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flow', require('../flow')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/flowRight.js b/npm-package/fp/flowRight.js new file mode 100644 index 0000000000..972a5b9b1c --- /dev/null +++ b/npm-package/fp/flowRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flowRight', require('../flowRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/forEach.js b/npm-package/fp/forEach.js new file mode 100644 index 0000000000..2f494521c8 --- /dev/null +++ b/npm-package/fp/forEach.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forEach', require('../forEach')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/forEachRight.js b/npm-package/fp/forEachRight.js new file mode 100644 index 0000000000..3ff97336bb --- /dev/null +++ b/npm-package/fp/forEachRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forEachRight', require('../forEachRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/forIn.js b/npm-package/fp/forIn.js new file mode 100644 index 0000000000..9341749b1f --- /dev/null +++ b/npm-package/fp/forIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forIn', require('../forIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/forInRight.js b/npm-package/fp/forInRight.js new file mode 100644 index 0000000000..cecf8bbfa6 --- /dev/null +++ b/npm-package/fp/forInRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forInRight', require('../forInRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/forOwn.js b/npm-package/fp/forOwn.js new file mode 100644 index 0000000000..246449e9a8 --- /dev/null +++ b/npm-package/fp/forOwn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forOwn', require('../forOwn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/forOwnRight.js b/npm-package/fp/forOwnRight.js new file mode 100644 index 0000000000..c5e826e0d7 --- /dev/null +++ b/npm-package/fp/forOwnRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forOwnRight', require('../forOwnRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/fromPairs.js b/npm-package/fp/fromPairs.js new file mode 100644 index 0000000000..f8cc5968cd --- /dev/null +++ b/npm-package/fp/fromPairs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('fromPairs', require('../fromPairs')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/function.js b/npm-package/fp/function.js new file mode 100644 index 0000000000..dfe69b1fa0 --- /dev/null +++ b/npm-package/fp/function.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../function')); diff --git a/npm-package/fp/functions.js b/npm-package/fp/functions.js new file mode 100644 index 0000000000..09d1bb1baa --- /dev/null +++ b/npm-package/fp/functions.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('functions', require('../functions'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/functionsIn.js b/npm-package/fp/functionsIn.js new file mode 100644 index 0000000000..2cfeb83ebb --- /dev/null +++ b/npm-package/fp/functionsIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('functionsIn', require('../functionsIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/get.js b/npm-package/fp/get.js new file mode 100644 index 0000000000..6d3a32863e --- /dev/null +++ b/npm-package/fp/get.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('get', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/getOr.js b/npm-package/fp/getOr.js new file mode 100644 index 0000000000..7dbf771f0c --- /dev/null +++ b/npm-package/fp/getOr.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('getOr', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/groupBy.js b/npm-package/fp/groupBy.js new file mode 100644 index 0000000000..fc0bc78a57 --- /dev/null +++ b/npm-package/fp/groupBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('groupBy', require('../groupBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/gt.js b/npm-package/fp/gt.js new file mode 100644 index 0000000000..9e57c8085a --- /dev/null +++ b/npm-package/fp/gt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('gt', require('../gt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/gte.js b/npm-package/fp/gte.js new file mode 100644 index 0000000000..4584786389 --- /dev/null +++ b/npm-package/fp/gte.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('gte', require('../gte')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/has.js b/npm-package/fp/has.js new file mode 100644 index 0000000000..b901298398 --- /dev/null +++ b/npm-package/fp/has.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('has', require('../has')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/hasIn.js b/npm-package/fp/hasIn.js new file mode 100644 index 0000000000..b3c3d1a3f3 --- /dev/null +++ b/npm-package/fp/hasIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('hasIn', require('../hasIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/head.js b/npm-package/fp/head.js new file mode 100644 index 0000000000..2694f0a21d --- /dev/null +++ b/npm-package/fp/head.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('head', require('../head'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/identical.js b/npm-package/fp/identical.js new file mode 100644 index 0000000000..85563f4a46 --- /dev/null +++ b/npm-package/fp/identical.js @@ -0,0 +1 @@ +module.exports = require('./eq'); diff --git a/npm-package/fp/identity.js b/npm-package/fp/identity.js new file mode 100644 index 0000000000..096415a5de --- /dev/null +++ b/npm-package/fp/identity.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('identity', require('../identity'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/inRange.js b/npm-package/fp/inRange.js new file mode 100644 index 0000000000..202d940bae --- /dev/null +++ b/npm-package/fp/inRange.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('inRange', require('../inRange')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/includes.js b/npm-package/fp/includes.js new file mode 100644 index 0000000000..11467805ce --- /dev/null +++ b/npm-package/fp/includes.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('includes', require('../includes')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/includesFrom.js b/npm-package/fp/includesFrom.js new file mode 100644 index 0000000000..683afdb463 --- /dev/null +++ b/npm-package/fp/includesFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('includesFrom', require('../includes')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/indexBy.js b/npm-package/fp/indexBy.js new file mode 100644 index 0000000000..7e64bc0fcd --- /dev/null +++ b/npm-package/fp/indexBy.js @@ -0,0 +1 @@ +module.exports = require('./keyBy'); diff --git a/npm-package/fp/indexOf.js b/npm-package/fp/indexOf.js new file mode 100644 index 0000000000..524658eb95 --- /dev/null +++ b/npm-package/fp/indexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('indexOf', require('../indexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/indexOfFrom.js b/npm-package/fp/indexOfFrom.js new file mode 100644 index 0000000000..d99c822f46 --- /dev/null +++ b/npm-package/fp/indexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('indexOfFrom', require('../indexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/init.js b/npm-package/fp/init.js new file mode 100644 index 0000000000..2f88d8b0e1 --- /dev/null +++ b/npm-package/fp/init.js @@ -0,0 +1 @@ +module.exports = require('./initial'); diff --git a/npm-package/fp/initial.js b/npm-package/fp/initial.js new file mode 100644 index 0000000000..b732ba0bd6 --- /dev/null +++ b/npm-package/fp/initial.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('initial', require('../initial'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/intersection.js b/npm-package/fp/intersection.js new file mode 100644 index 0000000000..52936d560c --- /dev/null +++ b/npm-package/fp/intersection.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersection', require('../intersection')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/intersectionBy.js b/npm-package/fp/intersectionBy.js new file mode 100644 index 0000000000..72629f277d --- /dev/null +++ b/npm-package/fp/intersectionBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersectionBy', require('../intersectionBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/intersectionWith.js b/npm-package/fp/intersectionWith.js new file mode 100644 index 0000000000..e064f400f8 --- /dev/null +++ b/npm-package/fp/intersectionWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersectionWith', require('../intersectionWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/invert.js b/npm-package/fp/invert.js new file mode 100644 index 0000000000..2d5d1f0d45 --- /dev/null +++ b/npm-package/fp/invert.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invert', require('../invert')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/invertBy.js b/npm-package/fp/invertBy.js new file mode 100644 index 0000000000..63ca97ecb2 --- /dev/null +++ b/npm-package/fp/invertBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invertBy', require('../invertBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/invertObj.js b/npm-package/fp/invertObj.js new file mode 100644 index 0000000000..f1d842e49b --- /dev/null +++ b/npm-package/fp/invertObj.js @@ -0,0 +1 @@ +module.exports = require('./invert'); diff --git a/npm-package/fp/invoke.js b/npm-package/fp/invoke.js new file mode 100644 index 0000000000..fcf17f0d57 --- /dev/null +++ b/npm-package/fp/invoke.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invoke', require('../invoke')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/invokeArgs.js b/npm-package/fp/invokeArgs.js new file mode 100644 index 0000000000..d3f2953fa3 --- /dev/null +++ b/npm-package/fp/invokeArgs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeArgs', require('../invoke')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/invokeArgsMap.js b/npm-package/fp/invokeArgsMap.js new file mode 100644 index 0000000000..eaa9f84ffb --- /dev/null +++ b/npm-package/fp/invokeArgsMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeArgsMap', require('../invokeMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/invokeMap.js b/npm-package/fp/invokeMap.js new file mode 100644 index 0000000000..6515fd73f1 --- /dev/null +++ b/npm-package/fp/invokeMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeMap', require('../invokeMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isArguments.js b/npm-package/fp/isArguments.js new file mode 100644 index 0000000000..1d93c9e599 --- /dev/null +++ b/npm-package/fp/isArguments.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArguments', require('../isArguments'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isArray.js b/npm-package/fp/isArray.js new file mode 100644 index 0000000000..ba7ade8ddc --- /dev/null +++ b/npm-package/fp/isArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArray', require('../isArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isArrayBuffer.js b/npm-package/fp/isArrayBuffer.js new file mode 100644 index 0000000000..5088513faf --- /dev/null +++ b/npm-package/fp/isArrayBuffer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayBuffer', require('../isArrayBuffer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isArrayLike.js b/npm-package/fp/isArrayLike.js new file mode 100644 index 0000000000..8f1856bf6f --- /dev/null +++ b/npm-package/fp/isArrayLike.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayLike', require('../isArrayLike'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isArrayLikeObject.js b/npm-package/fp/isArrayLikeObject.js new file mode 100644 index 0000000000..21084984bc --- /dev/null +++ b/npm-package/fp/isArrayLikeObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayLikeObject', require('../isArrayLikeObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isBoolean.js b/npm-package/fp/isBoolean.js new file mode 100644 index 0000000000..9339f75b1f --- /dev/null +++ b/npm-package/fp/isBoolean.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isBoolean', require('../isBoolean'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isBuffer.js b/npm-package/fp/isBuffer.js new file mode 100644 index 0000000000..e60b123818 --- /dev/null +++ b/npm-package/fp/isBuffer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isBuffer', require('../isBuffer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isDate.js b/npm-package/fp/isDate.js new file mode 100644 index 0000000000..dc41d089ec --- /dev/null +++ b/npm-package/fp/isDate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isDate', require('../isDate'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isElement.js b/npm-package/fp/isElement.js new file mode 100644 index 0000000000..18ee039a2d --- /dev/null +++ b/npm-package/fp/isElement.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isElement', require('../isElement'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isEmpty.js b/npm-package/fp/isEmpty.js new file mode 100644 index 0000000000..0f4ae841e2 --- /dev/null +++ b/npm-package/fp/isEmpty.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEmpty', require('../isEmpty'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isEqual.js b/npm-package/fp/isEqual.js new file mode 100644 index 0000000000..41383865f2 --- /dev/null +++ b/npm-package/fp/isEqual.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEqual', require('../isEqual')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isEqualWith.js b/npm-package/fp/isEqualWith.js new file mode 100644 index 0000000000..029ff5cdaa --- /dev/null +++ b/npm-package/fp/isEqualWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEqualWith', require('../isEqualWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isError.js b/npm-package/fp/isError.js new file mode 100644 index 0000000000..3dfd81ccc2 --- /dev/null +++ b/npm-package/fp/isError.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isError', require('../isError'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isFinite.js b/npm-package/fp/isFinite.js new file mode 100644 index 0000000000..0b647b841e --- /dev/null +++ b/npm-package/fp/isFinite.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isFinite', require('../isFinite'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isFunction.js b/npm-package/fp/isFunction.js new file mode 100644 index 0000000000..ff8e5c4585 --- /dev/null +++ b/npm-package/fp/isFunction.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isFunction', require('../isFunction'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isInteger.js b/npm-package/fp/isInteger.js new file mode 100644 index 0000000000..67af4ff6db --- /dev/null +++ b/npm-package/fp/isInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isInteger', require('../isInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isLength.js b/npm-package/fp/isLength.js new file mode 100644 index 0000000000..fc101c5a64 --- /dev/null +++ b/npm-package/fp/isLength.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isLength', require('../isLength'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isMap.js b/npm-package/fp/isMap.js new file mode 100644 index 0000000000..a209aa66fc --- /dev/null +++ b/npm-package/fp/isMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMap', require('../isMap'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isMatch.js b/npm-package/fp/isMatch.js new file mode 100644 index 0000000000..6264ca17fa --- /dev/null +++ b/npm-package/fp/isMatch.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMatch', require('../isMatch')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isMatchWith.js b/npm-package/fp/isMatchWith.js new file mode 100644 index 0000000000..d95f319353 --- /dev/null +++ b/npm-package/fp/isMatchWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMatchWith', require('../isMatchWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isNaN.js b/npm-package/fp/isNaN.js new file mode 100644 index 0000000000..66a978f111 --- /dev/null +++ b/npm-package/fp/isNaN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNaN', require('../isNaN'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isNative.js b/npm-package/fp/isNative.js new file mode 100644 index 0000000000..3d775ba953 --- /dev/null +++ b/npm-package/fp/isNative.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNative', require('../isNative'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isNil.js b/npm-package/fp/isNil.js new file mode 100644 index 0000000000..5952c028a9 --- /dev/null +++ b/npm-package/fp/isNil.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNil', require('../isNil'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isNull.js b/npm-package/fp/isNull.js new file mode 100644 index 0000000000..f201a354b4 --- /dev/null +++ b/npm-package/fp/isNull.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNull', require('../isNull'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isNumber.js b/npm-package/fp/isNumber.js new file mode 100644 index 0000000000..a2b5fa049f --- /dev/null +++ b/npm-package/fp/isNumber.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNumber', require('../isNumber'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isObject.js b/npm-package/fp/isObject.js new file mode 100644 index 0000000000..231ace03bc --- /dev/null +++ b/npm-package/fp/isObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isObject', require('../isObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isObjectLike.js b/npm-package/fp/isObjectLike.js new file mode 100644 index 0000000000..f16082e6fe --- /dev/null +++ b/npm-package/fp/isObjectLike.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isObjectLike', require('../isObjectLike'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isPlainObject.js b/npm-package/fp/isPlainObject.js new file mode 100644 index 0000000000..b5bea90d3a --- /dev/null +++ b/npm-package/fp/isPlainObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isPlainObject', require('../isPlainObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isRegExp.js b/npm-package/fp/isRegExp.js new file mode 100644 index 0000000000..12a1a3d718 --- /dev/null +++ b/npm-package/fp/isRegExp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isRegExp', require('../isRegExp'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isSafeInteger.js b/npm-package/fp/isSafeInteger.js new file mode 100644 index 0000000000..7230f5520a --- /dev/null +++ b/npm-package/fp/isSafeInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSafeInteger', require('../isSafeInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isSet.js b/npm-package/fp/isSet.js new file mode 100644 index 0000000000..35c01f6fa1 --- /dev/null +++ b/npm-package/fp/isSet.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSet', require('../isSet'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isString.js b/npm-package/fp/isString.js new file mode 100644 index 0000000000..1fd0679ef8 --- /dev/null +++ b/npm-package/fp/isString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isString', require('../isString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isSymbol.js b/npm-package/fp/isSymbol.js new file mode 100644 index 0000000000..38676956da --- /dev/null +++ b/npm-package/fp/isSymbol.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSymbol', require('../isSymbol'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isTypedArray.js b/npm-package/fp/isTypedArray.js new file mode 100644 index 0000000000..8567953875 --- /dev/null +++ b/npm-package/fp/isTypedArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isTypedArray', require('../isTypedArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isUndefined.js b/npm-package/fp/isUndefined.js new file mode 100644 index 0000000000..ddbca31ca7 --- /dev/null +++ b/npm-package/fp/isUndefined.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isUndefined', require('../isUndefined'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isWeakMap.js b/npm-package/fp/isWeakMap.js new file mode 100644 index 0000000000..ef60c613c4 --- /dev/null +++ b/npm-package/fp/isWeakMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isWeakMap', require('../isWeakMap'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/isWeakSet.js b/npm-package/fp/isWeakSet.js new file mode 100644 index 0000000000..c99bfaa6d9 --- /dev/null +++ b/npm-package/fp/isWeakSet.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isWeakSet', require('../isWeakSet'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/iteratee.js b/npm-package/fp/iteratee.js new file mode 100644 index 0000000000..9f0f71738a --- /dev/null +++ b/npm-package/fp/iteratee.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('iteratee', require('../iteratee')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/join.js b/npm-package/fp/join.js new file mode 100644 index 0000000000..a220e003c4 --- /dev/null +++ b/npm-package/fp/join.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('join', require('../join')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/juxt.js b/npm-package/fp/juxt.js new file mode 100644 index 0000000000..f71e04e000 --- /dev/null +++ b/npm-package/fp/juxt.js @@ -0,0 +1 @@ +module.exports = require('./over'); diff --git a/npm-package/fp/kebabCase.js b/npm-package/fp/kebabCase.js new file mode 100644 index 0000000000..60737f17cd --- /dev/null +++ b/npm-package/fp/kebabCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('kebabCase', require('../kebabCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/keyBy.js b/npm-package/fp/keyBy.js new file mode 100644 index 0000000000..9a6a85d422 --- /dev/null +++ b/npm-package/fp/keyBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keyBy', require('../keyBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/keys.js b/npm-package/fp/keys.js new file mode 100644 index 0000000000..e12bb07f13 --- /dev/null +++ b/npm-package/fp/keys.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keys', require('../keys'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/keysIn.js b/npm-package/fp/keysIn.js new file mode 100644 index 0000000000..f3eb36a8d2 --- /dev/null +++ b/npm-package/fp/keysIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keysIn', require('../keysIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/lang.js b/npm-package/fp/lang.js new file mode 100644 index 0000000000..08cc9c14bd --- /dev/null +++ b/npm-package/fp/lang.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../lang')); diff --git a/npm-package/fp/last.js b/npm-package/fp/last.js new file mode 100644 index 0000000000..0f716993fc --- /dev/null +++ b/npm-package/fp/last.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('last', require('../last'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/lastIndexOf.js b/npm-package/fp/lastIndexOf.js new file mode 100644 index 0000000000..ddf39c3013 --- /dev/null +++ b/npm-package/fp/lastIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lastIndexOf', require('../lastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/lastIndexOfFrom.js b/npm-package/fp/lastIndexOfFrom.js new file mode 100644 index 0000000000..1ff6a0b5ad --- /dev/null +++ b/npm-package/fp/lastIndexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lastIndexOfFrom', require('../lastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/lowerCase.js b/npm-package/fp/lowerCase.js new file mode 100644 index 0000000000..ea64bc15d6 --- /dev/null +++ b/npm-package/fp/lowerCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lowerCase', require('../lowerCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/lowerFirst.js b/npm-package/fp/lowerFirst.js new file mode 100644 index 0000000000..539720a3da --- /dev/null +++ b/npm-package/fp/lowerFirst.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lowerFirst', require('../lowerFirst'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/lt.js b/npm-package/fp/lt.js new file mode 100644 index 0000000000..a31d21ecc6 --- /dev/null +++ b/npm-package/fp/lt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lt', require('../lt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/lte.js b/npm-package/fp/lte.js new file mode 100644 index 0000000000..d795d10ee7 --- /dev/null +++ b/npm-package/fp/lte.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lte', require('../lte')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/map.js b/npm-package/fp/map.js new file mode 100644 index 0000000000..cf98794362 --- /dev/null +++ b/npm-package/fp/map.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('map', require('../map')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/mapKeys.js b/npm-package/fp/mapKeys.js new file mode 100644 index 0000000000..1684587099 --- /dev/null +++ b/npm-package/fp/mapKeys.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mapKeys', require('../mapKeys')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/mapValues.js b/npm-package/fp/mapValues.js new file mode 100644 index 0000000000..4004972751 --- /dev/null +++ b/npm-package/fp/mapValues.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mapValues', require('../mapValues')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/matches.js b/npm-package/fp/matches.js new file mode 100644 index 0000000000..29d1e1e4f1 --- /dev/null +++ b/npm-package/fp/matches.js @@ -0,0 +1 @@ +module.exports = require('./isMatch'); diff --git a/npm-package/fp/matchesProperty.js b/npm-package/fp/matchesProperty.js new file mode 100644 index 0000000000..4575bd2431 --- /dev/null +++ b/npm-package/fp/matchesProperty.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('matchesProperty', require('../matchesProperty')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/math.js b/npm-package/fp/math.js new file mode 100644 index 0000000000..e8f50f7927 --- /dev/null +++ b/npm-package/fp/math.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../math')); diff --git a/npm-package/fp/max.js b/npm-package/fp/max.js new file mode 100644 index 0000000000..a66acac220 --- /dev/null +++ b/npm-package/fp/max.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('max', require('../max'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/maxBy.js b/npm-package/fp/maxBy.js new file mode 100644 index 0000000000..d083fd64fd --- /dev/null +++ b/npm-package/fp/maxBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('maxBy', require('../maxBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/mean.js b/npm-package/fp/mean.js new file mode 100644 index 0000000000..31172460c3 --- /dev/null +++ b/npm-package/fp/mean.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mean', require('../mean'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/meanBy.js b/npm-package/fp/meanBy.js new file mode 100644 index 0000000000..556f25edfe --- /dev/null +++ b/npm-package/fp/meanBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('meanBy', require('../meanBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/memoize.js b/npm-package/fp/memoize.js new file mode 100644 index 0000000000..638eec63ba --- /dev/null +++ b/npm-package/fp/memoize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('memoize', require('../memoize')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/merge.js b/npm-package/fp/merge.js new file mode 100644 index 0000000000..ac66adde12 --- /dev/null +++ b/npm-package/fp/merge.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('merge', require('../merge')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/mergeAll.js b/npm-package/fp/mergeAll.js new file mode 100644 index 0000000000..a3674d6716 --- /dev/null +++ b/npm-package/fp/mergeAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAll', require('../merge')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/mergeAllWith.js b/npm-package/fp/mergeAllWith.js new file mode 100644 index 0000000000..4bd4206dc7 --- /dev/null +++ b/npm-package/fp/mergeAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAllWith', require('../mergeWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/mergeWith.js b/npm-package/fp/mergeWith.js new file mode 100644 index 0000000000..00d44d5e1a --- /dev/null +++ b/npm-package/fp/mergeWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeWith', require('../mergeWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/method.js b/npm-package/fp/method.js new file mode 100644 index 0000000000..f4060c6878 --- /dev/null +++ b/npm-package/fp/method.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('method', require('../method')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/methodOf.js b/npm-package/fp/methodOf.js new file mode 100644 index 0000000000..61399056f3 --- /dev/null +++ b/npm-package/fp/methodOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('methodOf', require('../methodOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/min.js b/npm-package/fp/min.js new file mode 100644 index 0000000000..d12c6b40d3 --- /dev/null +++ b/npm-package/fp/min.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('min', require('../min'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/minBy.js b/npm-package/fp/minBy.js new file mode 100644 index 0000000000..fdb9e24d8a --- /dev/null +++ b/npm-package/fp/minBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('minBy', require('../minBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/mixin.js b/npm-package/fp/mixin.js new file mode 100644 index 0000000000..332e6fbfdd --- /dev/null +++ b/npm-package/fp/mixin.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mixin', require('../mixin')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/multiply.js b/npm-package/fp/multiply.js new file mode 100644 index 0000000000..4dcf0b0d4a --- /dev/null +++ b/npm-package/fp/multiply.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('multiply', require('../multiply')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/nAry.js b/npm-package/fp/nAry.js new file mode 100644 index 0000000000..f262a76ccd --- /dev/null +++ b/npm-package/fp/nAry.js @@ -0,0 +1 @@ +module.exports = require('./ary'); diff --git a/npm-package/fp/negate.js b/npm-package/fp/negate.js new file mode 100644 index 0000000000..8b6dc7c5b8 --- /dev/null +++ b/npm-package/fp/negate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('negate', require('../negate'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/next.js b/npm-package/fp/next.js new file mode 100644 index 0000000000..140155e232 --- /dev/null +++ b/npm-package/fp/next.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('next', require('../next'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/noop.js b/npm-package/fp/noop.js new file mode 100644 index 0000000000..b9e32cc8cd --- /dev/null +++ b/npm-package/fp/noop.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('noop', require('../noop'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/now.js b/npm-package/fp/now.js new file mode 100644 index 0000000000..6de2068aac --- /dev/null +++ b/npm-package/fp/now.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('now', require('../now'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/nth.js b/npm-package/fp/nth.js new file mode 100644 index 0000000000..da4fda7409 --- /dev/null +++ b/npm-package/fp/nth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('nth', require('../nth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/nthArg.js b/npm-package/fp/nthArg.js new file mode 100644 index 0000000000..fce3165942 --- /dev/null +++ b/npm-package/fp/nthArg.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('nthArg', require('../nthArg')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/number.js b/npm-package/fp/number.js new file mode 100644 index 0000000000..5c10b8842d --- /dev/null +++ b/npm-package/fp/number.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../number')); diff --git a/npm-package/fp/object.js b/npm-package/fp/object.js new file mode 100644 index 0000000000..ae39a1346c --- /dev/null +++ b/npm-package/fp/object.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../object')); diff --git a/npm-package/fp/omit.js b/npm-package/fp/omit.js new file mode 100644 index 0000000000..fd685291e6 --- /dev/null +++ b/npm-package/fp/omit.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('omit', require('../omit')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/omitAll.js b/npm-package/fp/omitAll.js new file mode 100644 index 0000000000..144cf4b96e --- /dev/null +++ b/npm-package/fp/omitAll.js @@ -0,0 +1 @@ +module.exports = require('./omit'); diff --git a/npm-package/fp/omitBy.js b/npm-package/fp/omitBy.js new file mode 100644 index 0000000000..90df738026 --- /dev/null +++ b/npm-package/fp/omitBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('omitBy', require('../omitBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/once.js b/npm-package/fp/once.js new file mode 100644 index 0000000000..f8f0a5c73e --- /dev/null +++ b/npm-package/fp/once.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('once', require('../once'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/orderBy.js b/npm-package/fp/orderBy.js new file mode 100644 index 0000000000..848e210754 --- /dev/null +++ b/npm-package/fp/orderBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('orderBy', require('../orderBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/over.js b/npm-package/fp/over.js new file mode 100644 index 0000000000..01eba7b984 --- /dev/null +++ b/npm-package/fp/over.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('over', require('../over')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/overArgs.js b/npm-package/fp/overArgs.js new file mode 100644 index 0000000000..738556f0c0 --- /dev/null +++ b/npm-package/fp/overArgs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overArgs', require('../overArgs')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/overEvery.js b/npm-package/fp/overEvery.js new file mode 100644 index 0000000000..9f5a032dc7 --- /dev/null +++ b/npm-package/fp/overEvery.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overEvery', require('../overEvery')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/overSome.js b/npm-package/fp/overSome.js new file mode 100644 index 0000000000..15939d5865 --- /dev/null +++ b/npm-package/fp/overSome.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overSome', require('../overSome')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/pad.js b/npm-package/fp/pad.js new file mode 100644 index 0000000000..f1dea4a98f --- /dev/null +++ b/npm-package/fp/pad.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pad', require('../pad')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/padChars.js b/npm-package/fp/padChars.js new file mode 100644 index 0000000000..d6e0804cd6 --- /dev/null +++ b/npm-package/fp/padChars.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padChars', require('../pad')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/padCharsEnd.js b/npm-package/fp/padCharsEnd.js new file mode 100644 index 0000000000..d4ab79ad30 --- /dev/null +++ b/npm-package/fp/padCharsEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padCharsEnd', require('../padEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/padCharsStart.js b/npm-package/fp/padCharsStart.js new file mode 100644 index 0000000000..a08a30000a --- /dev/null +++ b/npm-package/fp/padCharsStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padCharsStart', require('../padStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/padEnd.js b/npm-package/fp/padEnd.js new file mode 100644 index 0000000000..a8522ec36a --- /dev/null +++ b/npm-package/fp/padEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padEnd', require('../padEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/padStart.js b/npm-package/fp/padStart.js new file mode 100644 index 0000000000..f4ca79d4af --- /dev/null +++ b/npm-package/fp/padStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padStart', require('../padStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/parseInt.js b/npm-package/fp/parseInt.js new file mode 100644 index 0000000000..27314ccbca --- /dev/null +++ b/npm-package/fp/parseInt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('parseInt', require('../parseInt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/partial.js b/npm-package/fp/partial.js new file mode 100644 index 0000000000..5d4601598b --- /dev/null +++ b/npm-package/fp/partial.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partial', require('../partial')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/partialRight.js b/npm-package/fp/partialRight.js new file mode 100644 index 0000000000..7f05fed0ab --- /dev/null +++ b/npm-package/fp/partialRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partialRight', require('../partialRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/partition.js b/npm-package/fp/partition.js new file mode 100644 index 0000000000..2ebcacc1f4 --- /dev/null +++ b/npm-package/fp/partition.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partition', require('../partition')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/path.js b/npm-package/fp/path.js new file mode 100644 index 0000000000..b29cfb2139 --- /dev/null +++ b/npm-package/fp/path.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/npm-package/fp/pathEq.js b/npm-package/fp/pathEq.js new file mode 100644 index 0000000000..36c027a383 --- /dev/null +++ b/npm-package/fp/pathEq.js @@ -0,0 +1 @@ +module.exports = require('./matchesProperty'); diff --git a/npm-package/fp/pathOr.js b/npm-package/fp/pathOr.js new file mode 100644 index 0000000000..4ab582091b --- /dev/null +++ b/npm-package/fp/pathOr.js @@ -0,0 +1 @@ +module.exports = require('./getOr'); diff --git a/npm-package/fp/paths.js b/npm-package/fp/paths.js new file mode 100644 index 0000000000..1eb7950ac0 --- /dev/null +++ b/npm-package/fp/paths.js @@ -0,0 +1 @@ +module.exports = require('./at'); diff --git a/npm-package/fp/pick.js b/npm-package/fp/pick.js new file mode 100644 index 0000000000..197393de1d --- /dev/null +++ b/npm-package/fp/pick.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pick', require('../pick')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/pickAll.js b/npm-package/fp/pickAll.js new file mode 100644 index 0000000000..a8ecd46131 --- /dev/null +++ b/npm-package/fp/pickAll.js @@ -0,0 +1 @@ +module.exports = require('./pick'); diff --git a/npm-package/fp/pickBy.js b/npm-package/fp/pickBy.js new file mode 100644 index 0000000000..d832d16b6c --- /dev/null +++ b/npm-package/fp/pickBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pickBy', require('../pickBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/pipe.js b/npm-package/fp/pipe.js new file mode 100644 index 0000000000..b2e1e2cc8d --- /dev/null +++ b/npm-package/fp/pipe.js @@ -0,0 +1 @@ +module.exports = require('./flow'); diff --git a/npm-package/fp/placeholder.js b/npm-package/fp/placeholder.js new file mode 100644 index 0000000000..1ce17393b9 --- /dev/null +++ b/npm-package/fp/placeholder.js @@ -0,0 +1,6 @@ +/** + * The default argument placeholder value for methods. + * + * @type {Object} + */ +module.exports = {}; diff --git a/npm-package/fp/plant.js b/npm-package/fp/plant.js new file mode 100644 index 0000000000..eca8f32b4a --- /dev/null +++ b/npm-package/fp/plant.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('plant', require('../plant'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/pluck.js b/npm-package/fp/pluck.js new file mode 100644 index 0000000000..0d1e1abfaf --- /dev/null +++ b/npm-package/fp/pluck.js @@ -0,0 +1 @@ +module.exports = require('./map'); diff --git a/npm-package/fp/prop.js b/npm-package/fp/prop.js new file mode 100644 index 0000000000..b29cfb2139 --- /dev/null +++ b/npm-package/fp/prop.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/npm-package/fp/propEq.js b/npm-package/fp/propEq.js new file mode 100644 index 0000000000..36c027a383 --- /dev/null +++ b/npm-package/fp/propEq.js @@ -0,0 +1 @@ +module.exports = require('./matchesProperty'); diff --git a/npm-package/fp/propOr.js b/npm-package/fp/propOr.js new file mode 100644 index 0000000000..4ab582091b --- /dev/null +++ b/npm-package/fp/propOr.js @@ -0,0 +1 @@ +module.exports = require('./getOr'); diff --git a/npm-package/fp/property.js b/npm-package/fp/property.js new file mode 100644 index 0000000000..b29cfb2139 --- /dev/null +++ b/npm-package/fp/property.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/npm-package/fp/propertyOf.js b/npm-package/fp/propertyOf.js new file mode 100644 index 0000000000..f6273ee47a --- /dev/null +++ b/npm-package/fp/propertyOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('propertyOf', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/props.js b/npm-package/fp/props.js new file mode 100644 index 0000000000..1eb7950ac0 --- /dev/null +++ b/npm-package/fp/props.js @@ -0,0 +1 @@ +module.exports = require('./at'); diff --git a/npm-package/fp/pull.js b/npm-package/fp/pull.js new file mode 100644 index 0000000000..8d7084f079 --- /dev/null +++ b/npm-package/fp/pull.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pull', require('../pull')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/pullAll.js b/npm-package/fp/pullAll.js new file mode 100644 index 0000000000..98d5c9a73a --- /dev/null +++ b/npm-package/fp/pullAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAll', require('../pullAll')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/pullAllBy.js b/npm-package/fp/pullAllBy.js new file mode 100644 index 0000000000..876bc3bf1c --- /dev/null +++ b/npm-package/fp/pullAllBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAllBy', require('../pullAllBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/pullAllWith.js b/npm-package/fp/pullAllWith.js new file mode 100644 index 0000000000..f71ba4d73d --- /dev/null +++ b/npm-package/fp/pullAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAllWith', require('../pullAllWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/pullAt.js b/npm-package/fp/pullAt.js new file mode 100644 index 0000000000..e8b3bb6125 --- /dev/null +++ b/npm-package/fp/pullAt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAt', require('../pullAt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/random.js b/npm-package/fp/random.js new file mode 100644 index 0000000000..99d852e4ab --- /dev/null +++ b/npm-package/fp/random.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('random', require('../random')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/range.js b/npm-package/fp/range.js new file mode 100644 index 0000000000..a6bb59118b --- /dev/null +++ b/npm-package/fp/range.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('range', require('../range')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/rangeRight.js b/npm-package/fp/rangeRight.js new file mode 100644 index 0000000000..fdb712f94e --- /dev/null +++ b/npm-package/fp/rangeRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeRight', require('../rangeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/rangeStep.js b/npm-package/fp/rangeStep.js new file mode 100644 index 0000000000..d72dfc200c --- /dev/null +++ b/npm-package/fp/rangeStep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStep', require('../range')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/rangeStepRight.js b/npm-package/fp/rangeStepRight.js new file mode 100644 index 0000000000..8b2a67bc65 --- /dev/null +++ b/npm-package/fp/rangeStepRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStepRight', require('../rangeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/rearg.js b/npm-package/fp/rearg.js new file mode 100644 index 0000000000..678e02a32a --- /dev/null +++ b/npm-package/fp/rearg.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rearg', require('../rearg')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/reduce.js b/npm-package/fp/reduce.js new file mode 100644 index 0000000000..4cef0a0083 --- /dev/null +++ b/npm-package/fp/reduce.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reduce', require('../reduce')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/reduceRight.js b/npm-package/fp/reduceRight.js new file mode 100644 index 0000000000..caf5bb5155 --- /dev/null +++ b/npm-package/fp/reduceRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reduceRight', require('../reduceRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/reject.js b/npm-package/fp/reject.js new file mode 100644 index 0000000000..c163273861 --- /dev/null +++ b/npm-package/fp/reject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reject', require('../reject')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/remove.js b/npm-package/fp/remove.js new file mode 100644 index 0000000000..e9d1327368 --- /dev/null +++ b/npm-package/fp/remove.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('remove', require('../remove')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/repeat.js b/npm-package/fp/repeat.js new file mode 100644 index 0000000000..08470f247a --- /dev/null +++ b/npm-package/fp/repeat.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('repeat', require('../repeat')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/replace.js b/npm-package/fp/replace.js new file mode 100644 index 0000000000..2227db6257 --- /dev/null +++ b/npm-package/fp/replace.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('replace', require('../replace')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/rest.js b/npm-package/fp/rest.js new file mode 100644 index 0000000000..c1f3d64bdc --- /dev/null +++ b/npm-package/fp/rest.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rest', require('../rest')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/restFrom.js b/npm-package/fp/restFrom.js new file mode 100644 index 0000000000..714e42b5d6 --- /dev/null +++ b/npm-package/fp/restFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('restFrom', require('../rest')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/result.js b/npm-package/fp/result.js new file mode 100644 index 0000000000..f86ce07126 --- /dev/null +++ b/npm-package/fp/result.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('result', require('../result')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/reverse.js b/npm-package/fp/reverse.js new file mode 100644 index 0000000000..07c9f5e493 --- /dev/null +++ b/npm-package/fp/reverse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reverse', require('../reverse')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/round.js b/npm-package/fp/round.js new file mode 100644 index 0000000000..4c0e5c8299 --- /dev/null +++ b/npm-package/fp/round.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('round', require('../round')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/sample.js b/npm-package/fp/sample.js new file mode 100644 index 0000000000..6bea1254de --- /dev/null +++ b/npm-package/fp/sample.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sample', require('../sample'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/sampleSize.js b/npm-package/fp/sampleSize.js new file mode 100644 index 0000000000..359ed6fcda --- /dev/null +++ b/npm-package/fp/sampleSize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sampleSize', require('../sampleSize')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/seq.js b/npm-package/fp/seq.js new file mode 100644 index 0000000000..d8f42b0a4d --- /dev/null +++ b/npm-package/fp/seq.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../seq')); diff --git a/npm-package/fp/set.js b/npm-package/fp/set.js new file mode 100644 index 0000000000..0b56a56c8a --- /dev/null +++ b/npm-package/fp/set.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('set', require('../set')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/setWith.js b/npm-package/fp/setWith.js new file mode 100644 index 0000000000..0b584952b6 --- /dev/null +++ b/npm-package/fp/setWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('setWith', require('../setWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/shuffle.js b/npm-package/fp/shuffle.js new file mode 100644 index 0000000000..aa3a1ca5be --- /dev/null +++ b/npm-package/fp/shuffle.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('shuffle', require('../shuffle'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/size.js b/npm-package/fp/size.js new file mode 100644 index 0000000000..7490136e1c --- /dev/null +++ b/npm-package/fp/size.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('size', require('../size'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/slice.js b/npm-package/fp/slice.js new file mode 100644 index 0000000000..15945d321f --- /dev/null +++ b/npm-package/fp/slice.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('slice', require('../slice')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/snakeCase.js b/npm-package/fp/snakeCase.js new file mode 100644 index 0000000000..a0ff7808eb --- /dev/null +++ b/npm-package/fp/snakeCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('snakeCase', require('../snakeCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/some.js b/npm-package/fp/some.js new file mode 100644 index 0000000000..a4fa2d0060 --- /dev/null +++ b/npm-package/fp/some.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('some', require('../some')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/sortBy.js b/npm-package/fp/sortBy.js new file mode 100644 index 0000000000..e0790ad5b7 --- /dev/null +++ b/npm-package/fp/sortBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortBy', require('../sortBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/sortedIndex.js b/npm-package/fp/sortedIndex.js new file mode 100644 index 0000000000..364a05435e --- /dev/null +++ b/npm-package/fp/sortedIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndex', require('../sortedIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/sortedIndexBy.js b/npm-package/fp/sortedIndexBy.js new file mode 100644 index 0000000000..9593dbd13d --- /dev/null +++ b/npm-package/fp/sortedIndexBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndexBy', require('../sortedIndexBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/sortedIndexOf.js b/npm-package/fp/sortedIndexOf.js new file mode 100644 index 0000000000..c9084cab6a --- /dev/null +++ b/npm-package/fp/sortedIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndexOf', require('../sortedIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/sortedLastIndex.js b/npm-package/fp/sortedLastIndex.js new file mode 100644 index 0000000000..47fe241af7 --- /dev/null +++ b/npm-package/fp/sortedLastIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndex', require('../sortedLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/sortedLastIndexBy.js b/npm-package/fp/sortedLastIndexBy.js new file mode 100644 index 0000000000..0f9a347326 --- /dev/null +++ b/npm-package/fp/sortedLastIndexBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndexBy', require('../sortedLastIndexBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/sortedLastIndexOf.js b/npm-package/fp/sortedLastIndexOf.js new file mode 100644 index 0000000000..0d4d93278f --- /dev/null +++ b/npm-package/fp/sortedLastIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndexOf', require('../sortedLastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/sortedUniq.js b/npm-package/fp/sortedUniq.js new file mode 100644 index 0000000000..882d283702 --- /dev/null +++ b/npm-package/fp/sortedUniq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedUniq', require('../sortedUniq'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/sortedUniqBy.js b/npm-package/fp/sortedUniqBy.js new file mode 100644 index 0000000000..033db91ca9 --- /dev/null +++ b/npm-package/fp/sortedUniqBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedUniqBy', require('../sortedUniqBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/split.js b/npm-package/fp/split.js new file mode 100644 index 0000000000..14de1a7efd --- /dev/null +++ b/npm-package/fp/split.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('split', require('../split')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/spread.js b/npm-package/fp/spread.js new file mode 100644 index 0000000000..2d11b70722 --- /dev/null +++ b/npm-package/fp/spread.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('spread', require('../spread')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/spreadFrom.js b/npm-package/fp/spreadFrom.js new file mode 100644 index 0000000000..0b630df1b3 --- /dev/null +++ b/npm-package/fp/spreadFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('spreadFrom', require('../spread')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/startCase.js b/npm-package/fp/startCase.js new file mode 100644 index 0000000000..ada98c943d --- /dev/null +++ b/npm-package/fp/startCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('startCase', require('../startCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/startsWith.js b/npm-package/fp/startsWith.js new file mode 100644 index 0000000000..985e2f2948 --- /dev/null +++ b/npm-package/fp/startsWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('startsWith', require('../startsWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/string.js b/npm-package/fp/string.js new file mode 100644 index 0000000000..773b037048 --- /dev/null +++ b/npm-package/fp/string.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../string')); diff --git a/npm-package/fp/stubArray.js b/npm-package/fp/stubArray.js new file mode 100644 index 0000000000..cd604cb493 --- /dev/null +++ b/npm-package/fp/stubArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubArray', require('../stubArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/stubFalse.js b/npm-package/fp/stubFalse.js new file mode 100644 index 0000000000..3296664544 --- /dev/null +++ b/npm-package/fp/stubFalse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubFalse', require('../stubFalse'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/stubObject.js b/npm-package/fp/stubObject.js new file mode 100644 index 0000000000..c6c8ec472c --- /dev/null +++ b/npm-package/fp/stubObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubObject', require('../stubObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/stubString.js b/npm-package/fp/stubString.js new file mode 100644 index 0000000000..701051e8b3 --- /dev/null +++ b/npm-package/fp/stubString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubString', require('../stubString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/stubTrue.js b/npm-package/fp/stubTrue.js new file mode 100644 index 0000000000..9249082ce9 --- /dev/null +++ b/npm-package/fp/stubTrue.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubTrue', require('../stubTrue'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/subtract.js b/npm-package/fp/subtract.js new file mode 100644 index 0000000000..d32b16d479 --- /dev/null +++ b/npm-package/fp/subtract.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('subtract', require('../subtract')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/sum.js b/npm-package/fp/sum.js new file mode 100644 index 0000000000..5cce12b325 --- /dev/null +++ b/npm-package/fp/sum.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sum', require('../sum'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/sumBy.js b/npm-package/fp/sumBy.js new file mode 100644 index 0000000000..c8826565f9 --- /dev/null +++ b/npm-package/fp/sumBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sumBy', require('../sumBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/symmetricDifference.js b/npm-package/fp/symmetricDifference.js new file mode 100644 index 0000000000..78c16add62 --- /dev/null +++ b/npm-package/fp/symmetricDifference.js @@ -0,0 +1 @@ +module.exports = require('./xor'); diff --git a/npm-package/fp/symmetricDifferenceBy.js b/npm-package/fp/symmetricDifferenceBy.js new file mode 100644 index 0000000000..298fc7ff68 --- /dev/null +++ b/npm-package/fp/symmetricDifferenceBy.js @@ -0,0 +1 @@ +module.exports = require('./xorBy'); diff --git a/npm-package/fp/symmetricDifferenceWith.js b/npm-package/fp/symmetricDifferenceWith.js new file mode 100644 index 0000000000..70bc6faf28 --- /dev/null +++ b/npm-package/fp/symmetricDifferenceWith.js @@ -0,0 +1 @@ +module.exports = require('./xorWith'); diff --git a/npm-package/fp/tail.js b/npm-package/fp/tail.js new file mode 100644 index 0000000000..f122f0ac34 --- /dev/null +++ b/npm-package/fp/tail.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('tail', require('../tail'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/take.js b/npm-package/fp/take.js new file mode 100644 index 0000000000..9af98a7bdb --- /dev/null +++ b/npm-package/fp/take.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('take', require('../take')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/takeLast.js b/npm-package/fp/takeLast.js new file mode 100644 index 0000000000..e98c84a162 --- /dev/null +++ b/npm-package/fp/takeLast.js @@ -0,0 +1 @@ +module.exports = require('./takeRight'); diff --git a/npm-package/fp/takeLastWhile.js b/npm-package/fp/takeLastWhile.js new file mode 100644 index 0000000000..5367968a3d --- /dev/null +++ b/npm-package/fp/takeLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./takeRightWhile'); diff --git a/npm-package/fp/takeRight.js b/npm-package/fp/takeRight.js new file mode 100644 index 0000000000..b82950a696 --- /dev/null +++ b/npm-package/fp/takeRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeRight', require('../takeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/takeRightWhile.js b/npm-package/fp/takeRightWhile.js new file mode 100644 index 0000000000..8ffb0a2857 --- /dev/null +++ b/npm-package/fp/takeRightWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeRightWhile', require('../takeRightWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/takeWhile.js b/npm-package/fp/takeWhile.js new file mode 100644 index 0000000000..28136644fe --- /dev/null +++ b/npm-package/fp/takeWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeWhile', require('../takeWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/tap.js b/npm-package/fp/tap.js new file mode 100644 index 0000000000..d33ad6ec1e --- /dev/null +++ b/npm-package/fp/tap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('tap', require('../tap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/template.js b/npm-package/fp/template.js new file mode 100644 index 0000000000..74857e1c84 --- /dev/null +++ b/npm-package/fp/template.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('template', require('../template')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/templateSettings.js b/npm-package/fp/templateSettings.js new file mode 100644 index 0000000000..7bcc0a82b9 --- /dev/null +++ b/npm-package/fp/templateSettings.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('templateSettings', require('../templateSettings'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/throttle.js b/npm-package/fp/throttle.js new file mode 100644 index 0000000000..77fff14284 --- /dev/null +++ b/npm-package/fp/throttle.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('throttle', require('../throttle')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/thru.js b/npm-package/fp/thru.js new file mode 100644 index 0000000000..d42b3b1d84 --- /dev/null +++ b/npm-package/fp/thru.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('thru', require('../thru')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/times.js b/npm-package/fp/times.js new file mode 100644 index 0000000000..0dab06dad1 --- /dev/null +++ b/npm-package/fp/times.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('times', require('../times')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/toArray.js b/npm-package/fp/toArray.js new file mode 100644 index 0000000000..f0c360aca3 --- /dev/null +++ b/npm-package/fp/toArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toArray', require('../toArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/toFinite.js b/npm-package/fp/toFinite.js new file mode 100644 index 0000000000..3a47687d6b --- /dev/null +++ b/npm-package/fp/toFinite.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toFinite', require('../toFinite'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/toInteger.js b/npm-package/fp/toInteger.js new file mode 100644 index 0000000000..e0af6a750e --- /dev/null +++ b/npm-package/fp/toInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toInteger', require('../toInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/toIterator.js b/npm-package/fp/toIterator.js new file mode 100644 index 0000000000..65e6baa9dd --- /dev/null +++ b/npm-package/fp/toIterator.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toIterator', require('../toIterator'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/toJSON.js b/npm-package/fp/toJSON.js new file mode 100644 index 0000000000..2d718d0bc1 --- /dev/null +++ b/npm-package/fp/toJSON.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toJSON', require('../toJSON'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/toLength.js b/npm-package/fp/toLength.js new file mode 100644 index 0000000000..b97cdd9351 --- /dev/null +++ b/npm-package/fp/toLength.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toLength', require('../toLength'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/toLower.js b/npm-package/fp/toLower.js new file mode 100644 index 0000000000..616ef36ada --- /dev/null +++ b/npm-package/fp/toLower.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toLower', require('../toLower'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/toNumber.js b/npm-package/fp/toNumber.js new file mode 100644 index 0000000000..d0c6f4d3d6 --- /dev/null +++ b/npm-package/fp/toNumber.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toNumber', require('../toNumber'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/toPairs.js b/npm-package/fp/toPairs.js new file mode 100644 index 0000000000..af783786ee --- /dev/null +++ b/npm-package/fp/toPairs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPairs', require('../toPairs'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/toPairsIn.js b/npm-package/fp/toPairsIn.js new file mode 100644 index 0000000000..66504abf1f --- /dev/null +++ b/npm-package/fp/toPairsIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPairsIn', require('../toPairsIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/toPath.js b/npm-package/fp/toPath.js new file mode 100644 index 0000000000..b4d5e50fb7 --- /dev/null +++ b/npm-package/fp/toPath.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPath', require('../toPath'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/toPlainObject.js b/npm-package/fp/toPlainObject.js new file mode 100644 index 0000000000..278bb86398 --- /dev/null +++ b/npm-package/fp/toPlainObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPlainObject', require('../toPlainObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/toSafeInteger.js b/npm-package/fp/toSafeInteger.js new file mode 100644 index 0000000000..367a26fddc --- /dev/null +++ b/npm-package/fp/toSafeInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toSafeInteger', require('../toSafeInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/toString.js b/npm-package/fp/toString.js new file mode 100644 index 0000000000..cec4f8e223 --- /dev/null +++ b/npm-package/fp/toString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toString', require('../toString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/toUpper.js b/npm-package/fp/toUpper.js new file mode 100644 index 0000000000..54f9a56058 --- /dev/null +++ b/npm-package/fp/toUpper.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toUpper', require('../toUpper'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/transform.js b/npm-package/fp/transform.js new file mode 100644 index 0000000000..759d088f1a --- /dev/null +++ b/npm-package/fp/transform.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('transform', require('../transform')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/trim.js b/npm-package/fp/trim.js new file mode 100644 index 0000000000..e6319a741c --- /dev/null +++ b/npm-package/fp/trim.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trim', require('../trim')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/trimChars.js b/npm-package/fp/trimChars.js new file mode 100644 index 0000000000..c9294de48c --- /dev/null +++ b/npm-package/fp/trimChars.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimChars', require('../trim')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/trimCharsEnd.js b/npm-package/fp/trimCharsEnd.js new file mode 100644 index 0000000000..284bc2f813 --- /dev/null +++ b/npm-package/fp/trimCharsEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimCharsEnd', require('../trimEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/trimCharsStart.js b/npm-package/fp/trimCharsStart.js new file mode 100644 index 0000000000..ff0ee65dfb --- /dev/null +++ b/npm-package/fp/trimCharsStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimCharsStart', require('../trimStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/trimEnd.js b/npm-package/fp/trimEnd.js new file mode 100644 index 0000000000..71908805fc --- /dev/null +++ b/npm-package/fp/trimEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimEnd', require('../trimEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/trimStart.js b/npm-package/fp/trimStart.js new file mode 100644 index 0000000000..fda902c389 --- /dev/null +++ b/npm-package/fp/trimStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimStart', require('../trimStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/truncate.js b/npm-package/fp/truncate.js new file mode 100644 index 0000000000..d265c1decb --- /dev/null +++ b/npm-package/fp/truncate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('truncate', require('../truncate')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/unapply.js b/npm-package/fp/unapply.js new file mode 100644 index 0000000000..c5dfe779d6 --- /dev/null +++ b/npm-package/fp/unapply.js @@ -0,0 +1 @@ +module.exports = require('./rest'); diff --git a/npm-package/fp/unary.js b/npm-package/fp/unary.js new file mode 100644 index 0000000000..286c945fb6 --- /dev/null +++ b/npm-package/fp/unary.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unary', require('../unary'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/unescape.js b/npm-package/fp/unescape.js new file mode 100644 index 0000000000..fddcb46e2d --- /dev/null +++ b/npm-package/fp/unescape.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unescape', require('../unescape'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/union.js b/npm-package/fp/union.js new file mode 100644 index 0000000000..ef8228d74c --- /dev/null +++ b/npm-package/fp/union.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('union', require('../union')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/unionBy.js b/npm-package/fp/unionBy.js new file mode 100644 index 0000000000..603687a188 --- /dev/null +++ b/npm-package/fp/unionBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unionBy', require('../unionBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/unionWith.js b/npm-package/fp/unionWith.js new file mode 100644 index 0000000000..65bb3a7928 --- /dev/null +++ b/npm-package/fp/unionWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unionWith', require('../unionWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/uniq.js b/npm-package/fp/uniq.js new file mode 100644 index 0000000000..bc1852490b --- /dev/null +++ b/npm-package/fp/uniq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniq', require('../uniq'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/uniqBy.js b/npm-package/fp/uniqBy.js new file mode 100644 index 0000000000..634c6a8bb3 --- /dev/null +++ b/npm-package/fp/uniqBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqBy', require('../uniqBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/uniqWith.js b/npm-package/fp/uniqWith.js new file mode 100644 index 0000000000..0ec601a910 --- /dev/null +++ b/npm-package/fp/uniqWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqWith', require('../uniqWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/uniqueId.js b/npm-package/fp/uniqueId.js new file mode 100644 index 0000000000..aa8fc2f739 --- /dev/null +++ b/npm-package/fp/uniqueId.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqueId', require('../uniqueId')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/unnest.js b/npm-package/fp/unnest.js new file mode 100644 index 0000000000..5d34060aa7 --- /dev/null +++ b/npm-package/fp/unnest.js @@ -0,0 +1 @@ +module.exports = require('./flatten'); diff --git a/npm-package/fp/unset.js b/npm-package/fp/unset.js new file mode 100644 index 0000000000..ea203a0f39 --- /dev/null +++ b/npm-package/fp/unset.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unset', require('../unset')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/unzip.js b/npm-package/fp/unzip.js new file mode 100644 index 0000000000..cc364b3c5a --- /dev/null +++ b/npm-package/fp/unzip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unzip', require('../unzip'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/unzipWith.js b/npm-package/fp/unzipWith.js new file mode 100644 index 0000000000..182eaa1042 --- /dev/null +++ b/npm-package/fp/unzipWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unzipWith', require('../unzipWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/update.js b/npm-package/fp/update.js new file mode 100644 index 0000000000..b8ce2cc9e1 --- /dev/null +++ b/npm-package/fp/update.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('update', require('../update')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/updateWith.js b/npm-package/fp/updateWith.js new file mode 100644 index 0000000000..d5e8282d94 --- /dev/null +++ b/npm-package/fp/updateWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('updateWith', require('../updateWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/upperCase.js b/npm-package/fp/upperCase.js new file mode 100644 index 0000000000..c886f20216 --- /dev/null +++ b/npm-package/fp/upperCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('upperCase', require('../upperCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/upperFirst.js b/npm-package/fp/upperFirst.js new file mode 100644 index 0000000000..d8c04df54b --- /dev/null +++ b/npm-package/fp/upperFirst.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('upperFirst', require('../upperFirst'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/useWith.js b/npm-package/fp/useWith.js new file mode 100644 index 0000000000..d8b3df5a4e --- /dev/null +++ b/npm-package/fp/useWith.js @@ -0,0 +1 @@ +module.exports = require('./overArgs'); diff --git a/npm-package/fp/util.js b/npm-package/fp/util.js new file mode 100644 index 0000000000..18c00baed4 --- /dev/null +++ b/npm-package/fp/util.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../util')); diff --git a/npm-package/fp/value.js b/npm-package/fp/value.js new file mode 100644 index 0000000000..555eec7a38 --- /dev/null +++ b/npm-package/fp/value.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('value', require('../value'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/valueOf.js b/npm-package/fp/valueOf.js new file mode 100644 index 0000000000..f968807d70 --- /dev/null +++ b/npm-package/fp/valueOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('valueOf', require('../valueOf'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/values.js b/npm-package/fp/values.js new file mode 100644 index 0000000000..2dfc56136b --- /dev/null +++ b/npm-package/fp/values.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('values', require('../values'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/valuesIn.js b/npm-package/fp/valuesIn.js new file mode 100644 index 0000000000..a1b2bb8725 --- /dev/null +++ b/npm-package/fp/valuesIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('valuesIn', require('../valuesIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/where.js b/npm-package/fp/where.js new file mode 100644 index 0000000000..3247f64a8c --- /dev/null +++ b/npm-package/fp/where.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/npm-package/fp/whereEq.js b/npm-package/fp/whereEq.js new file mode 100644 index 0000000000..29d1e1e4f1 --- /dev/null +++ b/npm-package/fp/whereEq.js @@ -0,0 +1 @@ +module.exports = require('./isMatch'); diff --git a/npm-package/fp/without.js b/npm-package/fp/without.js new file mode 100644 index 0000000000..bad9e125bc --- /dev/null +++ b/npm-package/fp/without.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('without', require('../without')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/words.js b/npm-package/fp/words.js new file mode 100644 index 0000000000..4a901414b8 --- /dev/null +++ b/npm-package/fp/words.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('words', require('../words')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/wrap.js b/npm-package/fp/wrap.js new file mode 100644 index 0000000000..e93bd8a1de --- /dev/null +++ b/npm-package/fp/wrap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrap', require('../wrap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/wrapperAt.js b/npm-package/fp/wrapperAt.js new file mode 100644 index 0000000000..8f0a310fea --- /dev/null +++ b/npm-package/fp/wrapperAt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperAt', require('../wrapperAt'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/wrapperChain.js b/npm-package/fp/wrapperChain.js new file mode 100644 index 0000000000..2a48ea2b5b --- /dev/null +++ b/npm-package/fp/wrapperChain.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperChain', require('../wrapperChain'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/wrapperLodash.js b/npm-package/fp/wrapperLodash.js new file mode 100644 index 0000000000..a7162d084c --- /dev/null +++ b/npm-package/fp/wrapperLodash.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperLodash', require('../wrapperLodash'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/wrapperReverse.js b/npm-package/fp/wrapperReverse.js new file mode 100644 index 0000000000..e1481aab91 --- /dev/null +++ b/npm-package/fp/wrapperReverse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperReverse', require('../wrapperReverse'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/wrapperValue.js b/npm-package/fp/wrapperValue.js new file mode 100644 index 0000000000..8eb9112f61 --- /dev/null +++ b/npm-package/fp/wrapperValue.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperValue', require('../wrapperValue'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/xor.js b/npm-package/fp/xor.js new file mode 100644 index 0000000000..29e2819489 --- /dev/null +++ b/npm-package/fp/xor.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xor', require('../xor')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/xorBy.js b/npm-package/fp/xorBy.js new file mode 100644 index 0000000000..b355686db6 --- /dev/null +++ b/npm-package/fp/xorBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xorBy', require('../xorBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/xorWith.js b/npm-package/fp/xorWith.js new file mode 100644 index 0000000000..8e05739ad3 --- /dev/null +++ b/npm-package/fp/xorWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xorWith', require('../xorWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/zip.js b/npm-package/fp/zip.js new file mode 100644 index 0000000000..69e147a441 --- /dev/null +++ b/npm-package/fp/zip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zip', require('../zip')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/zipAll.js b/npm-package/fp/zipAll.js new file mode 100644 index 0000000000..efa8ccbfbb --- /dev/null +++ b/npm-package/fp/zipAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipAll', require('../zip')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/zipObj.js b/npm-package/fp/zipObj.js new file mode 100644 index 0000000000..f4a34531b1 --- /dev/null +++ b/npm-package/fp/zipObj.js @@ -0,0 +1 @@ +module.exports = require('./zipObject'); diff --git a/npm-package/fp/zipObject.js b/npm-package/fp/zipObject.js new file mode 100644 index 0000000000..462dbb68cb --- /dev/null +++ b/npm-package/fp/zipObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipObject', require('../zipObject')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/zipObjectDeep.js b/npm-package/fp/zipObjectDeep.js new file mode 100644 index 0000000000..53a5d33807 --- /dev/null +++ b/npm-package/fp/zipObjectDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipObjectDeep', require('../zipObjectDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fp/zipWith.js b/npm-package/fp/zipWith.js new file mode 100644 index 0000000000..c5cf9e2128 --- /dev/null +++ b/npm-package/fp/zipWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipWith', require('../zipWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/npm-package/fromPairs.js b/npm-package/fromPairs.js new file mode 100644 index 0000000000..ee7940d240 --- /dev/null +++ b/npm-package/fromPairs.js @@ -0,0 +1,28 @@ +/** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ +function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; +} + +module.exports = fromPairs; diff --git a/npm-package/function.js b/npm-package/function.js new file mode 100644 index 0000000000..b0fc6d93e3 --- /dev/null +++ b/npm-package/function.js @@ -0,0 +1,25 @@ +module.exports = { + 'after': require('./after'), + 'ary': require('./ary'), + 'before': require('./before'), + 'bind': require('./bind'), + 'bindKey': require('./bindKey'), + 'curry': require('./curry'), + 'curryRight': require('./curryRight'), + 'debounce': require('./debounce'), + 'defer': require('./defer'), + 'delay': require('./delay'), + 'flip': require('./flip'), + 'memoize': require('./memoize'), + 'negate': require('./negate'), + 'once': require('./once'), + 'overArgs': require('./overArgs'), + 'partial': require('./partial'), + 'partialRight': require('./partialRight'), + 'rearg': require('./rearg'), + 'rest': require('./rest'), + 'spread': require('./spread'), + 'throttle': require('./throttle'), + 'unary': require('./unary'), + 'wrap': require('./wrap') +}; diff --git a/npm-package/functions.js b/npm-package/functions.js new file mode 100644 index 0000000000..9722928f50 --- /dev/null +++ b/npm-package/functions.js @@ -0,0 +1,31 @@ +var baseFunctions = require('./_baseFunctions'), + keys = require('./keys'); + +/** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ +function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); +} + +module.exports = functions; diff --git a/npm-package/functionsIn.js b/npm-package/functionsIn.js new file mode 100644 index 0000000000..f00345d066 --- /dev/null +++ b/npm-package/functionsIn.js @@ -0,0 +1,31 @@ +var baseFunctions = require('./_baseFunctions'), + keysIn = require('./keysIn'); + +/** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ +function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); +} + +module.exports = functionsIn; diff --git a/npm-package/get.js b/npm-package/get.js new file mode 100644 index 0000000000..8805ff92c1 --- /dev/null +++ b/npm-package/get.js @@ -0,0 +1,33 @@ +var baseGet = require('./_baseGet'); + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; +} + +module.exports = get; diff --git a/npm-package/groupBy.js b/npm-package/groupBy.js new file mode 100644 index 0000000000..babf4f6baa --- /dev/null +++ b/npm-package/groupBy.js @@ -0,0 +1,41 @@ +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ +var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } +}); + +module.exports = groupBy; diff --git a/npm-package/gt.js b/npm-package/gt.js new file mode 100644 index 0000000000..3a66282880 --- /dev/null +++ b/npm-package/gt.js @@ -0,0 +1,29 @@ +var baseGt = require('./_baseGt'), + createRelationalOperation = require('./_createRelationalOperation'); + +/** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ +var gt = createRelationalOperation(baseGt); + +module.exports = gt; diff --git a/npm-package/gte.js b/npm-package/gte.js new file mode 100644 index 0000000000..4180a687d7 --- /dev/null +++ b/npm-package/gte.js @@ -0,0 +1,30 @@ +var createRelationalOperation = require('./_createRelationalOperation'); + +/** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ +var gte = createRelationalOperation(function(value, other) { + return value >= other; +}); + +module.exports = gte; diff --git a/npm-package/has.js b/npm-package/has.js new file mode 100644 index 0000000000..34df55e8e2 --- /dev/null +++ b/npm-package/has.js @@ -0,0 +1,35 @@ +var baseHas = require('./_baseHas'), + hasPath = require('./_hasPath'); + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && hasPath(object, path, baseHas); +} + +module.exports = has; diff --git a/npm-package/hasIn.js b/npm-package/hasIn.js new file mode 100644 index 0000000000..06a3686542 --- /dev/null +++ b/npm-package/hasIn.js @@ -0,0 +1,34 @@ +var baseHasIn = require('./_baseHasIn'), + hasPath = require('./_hasPath'); + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); +} + +module.exports = hasIn; diff --git a/npm-package/head.js b/npm-package/head.js new file mode 100644 index 0000000000..dee9d1f1e7 --- /dev/null +++ b/npm-package/head.js @@ -0,0 +1,23 @@ +/** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ +function head(array) { + return (array && array.length) ? array[0] : undefined; +} + +module.exports = head; diff --git a/npm-package/identity.js b/npm-package/identity.js new file mode 100644 index 0000000000..2d5d963cd2 --- /dev/null +++ b/npm-package/identity.js @@ -0,0 +1,21 @@ +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; diff --git a/npm-package/inRange.js b/npm-package/inRange.js new file mode 100644 index 0000000000..f20728d920 --- /dev/null +++ b/npm-package/inRange.js @@ -0,0 +1,55 @@ +var baseInRange = require('./_baseInRange'), + toFinite = require('./toFinite'), + toNumber = require('./toNumber'); + +/** + * 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`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ +function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); +} + +module.exports = inRange; diff --git a/npm-package/includes.js b/npm-package/includes.js new file mode 100644 index 0000000000..ae0deedc90 --- /dev/null +++ b/npm-package/includes.js @@ -0,0 +1,53 @@ +var baseIndexOf = require('./_baseIndexOf'), + isArrayLike = require('./isArrayLike'), + isString = require('./isString'), + toInteger = require('./toInteger'), + values = require('./values'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ +function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); +} + +module.exports = includes; diff --git a/npm-package/index.js b/npm-package/index.js new file mode 100644 index 0000000000..5d063e21f3 --- /dev/null +++ b/npm-package/index.js @@ -0,0 +1 @@ +module.exports = require('./lodash'); \ No newline at end of file diff --git a/npm-package/indexOf.js b/npm-package/indexOf.js new file mode 100644 index 0000000000..3c644af2ef --- /dev/null +++ b/npm-package/indexOf.js @@ -0,0 +1,42 @@ +var baseIndexOf = require('./_baseIndexOf'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ +function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); +} + +module.exports = indexOf; diff --git a/npm-package/initial.js b/npm-package/initial.js new file mode 100644 index 0000000000..f47fc50928 --- /dev/null +++ b/npm-package/initial.js @@ -0,0 +1,22 @@ +var baseSlice = require('./_baseSlice'); + +/** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ +function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; +} + +module.exports = initial; diff --git a/npm-package/intersection.js b/npm-package/intersection.js new file mode 100644 index 0000000000..a94c13512a --- /dev/null +++ b/npm-package/intersection.js @@ -0,0 +1,30 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'); + +/** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ +var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; +}); + +module.exports = intersection; diff --git a/npm-package/intersectionBy.js b/npm-package/intersectionBy.js new file mode 100644 index 0000000000..31461aae53 --- /dev/null +++ b/npm-package/intersectionBy.js @@ -0,0 +1,45 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ +var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, baseIteratee(iteratee, 2)) + : []; +}); + +module.exports = intersectionBy; diff --git a/npm-package/intersectionWith.js b/npm-package/intersectionWith.js new file mode 100644 index 0000000000..63cabfaa40 --- /dev/null +++ b/npm-package/intersectionWith.js @@ -0,0 +1,41 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ +var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; +}); + +module.exports = intersectionWith; diff --git a/npm-package/invert.js b/npm-package/invert.js new file mode 100644 index 0000000000..8c4795097b --- /dev/null +++ b/npm-package/invert.js @@ -0,0 +1,42 @@ +var constant = require('./constant'), + createInverter = require('./_createInverter'), + identity = require('./identity'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ +var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; +}, constant(identity)); + +module.exports = invert; diff --git a/npm-package/invertBy.js b/npm-package/invertBy.js new file mode 100644 index 0000000000..3f4f7e532c --- /dev/null +++ b/npm-package/invertBy.js @@ -0,0 +1,56 @@ +var baseIteratee = require('./_baseIteratee'), + createInverter = require('./_createInverter'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * This method is like `_.invert` except that the inverted object is generated + * 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). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ +var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } +}, baseIteratee); + +module.exports = invertBy; diff --git a/npm-package/invoke.js b/npm-package/invoke.js new file mode 100644 index 0000000000..97d51eb5bc --- /dev/null +++ b/npm-package/invoke.js @@ -0,0 +1,24 @@ +var baseInvoke = require('./_baseInvoke'), + baseRest = require('./_baseRest'); + +/** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ +var invoke = baseRest(baseInvoke); + +module.exports = invoke; diff --git a/npm-package/invokeMap.js b/npm-package/invokeMap.js new file mode 100644 index 0000000000..8da5126c61 --- /dev/null +++ b/npm-package/invokeMap.js @@ -0,0 +1,41 @@ +var apply = require('./_apply'), + baseEach = require('./_baseEach'), + baseInvoke = require('./_baseInvoke'), + baseRest = require('./_baseRest'), + isArrayLike = require('./isArrayLike'); + +/** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ +var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; +}); + +module.exports = invokeMap; diff --git a/npm-package/isArguments.js b/npm-package/isArguments.js new file mode 100644 index 0000000000..8b9ed66cdd --- /dev/null +++ b/npm-package/isArguments.js @@ -0,0 +1,36 @@ +var baseIsArguments = require('./_baseIsArguments'), + isObjectLike = require('./isObjectLike'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +module.exports = isArguments; diff --git a/npm-package/isArray.js b/npm-package/isArray.js new file mode 100644 index 0000000000..88ab55fd0a --- /dev/null +++ b/npm-package/isArray.js @@ -0,0 +1,26 @@ +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +module.exports = isArray; diff --git a/npm-package/isArrayBuffer.js b/npm-package/isArrayBuffer.js new file mode 100644 index 0000000000..12904a64b4 --- /dev/null +++ b/npm-package/isArrayBuffer.js @@ -0,0 +1,27 @@ +var baseIsArrayBuffer = require('./_baseIsArrayBuffer'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer; + +/** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ +var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + +module.exports = isArrayBuffer; diff --git a/npm-package/isArrayLike.js b/npm-package/isArrayLike.js new file mode 100644 index 0000000000..0f9668056e --- /dev/null +++ b/npm-package/isArrayLike.js @@ -0,0 +1,33 @@ +var isFunction = require('./isFunction'), + isLength = require('./isLength'); + +/** + * 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 + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +module.exports = isArrayLike; diff --git a/npm-package/isArrayLikeObject.js b/npm-package/isArrayLikeObject.js new file mode 100644 index 0000000000..6c4812a8d8 --- /dev/null +++ b/npm-package/isArrayLikeObject.js @@ -0,0 +1,33 @@ +var isArrayLike = require('./isArrayLike'), + isObjectLike = require('./isObjectLike'); + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +module.exports = isArrayLikeObject; diff --git a/npm-package/isBoolean.js b/npm-package/isBoolean.js new file mode 100644 index 0000000000..a43ed4b8fc --- /dev/null +++ b/npm-package/isBoolean.js @@ -0,0 +1,29 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]'; + +/** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ +function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); +} + +module.exports = isBoolean; diff --git a/npm-package/isBuffer.js b/npm-package/isBuffer.js new file mode 100644 index 0000000000..c103cc74e7 --- /dev/null +++ b/npm-package/isBuffer.js @@ -0,0 +1,38 @@ +var root = require('./_root'), + stubFalse = require('./stubFalse'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +module.exports = isBuffer; diff --git a/npm-package/isDate.js b/npm-package/isDate.js new file mode 100644 index 0000000000..7f0209fca7 --- /dev/null +++ b/npm-package/isDate.js @@ -0,0 +1,27 @@ +var baseIsDate = require('./_baseIsDate'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsDate = nodeUtil && nodeUtil.isDate; + +/** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ +var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + +module.exports = isDate; diff --git a/npm-package/isElement.js b/npm-package/isElement.js new file mode 100644 index 0000000000..76ae29c3bf --- /dev/null +++ b/npm-package/isElement.js @@ -0,0 +1,25 @@ +var isObjectLike = require('./isObjectLike'), + isPlainObject = require('./isPlainObject'); + +/** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ +function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); +} + +module.exports = isElement; diff --git a/npm-package/isEmpty.js b/npm-package/isEmpty.js new file mode 100644 index 0000000000..3597294a47 --- /dev/null +++ b/npm-package/isEmpty.js @@ -0,0 +1,77 @@ +var baseKeys = require('./_baseKeys'), + getTag = require('./_getTag'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLike = require('./isArrayLike'), + isBuffer = require('./isBuffer'), + isPrototype = require('./_isPrototype'), + isTypedArray = require('./isTypedArray'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ +function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; +} + +module.exports = isEmpty; diff --git a/npm-package/isEqual.js b/npm-package/isEqual.js new file mode 100644 index 0000000000..5e23e76c94 --- /dev/null +++ b/npm-package/isEqual.js @@ -0,0 +1,35 @@ +var baseIsEqual = require('./_baseIsEqual'); + +/** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ +function isEqual(value, other) { + return baseIsEqual(value, other); +} + +module.exports = isEqual; diff --git a/npm-package/isEqualWith.js b/npm-package/isEqualWith.js new file mode 100644 index 0000000000..21bdc7ffe3 --- /dev/null +++ b/npm-package/isEqualWith.js @@ -0,0 +1,41 @@ +var baseIsEqual = require('./_baseIsEqual'); + +/** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ +function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; +} + +module.exports = isEqualWith; diff --git a/npm-package/isError.js b/npm-package/isError.js new file mode 100644 index 0000000000..b4f41e000d --- /dev/null +++ b/npm-package/isError.js @@ -0,0 +1,36 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'), + isPlainObject = require('./isPlainObject'); + +/** `Object#toString` result references. */ +var domExcTag = '[object DOMException]', + errorTag = '[object Error]'; + +/** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ +function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); +} + +module.exports = isError; diff --git a/npm-package/isFinite.js b/npm-package/isFinite.js new file mode 100644 index 0000000000..601842bc40 --- /dev/null +++ b/npm-package/isFinite.js @@ -0,0 +1,36 @@ +var root = require('./_root'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = root.isFinite; + +/** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ +function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); +} + +module.exports = isFinite; diff --git a/npm-package/isFunction.js b/npm-package/isFunction.js new file mode 100644 index 0000000000..907a8cd8bf --- /dev/null +++ b/npm-package/isFunction.js @@ -0,0 +1,37 @@ +var baseGetTag = require('./_baseGetTag'), + isObject = require('./isObject'); + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +module.exports = isFunction; diff --git a/npm-package/isInteger.js b/npm-package/isInteger.js new file mode 100644 index 0000000000..66aa87d573 --- /dev/null +++ b/npm-package/isInteger.js @@ -0,0 +1,33 @@ +var toInteger = require('./toInteger'); + +/** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ +function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); +} + +module.exports = isInteger; diff --git a/npm-package/isLength.js b/npm-package/isLength.js new file mode 100644 index 0000000000..3a95caa962 --- /dev/null +++ b/npm-package/isLength.js @@ -0,0 +1,35 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; diff --git a/npm-package/isMap.js b/npm-package/isMap.js new file mode 100644 index 0000000000..44f8517eee --- /dev/null +++ b/npm-package/isMap.js @@ -0,0 +1,27 @@ +var baseIsMap = require('./_baseIsMap'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsMap = nodeUtil && nodeUtil.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + +module.exports = isMap; diff --git a/npm-package/isMatch.js b/npm-package/isMatch.js new file mode 100644 index 0000000000..9773a18cd7 --- /dev/null +++ b/npm-package/isMatch.js @@ -0,0 +1,36 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'); + +/** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ +function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); +} + +module.exports = isMatch; diff --git a/npm-package/isMatchWith.js b/npm-package/isMatchWith.js new file mode 100644 index 0000000000..187b6a61de --- /dev/null +++ b/npm-package/isMatchWith.js @@ -0,0 +1,41 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'); + +/** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ +function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); +} + +module.exports = isMatchWith; diff --git a/npm-package/isNaN.js b/npm-package/isNaN.js new file mode 100644 index 0000000000..7d0d783bad --- /dev/null +++ b/npm-package/isNaN.js @@ -0,0 +1,38 @@ +var isNumber = require('./isNumber'); + +/** + * Checks if `value` is `NaN`. + * + * **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 _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ +function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; +} + +module.exports = isNaN; diff --git a/npm-package/isNative.js b/npm-package/isNative.js new file mode 100644 index 0000000000..f0cb8d5800 --- /dev/null +++ b/npm-package/isNative.js @@ -0,0 +1,40 @@ +var baseIsNative = require('./_baseIsNative'), + isMaskable = require('./_isMaskable'); + +/** Error message constants. */ +var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'; + +/** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); +} + +module.exports = isNative; diff --git a/npm-package/isNil.js b/npm-package/isNil.js new file mode 100644 index 0000000000..79f05052c5 --- /dev/null +++ b/npm-package/isNil.js @@ -0,0 +1,25 @@ +/** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ +function isNil(value) { + return value == null; +} + +module.exports = isNil; diff --git a/npm-package/isNull.js b/npm-package/isNull.js new file mode 100644 index 0000000000..c0a374d7dc --- /dev/null +++ b/npm-package/isNull.js @@ -0,0 +1,22 @@ +/** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ +function isNull(value) { + return value === null; +} + +module.exports = isNull; diff --git a/npm-package/isNumber.js b/npm-package/isNumber.js new file mode 100644 index 0000000000..cd34ee4641 --- /dev/null +++ b/npm-package/isNumber.js @@ -0,0 +1,38 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var numberTag = '[object Number]'; + +/** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ +function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); +} + +module.exports = isNumber; diff --git a/npm-package/isObject.js b/npm-package/isObject.js new file mode 100644 index 0000000000..1dc893918b --- /dev/null +++ b/npm-package/isObject.js @@ -0,0 +1,31 @@ +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +module.exports = isObject; diff --git a/npm-package/isObjectLike.js b/npm-package/isObjectLike.js new file mode 100644 index 0000000000..301716b5a5 --- /dev/null +++ b/npm-package/isObjectLike.js @@ -0,0 +1,29 @@ +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; diff --git a/npm-package/isPlainObject.js b/npm-package/isPlainObject.js new file mode 100644 index 0000000000..238737313f --- /dev/null +++ b/npm-package/isPlainObject.js @@ -0,0 +1,62 @@ +var baseGetTag = require('./_baseGetTag'), + getPrototype = require('./_getPrototype'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +module.exports = isPlainObject; diff --git a/npm-package/isRegExp.js b/npm-package/isRegExp.js new file mode 100644 index 0000000000..76c9b6e9c3 --- /dev/null +++ b/npm-package/isRegExp.js @@ -0,0 +1,27 @@ +var baseIsRegExp = require('./_baseIsRegExp'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; + +/** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ +var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + +module.exports = isRegExp; diff --git a/npm-package/isSafeInteger.js b/npm-package/isSafeInteger.js new file mode 100644 index 0000000000..2a48526e10 --- /dev/null +++ b/npm-package/isSafeInteger.js @@ -0,0 +1,37 @@ +var isInteger = require('./isInteger'); + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * 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. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ +function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; +} + +module.exports = isSafeInteger; diff --git a/npm-package/isSet.js b/npm-package/isSet.js new file mode 100644 index 0000000000..ab88bdf81a --- /dev/null +++ b/npm-package/isSet.js @@ -0,0 +1,27 @@ +var baseIsSet = require('./_baseIsSet'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsSet = nodeUtil && nodeUtil.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + +module.exports = isSet; diff --git a/npm-package/isString.js b/npm-package/isString.js new file mode 100644 index 0000000000..627eb9c384 --- /dev/null +++ b/npm-package/isString.js @@ -0,0 +1,30 @@ +var baseGetTag = require('./_baseGetTag'), + isArray = require('./isArray'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); +} + +module.exports = isString; diff --git a/npm-package/isSymbol.js b/npm-package/isSymbol.js new file mode 100644 index 0000000000..dfb60b97f6 --- /dev/null +++ b/npm-package/isSymbol.js @@ -0,0 +1,29 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} + +module.exports = isSymbol; diff --git a/npm-package/isTypedArray.js b/npm-package/isTypedArray.js new file mode 100644 index 0000000000..da3f8dd198 --- /dev/null +++ b/npm-package/isTypedArray.js @@ -0,0 +1,27 @@ +var baseIsTypedArray = require('./_baseIsTypedArray'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +module.exports = isTypedArray; diff --git a/npm-package/isUndefined.js b/npm-package/isUndefined.js new file mode 100644 index 0000000000..377d121ab8 --- /dev/null +++ b/npm-package/isUndefined.js @@ -0,0 +1,22 @@ +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +module.exports = isUndefined; diff --git a/npm-package/isWeakMap.js b/npm-package/isWeakMap.js new file mode 100644 index 0000000000..8d36f6638f --- /dev/null +++ b/npm-package/isWeakMap.js @@ -0,0 +1,28 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var weakMapTag = '[object WeakMap]'; + +/** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ +function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; +} + +module.exports = isWeakMap; diff --git a/npm-package/isWeakSet.js b/npm-package/isWeakSet.js new file mode 100644 index 0000000000..e628b261cf --- /dev/null +++ b/npm-package/isWeakSet.js @@ -0,0 +1,28 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var weakSetTag = '[object WeakSet]'; + +/** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ +function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; +} + +module.exports = isWeakSet; diff --git a/npm-package/iteratee.js b/npm-package/iteratee.js new file mode 100644 index 0000000000..61b73a8c05 --- /dev/null +++ b/npm-package/iteratee.js @@ -0,0 +1,53 @@ +var baseClone = require('./_baseClone'), + baseIteratee = require('./_baseIteratee'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ +function iteratee(func) { + return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); +} + +module.exports = iteratee; diff --git a/npm-package/join.js b/npm-package/join.js new file mode 100644 index 0000000000..45de079ff2 --- /dev/null +++ b/npm-package/join.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeJoin = arrayProto.join; + +/** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ +function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); +} + +module.exports = join; diff --git a/npm-package/kebabCase.js b/npm-package/kebabCase.js new file mode 100644 index 0000000000..8a52be6455 --- /dev/null +++ b/npm-package/kebabCase.js @@ -0,0 +1,28 @@ +var createCompounder = require('./_createCompounder'); + +/** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ +var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); +}); + +module.exports = kebabCase; diff --git a/npm-package/keyBy.js b/npm-package/keyBy.js new file mode 100644 index 0000000000..acc007a0ab --- /dev/null +++ b/npm-package/keyBy.js @@ -0,0 +1,36 @@ +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ +var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); +}); + +module.exports = keyBy; diff --git a/npm-package/keys.js b/npm-package/keys.js new file mode 100644 index 0000000000..d143c7186f --- /dev/null +++ b/npm-package/keys.js @@ -0,0 +1,37 @@ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeys = require('./_baseKeys'), + isArrayLike = require('./isArrayLike'); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +module.exports = keys; diff --git a/npm-package/keysIn.js b/npm-package/keysIn.js new file mode 100644 index 0000000000..a62308f2c5 --- /dev/null +++ b/npm-package/keysIn.js @@ -0,0 +1,32 @@ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeysIn = require('./_baseKeysIn'), + isArrayLike = require('./isArrayLike'); + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +module.exports = keysIn; diff --git a/npm-package/lang.js b/npm-package/lang.js new file mode 100644 index 0000000000..a3962169ab --- /dev/null +++ b/npm-package/lang.js @@ -0,0 +1,58 @@ +module.exports = { + 'castArray': require('./castArray'), + 'clone': require('./clone'), + 'cloneDeep': require('./cloneDeep'), + 'cloneDeepWith': require('./cloneDeepWith'), + 'cloneWith': require('./cloneWith'), + 'conformsTo': require('./conformsTo'), + 'eq': require('./eq'), + 'gt': require('./gt'), + 'gte': require('./gte'), + 'isArguments': require('./isArguments'), + 'isArray': require('./isArray'), + 'isArrayBuffer': require('./isArrayBuffer'), + 'isArrayLike': require('./isArrayLike'), + 'isArrayLikeObject': require('./isArrayLikeObject'), + 'isBoolean': require('./isBoolean'), + 'isBuffer': require('./isBuffer'), + 'isDate': require('./isDate'), + 'isElement': require('./isElement'), + 'isEmpty': require('./isEmpty'), + 'isEqual': require('./isEqual'), + 'isEqualWith': require('./isEqualWith'), + 'isError': require('./isError'), + 'isFinite': require('./isFinite'), + 'isFunction': require('./isFunction'), + 'isInteger': require('./isInteger'), + 'isLength': require('./isLength'), + 'isMap': require('./isMap'), + 'isMatch': require('./isMatch'), + 'isMatchWith': require('./isMatchWith'), + 'isNaN': require('./isNaN'), + 'isNative': require('./isNative'), + 'isNil': require('./isNil'), + 'isNull': require('./isNull'), + 'isNumber': require('./isNumber'), + 'isObject': require('./isObject'), + 'isObjectLike': require('./isObjectLike'), + 'isPlainObject': require('./isPlainObject'), + 'isRegExp': require('./isRegExp'), + 'isSafeInteger': require('./isSafeInteger'), + 'isSet': require('./isSet'), + 'isString': require('./isString'), + 'isSymbol': require('./isSymbol'), + 'isTypedArray': require('./isTypedArray'), + 'isUndefined': require('./isUndefined'), + 'isWeakMap': require('./isWeakMap'), + 'isWeakSet': require('./isWeakSet'), + 'lt': require('./lt'), + 'lte': require('./lte'), + 'toArray': require('./toArray'), + 'toFinite': require('./toFinite'), + 'toInteger': require('./toInteger'), + 'toLength': require('./toLength'), + 'toNumber': require('./toNumber'), + 'toPlainObject': require('./toPlainObject'), + 'toSafeInteger': require('./toSafeInteger'), + 'toString': require('./toString') +}; diff --git a/npm-package/last.js b/npm-package/last.js new file mode 100644 index 0000000000..cad1eafafa --- /dev/null +++ b/npm-package/last.js @@ -0,0 +1,20 @@ +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +module.exports = last; diff --git a/npm-package/lastIndexOf.js b/npm-package/lastIndexOf.js new file mode 100644 index 0000000000..dabfb613a5 --- /dev/null +++ b/npm-package/lastIndexOf.js @@ -0,0 +1,46 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictLastIndexOf = require('./_strictLastIndexOf'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ +function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); +} + +module.exports = lastIndexOf; diff --git a/npm-package/lodash.js b/npm-package/lodash.js new file mode 100644 index 0000000000..0a965c8fca --- /dev/null +++ b/npm-package/lodash.js @@ -0,0 +1,17161 @@ +/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.18'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\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', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', + 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', + '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + 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, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash + } + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + + var index = -1; + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + var low = 0, + high = array == null ? 0 : array.length; + if (high === 0) { + return 0; + } + + value = iteratee(value); + var valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * 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. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + 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 spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * 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 + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @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 of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + } + + /** + * 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 + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * 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 + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; + + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { 'done': done, 'value': value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * 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 + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection 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 + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * 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). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = ctxNow || function() { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * 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 + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * 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. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * 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 + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * 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 + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * 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 + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * 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. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * 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. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` 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. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

fred, barney, & pebbles

' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function(value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * 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 + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **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 _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * 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. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : (value === 0 ? value : 0); + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * 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). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * 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` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * 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). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function(object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); + } + + /** + * 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 + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * 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 thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * 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`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * 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 + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } + else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } + else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * 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`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @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 + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null + ? 0 + : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': '