Comparing

lodash@4.17.0

...
lodash@4.17.19

Packagephobia

1.3 MB

1.3 MB

Publish

Install

Bundlephobia

npm diff

Options

files: **/!(*.map|*.min.js)

Showing 67 files with 832 additions and 671 deletions

package.json +++5---5

@@ -1,6 +1,6 @@

1{1{
2 "name": "lodash",2 "name": "lodash",
3 "version": "4.17.0",3 "version": "4.17.19",
4 "description": "Lodash modular utilities.",4 "description": "Lodash modular utilities.",
5 "keywords": "modules, stdlib, util",5 "keywords": "modules, stdlib, util",
6 "homepage": "https://lodash.com/",6 "homepage": "https://lodash.com/",

@@ -8,10 +8,10 @@

8 "icon": "https://lodash.com/icon.svg",8 "icon": "https://lodash.com/icon.svg",
9 "license": "MIT",9 "license": "MIT",
10 "main": "lodash.js",10 "main": "lodash.js",
11 "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",11 "author": "John-David Dalton <john.david.dalton@gmail.com>",
12 "contributors": [12 "contributors": [
13 "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
14 "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"13 "John-David Dalton <john.david.dalton@gmail.com>",
14 "Mathias Bynens <mathias@qiwi.be>"
15 ],15 ],
16 "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }16 "scripts": { "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\"" }
17}17}

README.md +++3---3

@@ -1,4 +1,4 @@

1# lodash v4.17.01# lodash v4.17.19
2 2
3The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.3The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
4 4

@@ -28,12 +28,12 @@

28var curryN = require('lodash/fp/curryN');28var curryN = require('lodash/fp/curryN');
29```29```
30 30
31See the [package source](https://github.com/lodash/lodash/tree/4.17.0-npm) for more details.31See the [package source](https://github.com/lodash/lodash/tree/4.17.19-npm) for more details.
32 32
33**Note:**<br>33**Note:**<br>
34Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL.34Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL.
35 35
36## Support36## Support
37 37
38Tested in Chrome 53-54, Firefox 48-49, IE 11, Edge 14, Safari 9-10, Node.js 6-7, & PhantomJS 2.1.1.<br>38Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.<br>
39Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available.39Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available.

LICENSE +++1---1

@@ -1,4 +1,4 @@

1Copyright JS Foundation and other contributors <https://js.foundation/>1Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
2 2
3Based on Underscore.js, copyright Jeremy Ashkenas,3Based on Underscore.js, copyright Jeremy Ashkenas,
4DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>4DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>

core.js +++89---102

@@ -1,8 +1,8 @@

1/**1/**
2 * @license2 * @license
3 * Lodash (Custom Build) <https://lodash.com/>3 * Lodash (Custom Build) <https://lodash.com/>
4 * Build: `lodash core -o ./dist/lodash.core.js`
5 * Copyright JS Foundation and other contributors <https://js.foundation/>4 * Build: `lodash core exports="node" -o ./npm-package/core.js`
5 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
6 * Released under MIT license <https://lodash.com/license>6 * Released under MIT license <https://lodash.com/license>
7 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>7 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
8 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors8 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors

@@ -13,7 +13,7 @@

13 var undefined;13 var undefined;
14 14
15 /** Used as the semantic version number. */15 /** Used as the semantic version number. */
16 var VERSION = '4.17.0';16 var VERSION = '4.17.15';
17 17
18 /** Error message constants. */18 /** Error message constants. */
19 var FUNC_ERROR_TEXT = 'Expected a function';19 var FUNC_ERROR_TEXT = 'Expected a function';

@@ -49,6 +49,9 @@

49 var reUnescapedHtml = /[&<>"']/g,49 var reUnescapedHtml = /[&<>"']/g,
50 reHasUnescapedHtml = RegExp(reUnescapedHtml.source);50 reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
51 51
52 /** Used to detect unsigned integer values. */
53 var reIsUint = /^(?:0|[1-9]\d*)$/;
54
52 /** Used to map characters to HTML entities. */55 /** Used to map characters to HTML entities. */
53 var htmlEscapes = {56 var htmlEscapes = {
54 '&': '&amp;',57 '&': '&amp;',

@@ -249,9 +252,9 @@

249 * Shortcut fusion is an optimization to merge iteratee calls; this avoids252 * Shortcut fusion is an optimization to merge iteratee calls; this avoids
250 * the creation of intermediate arrays and can greatly reduce the number of253 * the creation of intermediate arrays and can greatly reduce the number of
251 * iteratee executions. Sections of a chain sequence qualify for shortcut254 * iteratee executions. Sections of a chain sequence qualify for shortcut
252 * fusion if the section is applied to an array of at least `200` elements
253 * and any iteratees accept only one argument. The heuristic for whether a
254 * section qualifies for shortcut fusion is subject to change.255 * fusion if the section is applied to an array and iteratees accept only
256 * one argument. The heuristic for whether a section qualifies for shortcut
257 * fusion is subject to change.
255 *258 *
256 * Chaining is supported in custom builds as long as the `_#value` method is259 * Chaining is supported in custom builds as long as the `_#value` method is
257 * directly or indirectly included in the build.260 * directly or indirectly included in the build.

@@ -397,24 +400,6 @@

397 /*------------------------------------------------------------------------*/400 /*------------------------------------------------------------------------*/
398 401
399 /**402 /**
400 * Used by `_.defaults` to customize its `_.assignIn` use.
401 *
402 * @private
403 * @param {*} objValue The destination value.
404 * @param {*} srcValue The source value.
405 * @param {string} key The key of the property to assign.
406 * @param {Object} object The parent object of `objValue`.
407 * @returns {*} Returns the value to assign.
408 */
409 function assignInDefaults(objValue, srcValue, key, object) {
410 if (objValue === undefined ||
411 (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
412 return srcValue;
413 }
414 return objValue;
415 }
416
417 /**
418 * Assigns `value` to `key` of `object` if the existing value is not equivalent403 * Assigns `value` to `key` of `object` if the existing value is not equivalent
419 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)404 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
420 * for equality comparisons.405 * for equality comparisons.

@@ -673,7 +658,7 @@

673 if (value === other) {658 if (value === other) {
674 return true;659 return true;
675 }660 }
676 if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {661 if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
677 return value !== value && other !== other;662 return value !== value && other !== other;
678 }663 }
679 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);664 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);

@@ -696,17 +681,12 @@

696 function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {681 function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
697 var objIsArr = isArray(object),682 var objIsArr = isArray(object),
698 othIsArr = isArray(other),683 othIsArr = isArray(other),
699 objTag = arrayTag,
700 othTag = arrayTag;684 objTag = objIsArr ? arrayTag : baseGetTag(object),
685 othTag = othIsArr ? arrayTag : baseGetTag(other);
701 686
702 if (!objIsArr) {
703 objTag = baseGetTag(object);
704 objTag = objTag == argsTag ? objectTag : objTag;
705 }
706 if (!othIsArr) {
707 othTag = baseGetTag(other);
708 othTag = othTag == argsTag ? objectTag : othTag;
709 }687 objTag = objTag == argsTag ? objectTag : objTag;
688 othTag = othTag == argsTag ? objectTag : othTag;
689
710 var objIsObj = objTag == objectTag,690 var objIsObj = objTag == objectTag,
711 othIsObj = othTag == objectTag,691 othIsObj = othTag == objectTag,
712 isSameTag = objTag == othTag;692 isSameTag = objTag == othTag;

@@ -1370,6 +1350,48 @@

1370 }1350 }
1371 1351
1372 /**1352 /**
1353 * Checks if `value` is a valid array-like index.
1354 *
1355 * @private
1356 * @param {*} value The value to check.
1357 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1358 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1359 */
1360 function isIndex(value, length) {
1361 var type = typeof value;
1362 length = length == null ? MAX_SAFE_INTEGER : length;
1363
1364 return !!length &&
1365 (type == 'number' ||
1366 (type != 'symbol' && reIsUint.test(value))) &&
1367 (value > -1 && value % 1 == 0 && value < length);
1368 }
1369
1370 /**
1371 * Checks if the given arguments are from an iteratee call.
1372 *
1373 * @private
1374 * @param {*} value The potential iteratee value argument.
1375 * @param {*} index The potential iteratee index or key argument.
1376 * @param {*} object The potential iteratee object argument.
1377 * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
1378 * else `false`.
1379 */
1380 function isIterateeCall(value, index, object) {
1381 if (!isObject(object)) {
1382 return false;
1383 }
1384 var type = typeof index;
1385 if (type == 'number'
1386 ? (isArrayLike(object) && isIndex(index, object.length))
1387 : (type == 'string' && index in object)
1388 ) {
1389 return eq(object[index], value);
1390 }
1391 return false;
1392 }
1393
1394 /**
1373 * This function is like1395 * This function is like
1374 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)1396 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1375 * except that it includes inherited enumerable properties.1397 * except that it includes inherited enumerable properties.

@@ -1439,15 +1461,6 @@

1439 */1461 */
1440 var setToString = identity;1462 var setToString = identity;
1441 1463
1442 /**
1443 * Converts `value` to a string key if it's not a string or symbol.
1444 *
1445 * @private
1446 * @param {*} value The value to inspect.
1447 * @returns {string|symbol} Returns the key.
1448 */
1449 var toKey = String;
1450
1451 /*------------------------------------------------------------------------*/1464 /*------------------------------------------------------------------------*/
1452 1465
1453 /**1466 /**

@@ -2607,7 +2620,7 @@

2607 * date objects, error objects, maps, numbers, `Object` objects, regexes,2620 * date objects, error objects, maps, numbers, `Object` objects, regexes,
2608 * sets, strings, symbols, and typed arrays. `Object` objects are compared2621 * sets, strings, symbols, and typed arrays. `Object` objects are compared
2609 * by their own, not inherited, enumerable properties. Functions and DOM2622 * by their own, not inherited, enumerable properties. Functions and DOM
2610 * nodes are **not** supported.2623 * nodes are compared by strict equality, i.e. `===`.
2611 *2624 *
2612 * @static2625 * @static
2613 * @memberOf _2626 * @memberOf _

@@ -3111,39 +3124,6 @@

3111 });3124 });
3112 3125
3113 /**3126 /**
3114 * This method is like `_.assignIn` except that it accepts `customizer`
3115 * which is invoked to produce the assigned values. If `customizer` returns
3116 * `undefined`, assignment is handled by the method instead. The `customizer`
3117 * is invoked with five arguments: (objValue, srcValue, key, object, source).
3118 *
3119 * **Note:** This method mutates `object`.
3120 *
3121 * @static
3122 * @memberOf _
3123 * @since 4.0.0
3124 * @alias extendWith
3125 * @category Object
3126 * @param {Object} object The destination object.
3127 * @param {...Object} sources The source objects.
3128 * @param {Function} [customizer] The function to customize assigned values.
3129 * @returns {Object} Returns `object`.
3130 * @see _.assignWith
3131 * @example
3132 *
3133 * function customizer(objValue, srcValue) {
3134 * return _.isUndefined(objValue) ? srcValue : objValue;
3135 * }
3136 *
3137 * var defaults = _.partialRight(_.assignInWith, customizer);
3138 *
3139 * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
3140 * // => { 'a': 1, 'b': 2 }
3141 */
3142 var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
3143 copyObject(source, keysIn(source), object, customizer);
3144 });
3145
3146 /**
3147 * Creates an object that inherits from the `prototype` object. If a3127 * Creates an object that inherits from the `prototype` object. If a
3148 * `properties` object is given, its own enumerable string keyed properties3128 * `properties` object is given, its own enumerable string keyed properties
3149 * are assigned to the created object.3129 * are assigned to the created object.

@@ -3203,9 +3183,35 @@

3203 * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });3183 * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
3204 * // => { 'a': 1, 'b': 2 }3184 * // => { 'a': 1, 'b': 2 }
3205 */3185 */
3206 var defaults = baseRest(function(args) {
3207 args.push(undefined, assignInDefaults);
3208 return assignInWith.apply(undefined, args);3186 var defaults = baseRest(function(object, sources) {
3187 object = Object(object);
3188
3189 var index = -1;
3190 var length = sources.length;
3191 var guard = length > 2 ? sources[2] : undefined;
3192
3193 if (guard && isIterateeCall(sources[0], sources[1], guard)) {
3194 length = 1;
3195 }
3196
3197 while (++index < length) {
3198 var source = sources[index];
3199 var props = keysIn(source);
3200 var propsIndex = -1;
3201 var propsLength = props.length;
3202
3203 while (++propsIndex < propsLength) {
3204 var key = props[propsIndex];
3205 var value = object[key];
3206
3207 if (value === undefined ||
3208 (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
3209 object[key] = source[key];
3210 }
3211 }
3212 }
3213
3214 return object;
3209 });3215 });
3210 3216
3211 /**3217 /**

@@ -3312,7 +3318,7 @@

3312 * // => { 'a': 1, 'c': 3 }3318 * // => { 'a': 1, 'c': 3 }
3313 */3319 */
3314 var pick = flatRest(function(object, paths) {3320 var pick = flatRest(function(object, paths) {
3315 return object == null ? {} : basePick(object, baseMap(paths, toKey));3321 return object == null ? {} : basePick(object, paths);
3316 });3322 });
3317 3323
3318 /**3324 /**

@@ -3820,29 +3826,10 @@

3820 3826
3821 /*--------------------------------------------------------------------------*/3827 /*--------------------------------------------------------------------------*/
3822 3828
3823 // Some AMD build optimizers, like r.js, check for condition patterns like:
3824 if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
3825 // Expose Lodash on the global object to prevent errors when Lodash is
3826 // loaded by a script tag in the presence of an AMD loader.
3827 // See http://requirejs.org/docs/errors.html#mismatch for more details.
3828 // Use `_.noConflict` to remove Lodash from the global object.
3829 root._ = lodash;
3830
3831 // Define as an anonymous module so, through path mapping, it can be
3832 // referenced as the "underscore" module.
3833 define(function() {
3834 return lodash;
3835 });
3836 }
3837 // Check for `exports` after `define` in case a build optimizer adds it.
3838 else if (freeModule) {3829 if (freeModule) {
3839 // Export for Node.js.3830 // Export for Node.js.
3840 (freeModule.exports = lodash)._ = lodash;3831 (freeModule.exports = lodash)._ = lodash;
3841 // Export for CommonJS support.3832 // Export for CommonJS support.
3842 freeExports._ = lodash;3833 freeExports._ = lodash;
3843 }3834 }
3844 else {
3845 // Export to the global object.
3846 root._ = lodash;
3847 }
3848}.call(this));3835}.call(this));

_unicodeWords.js +++2---2

@@ -38,8 +38,8 @@

38 reOptMod = rsModifier + '?',38 reOptMod = rsModifier + '?',
39 rsOptVar = '[' + rsVarRange + ']?',39 rsOptVar = '[' + rsVarRange + ']?',
40 rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',40 rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
41 rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)',
42 rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)',41 rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
42 rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
43 rsSeq = rsOptVar + reOptMod + rsOptJoin,43 rsSeq = rsOptVar + reOptMod + rsOptJoin,
44 rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;44 rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
45 45

debounce.js +++5---2

@@ -108,9 +108,11 @@

108 function remainingWait(time) {108 function remainingWait(time) {
109 var timeSinceLastCall = time - lastCallTime,109 var timeSinceLastCall = time - lastCallTime,
110 timeSinceLastInvoke = time - lastInvokeTime,110 timeSinceLastInvoke = time - lastInvokeTime,
111 result = wait - timeSinceLastCall;111 timeWaiting = wait - timeSinceLastCall;
112 112
113 return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;113 return maxing
114 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
115 : timeWaiting;
114 }116 }
115 117
116 function shouldInvoke(time) {118 function shouldInvoke(time) {

@@ -171,6 +173,7 @@

171 }173 }
172 if (maxing) {174 if (maxing) {
173 // Handle invocations in a tight loop.175 // Handle invocations in a tight loop.
176 clearTimeout(timerId);
174 timerId = setTimeout(timerExpired, wait);177 timerId = setTimeout(timerExpired, wait);
175 return invokeFunc(lastCallTime);178 return invokeFunc(lastCallTime);
176 }179 }

defaults.js +++39---7

@@ -1,8 +1,14 @@

1var apply = require('./_apply'),
2 assignInDefaults = require('./_assignInDefaults'),
3 assignInWith = require('./assignInWith'),
4 baseRest = require('./_baseRest');1var baseRest = require('./_baseRest'),
2 eq = require('./eq'),
3 isIterateeCall = require('./_isIterateeCall'),
4 keysIn = require('./keysIn');
5 5
6/** Used for built-in method references. */
7var objectProto = Object.prototype;
8
9/** Used to check objects for own properties. */
10var hasOwnProperty = objectProto.hasOwnProperty;
11
6/**12/**
7 * Assigns own and inherited enumerable string keyed properties of source13 * Assigns own and inherited enumerable string keyed properties of source
8 * objects to the destination object for all destination properties that14 * objects to the destination object for all destination properties that

@@ -24,9 +30,35 @@

24 * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });30 * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
25 * // => { 'a': 1, 'b': 2 }31 * // => { 'a': 1, 'b': 2 }
26 */32 */
27var defaults = baseRest(function(args) {
28 args.push(undefined, assignInDefaults);
29 return apply(assignInWith, undefined, args);33var defaults = baseRest(function(object, sources) {
34 object = Object(object);
35
36 var index = -1;
37 var length = sources.length;
38 var guard = length > 2 ? sources[2] : undefined;
39
40 if (guard && isIterateeCall(sources[0], sources[1], guard)) {
41 length = 1;
42 }
43
44 while (++index < length) {
45 var source = sources[index];
46 var props = keysIn(source);
47 var propsIndex = -1;
48 var propsLength = props.length;
49
50 while (++propsIndex < propsLength) {
51 var key = props[propsIndex];
52 var value = object[key];
53
54 if (value === undefined ||
55 (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
56 object[key] = source[key];
57 }
58 }
59 }
60
61 return object;
30});62});
31 63
32module.exports = defaults;64module.exports = defaults;

_stringToPath.js +++5---9

@@ -1,9 +1,7 @@

1var memoizeCapped = require('./_memoizeCapped'),
2 toString = require('./toString');1var memoizeCapped = require('./_memoizeCapped');
3 2
4/** Used to match property names within property paths. */3/** Used to match property names within property paths. */
5var reLeadingDot = /^\./,
6 rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;4var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
7 5
8/** Used to match backslashes in property paths. */6/** Used to match backslashes in property paths. */
9var reEscapeChar = /\\(\\)?/g;7var reEscapeChar = /\\(\\)?/g;

@@ -16,14 +14,12 @@

16 * @returns {Array} Returns the property path array.14 * @returns {Array} Returns the property path array.
17 */15 */
18var stringToPath = memoizeCapped(function(string) {16var stringToPath = memoizeCapped(function(string) {
19 string = toString(string);
20
21 var result = [];17 var result = [];
22 if (reLeadingDot.test(string)) {18 if (string.charCodeAt(0) === 46 /* . */) {
23 result.push('');19 result.push('');
24 }20 }
25 string.replace(rePropName, function(match, number, quote, string) {
26 result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));21 string.replace(rePropName, function(match, number, quote, subString) {
22 result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
27 });23 });
28 return result;24 return result;
29});25});

defaultsDeep.js +++2---2

@@ -1,6 +1,6 @@

1var apply = require('./_apply'),1var apply = require('./_apply'),
2 baseRest = require('./_baseRest'),2 baseRest = require('./_baseRest'),
3 mergeDefaults = require('./_mergeDefaults'),3 customDefaultsMerge = require('./_customDefaultsMerge'),
4 mergeWith = require('./mergeWith');4 mergeWith = require('./mergeWith');
5 5
6/**6/**

@@ -23,7 +23,7 @@

23 * // => { 'a': { 'b': 2, 'c': 3 } }23 * // => { 'a': { 'b': 2, 'c': 3 } }
24 */24 */
25var defaultsDeep = baseRest(function(args) {25var defaultsDeep = baseRest(function(args) {
26 args.push(undefined, mergeDefaults);26 args.push(undefined, customDefaultsMerge);
27 return apply(mergeWith, undefined, args);27 return apply(mergeWith, undefined, args);
28});28});
29 29

_parent.js +++1---1

@@ -10,7 +10,7 @@

10 * @returns {*} Returns the parent value.10 * @returns {*} Returns the parent value.
11 */11 */
12function parent(object, path) {12function parent(object, path) {
13 return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));13 return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
14}14}
15 15
16module.exports = parent;16module.exports = parent;

_nodeUtil.js +++8---0

@@ -15,6 +15,14 @@

15/** Used to access faster Node.js helpers. */15/** Used to access faster Node.js helpers. */
16var nodeUtil = (function() {16var nodeUtil = (function() {
17 try {17 try {
18 // Use `util.types` for Node.js 10+.
19 var types = freeModule && freeModule.require && freeModule.require('util').types;
20
21 if (types) {
22 return types;
23 }
24
25 // Legacy `process.binding('util')` for Node.js < 10.
18 return freeProcess && freeProcess.binding && freeProcess.binding('util');26 return freeProcess && freeProcess.binding && freeProcess.binding('util');
19 } catch (e) {}27 } catch (e) {}
20}());28}());

_mergeDefaults.js +++0---27

@@ -1,27 +0,0 @@

1var baseMerge = require('./_baseMerge'),
2 isObject = require('./isObject');
3
4/**
5 * Used by `_.defaultsDeep` to customize its `_.merge` use.
6 *
7 * @private
8 * @param {*} objValue The destination value.
9 * @param {*} srcValue The source value.
10 * @param {string} key The key of the property to merge.
11 * @param {Object} object The parent object of `objValue`.
12 * @param {Object} source The parent object of `srcValue`.
13 * @param {Object} [stack] Tracks traversed source values and their merged
14 * counterparts.
15 * @returns {*} Returns the value to assign.
16 */
17function mergeDefaults(objValue, srcValue, key, object, source, stack) {
18 if (isObject(objValue) && isObject(srcValue)) {
19 // Recursively merge objects and arrays (susceptible to call stack limits).
20 stack.set(srcValue, objValue);
21 baseMerge(objValue, srcValue, undefined, mergeDefaults, stack);
22 stack['delete'](srcValue);
23 }
24 return objValue;
25}
26
27module.exports = mergeDefaults;

_lazyValue.js +++1---5

@@ -2,9 +2,6 @@

2 getView = require('./_getView'),2 getView = require('./_getView'),
3 isArray = require('./isArray');3 isArray = require('./isArray');
4 4
5/** Used as the size to enable large array optimizations. */
6var LARGE_ARRAY_SIZE = 200;
7
8/** Used to indicate the type of lazy iteratees. */5/** Used to indicate the type of lazy iteratees. */
9var LAZY_FILTER_FLAG = 1,6var LAZY_FILTER_FLAG = 1,
10 LAZY_MAP_FLAG = 2;7 LAZY_MAP_FLAG = 2;

@@ -36,8 +33,7 @@

36 resIndex = 0,33 resIndex = 0,
37 takeCount = nativeMin(length, this.__takeCount__);34 takeCount = nativeMin(length, this.__takeCount__);
38 35
39 if (!isArr || arrLength < LARGE_ARRAY_SIZE ||
40 (arrLength == length && takeCount == length)) {36 if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
41 return baseWrapperValue(array, this.__actions__);37 return baseWrapperValue(array, this.__actions__);
42 }38 }
43 var result = [];39 var result = [];

_isIndex.js +++5---2

@@ -13,10 +13,13 @@

13 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.13 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
14 */14 */
15function isIndex(value, length) {15function isIndex(value, length) {
16 var type = typeof value;
16 length = length == null ? MAX_SAFE_INTEGER : length;17 length = length == null ? MAX_SAFE_INTEGER : length;
18
17 return !!length &&19 return !!length &&
18 (typeof value == 'number' || reIsUint.test(value)) &&
19 (value > -1 && value % 1 == 0 && value < length);20 (type == 'number' ||
21 (type != 'symbol' && reIsUint.test(value))) &&
22 (value > -1 && value % 1 == 0 && value < length);
20}23}
21 24
22module.exports = isIndex;25module.exports = isIndex;

_initCloneByTag.js +++4---7

@@ -1,8 +1,6 @@

1var cloneArrayBuffer = require('./_cloneArrayBuffer'),1var cloneArrayBuffer = require('./_cloneArrayBuffer'),
2 cloneDataView = require('./_cloneDataView'),2 cloneDataView = require('./_cloneDataView'),
3 cloneMap = require('./_cloneMap'),
4 cloneRegExp = require('./_cloneRegExp'),3 cloneRegExp = require('./_cloneRegExp'),
5 cloneSet = require('./_cloneSet'),
6 cloneSymbol = require('./_cloneSymbol'),4 cloneSymbol = require('./_cloneSymbol'),
7 cloneTypedArray = require('./_cloneTypedArray');5 cloneTypedArray = require('./_cloneTypedArray');
8 6

@@ -32,16 +30,15 @@

32 * Initializes an object clone based on its `toStringTag`.30 * Initializes an object clone based on its `toStringTag`.
33 *31 *
34 * **Note:** This function only supports cloning values with tags of32 * **Note:** This function only supports cloning values with tags of
35 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.33 * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
36 *34 *
37 * @private35 * @private
38 * @param {Object} object The object to clone.36 * @param {Object} object The object to clone.
39 * @param {string} tag The `toStringTag` of the object to clone.37 * @param {string} tag The `toStringTag` of the object to clone.
40 * @param {Function} cloneFunc The function to clone values.
41 * @param {boolean} [isDeep] Specify a deep clone.38 * @param {boolean} [isDeep] Specify a deep clone.
42 * @returns {Object} Returns the initialized clone.39 * @returns {Object} Returns the initialized clone.
43 */40 */
44function initCloneByTag(object, tag, cloneFunc, isDeep) {41function initCloneByTag(object, tag, isDeep) {
45 var Ctor = object.constructor;42 var Ctor = object.constructor;
46 switch (tag) {43 switch (tag) {
47 case arrayBufferTag:44 case arrayBufferTag:

@@ -60,7 +57,7 @@

60 return cloneTypedArray(object, isDeep);57 return cloneTypedArray(object, isDeep);
61 58
62 case mapTag:59 case mapTag:
63 return cloneMap(object, isDeep, cloneFunc);60 return new Ctor;
64 61
65 case numberTag:62 case numberTag:
66 case stringTag:63 case stringTag:

@@ -70,7 +67,7 @@

70 return cloneRegExp(object);67 return cloneRegExp(object);
71 68
72 case setTag:69 case setTag:
73 return cloneSet(object, isDeep, cloneFunc);70 return new Ctor;
74 71
75 case symbolTag:72 case symbolTag:
76 return cloneSymbol(object);73 return cloneSymbol(object);

_initCloneArray.js +++1---1

@@ -13,7 +13,7 @@

13 */13 */
14function initCloneArray(array) {14function initCloneArray(array) {
15 var length = array.length,15 var length = array.length,
16 result = array.constructor(length);16 result = new array.constructor(length);
17 17
18 // Add properties assigned by `RegExp#exec`.18 // Add properties assigned by `RegExp#exec`.
19 if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {19 if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {

_hashHas.js +++1---1

@@ -17,7 +17,7 @@

17 */17 */
18function hashHas(key) {18function hashHas(key) {
19 var data = this.__data__;19 var data = this.__data__;
20 return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);20 return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
21}21}
22 22
23module.exports = hashHas;23module.exports = hashHas;

invert.js +++15---0

@@ -2,7 +2,17 @@

2 createInverter = require('./_createInverter'),2 createInverter = require('./_createInverter'),
3 identity = require('./identity');3 identity = require('./identity');
4 4
5/** Used for built-in method references. */
6var objectProto = Object.prototype;
7
5/**8/**
9 * Used to resolve the
10 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
11 * of values.
12 */
13var nativeObjectToString = objectProto.toString;
14
15/**
6 * Creates an object composed of the inverted keys and values of `object`.16 * Creates an object composed of the inverted keys and values of `object`.
7 * If `object` contains duplicate values, subsequent values overwrite17 * If `object` contains duplicate values, subsequent values overwrite
8 * property assignments of previous values.18 * property assignments of previous values.

@@ -21,6 +31,11 @@

21 * // => { '1': 'c', '2': 'b' }31 * // => { '1': 'c', '2': 'b' }
22 */32 */
23var invert = createInverter(function(result, value, key) {33var invert = createInverter(function(result, value, key) {
34 if (value != null &&
35 typeof value.toString != 'function') {
36 value = nativeObjectToString.call(value);
37 }
38
24 result[value] = key;39 result[value] = key;
25}, constant(identity));40}, constant(identity));
26 41

invertBy.js +++12---0

@@ -8,6 +8,13 @@

8var hasOwnProperty = objectProto.hasOwnProperty;8var hasOwnProperty = objectProto.hasOwnProperty;
9 9
10/**10/**
11 * Used to resolve the
12 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
13 * of values.
14 */
15var nativeObjectToString = objectProto.toString;
16
17/**
11 * This method is like `_.invert` except that the inverted object is generated18 * This method is like `_.invert` except that the inverted object is generated
12 * from the results of running each element of `object` thru `iteratee`. The19 * from the results of running each element of `object` thru `iteratee`. The
13 * corresponding inverted value of each inverted key is an array of keys20 * corresponding inverted value of each inverted key is an array of keys

@@ -34,6 +41,11 @@

34 * // => { 'group1': ['a', 'c'], 'group2': ['b'] }41 * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
35 */42 */
36var invertBy = createInverter(function(result, value, key) {43var invertBy = createInverter(function(result, value, key) {
44 if (value != null &&
45 typeof value.toString != 'function') {
46 value = nativeObjectToString.call(value);
47 }
48
37 if (hasOwnProperty.call(result, value)) {49 if (hasOwnProperty.call(result, value)) {
38 result[value].push(key);50 result[value].push(key);
39 } else {51 } else {

invokeMap.js +++2---5

@@ -2,8 +2,7 @@

2 baseEach = require('./_baseEach'),2 baseEach = require('./_baseEach'),
3 baseInvoke = require('./_baseInvoke'),3 baseInvoke = require('./_baseInvoke'),
4 baseRest = require('./_baseRest'),4 baseRest = require('./_baseRest'),
5 isArrayLike = require('./isArrayLike'),
6 isKey = require('./_isKey');5 isArrayLike = require('./isArrayLike');
7 6
8/**7/**
9 * Invokes the method at `path` of each element in `collection`, returning8 * Invokes the method at `path` of each element in `collection`, returning

@@ -31,12 +30,10 @@

31var invokeMap = baseRest(function(collection, path, args) {30var invokeMap = baseRest(function(collection, path, args) {
32 var index = -1,31 var index = -1,
33 isFunc = typeof path == 'function',32 isFunc = typeof path == 'function',
34 isProp = isKey(path),
35 result = isArrayLike(collection) ? Array(collection.length) : [];33 result = isArrayLike(collection) ? Array(collection.length) : [];
36 34
37 baseEach(collection, function(value) {35 baseEach(collection, function(value) {
38 var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined);
39 result[++index] = func ? apply(func, value, args) : baseInvoke(value, path, args);36 result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
40 });37 });
41 return result;38 return result;
42});39});

_hasUnicodeWord.js +++1---1

@@ -1,5 +1,5 @@

1/** Used to detect strings that need a more robust regexp to match words. */1/** Used to detect strings that need a more robust regexp to match words. */
2var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;2var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
3 3
4/**4/**
5 * Checks if `string` contains a word composed of Unicode symbols.5 * Checks if `string` contains a word composed of Unicode symbols.

_hasPath.js +++1---2

@@ -2,7 +2,6 @@

2 isArguments = require('./isArguments'),2 isArguments = require('./isArguments'),
3 isArray = require('./isArray'),3 isArray = require('./isArray'),
4 isIndex = require('./_isIndex'),4 isIndex = require('./_isIndex'),
5 isKey = require('./_isKey'),
6 isLength = require('./isLength'),5 isLength = require('./isLength'),
7 toKey = require('./_toKey');6 toKey = require('./_toKey');
8 7

@@ -16,7 +15,7 @@

16 * @returns {boolean} Returns `true` if `path` exists, else `false`.15 * @returns {boolean} Returns `true` if `path` exists, else `false`.
17 */16 */
18function hasPath(object, path, hasFunc) {17function hasPath(object, path, hasFunc) {
19 path = isKey(path, object) ? [path] : castPath(path);18 path = castPath(path, object);
20 19
21 var index = -1,20 var index = -1,
22 length = path.length,21 length = path.length,

_getSymbols.js +++16---2

@@ -1,6 +1,12 @@

1var overArg = require('./_overArg'),1var arrayFilter = require('./_arrayFilter'),
2 stubArray = require('./stubArray');2 stubArray = require('./stubArray');
3 3
4/** Used for built-in method references. */
5var objectProto = Object.prototype;
6
7/** Built-in value references. */
8var propertyIsEnumerable = objectProto.propertyIsEnumerable;
9
4/* Built-in method references for those with the same name as other `lodash` methods. */10/* Built-in method references for those with the same name as other `lodash` methods. */
5var nativeGetSymbols = Object.getOwnPropertySymbols;11var nativeGetSymbols = Object.getOwnPropertySymbols;
6 12

@@ -11,6 +17,14 @@

11 * @param {Object} object The object to query.17 * @param {Object} object The object to query.
12 * @returns {Array} Returns the array of symbols.18 * @returns {Array} Returns the array of symbols.
13 */19 */
14var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;20var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
21 if (object == null) {
22 return [];
23 }
24 object = Object(object);
25 return arrayFilter(nativeGetSymbols(object), function(symbol) {
26 return propertyIsEnumerable.call(object, symbol);
27 });
28};
15 29
16module.exports = getSymbols;30module.exports = getSymbols;

isEqual.js +++1---1

@@ -8,7 +8,7 @@

8 * date objects, error objects, maps, numbers, `Object` objects, regexes,8 * date objects, error objects, maps, numbers, `Object` objects, regexes,
9 * sets, strings, symbols, and typed arrays. `Object` objects are compared9 * sets, strings, symbols, and typed arrays. `Object` objects are compared
10 * by their own, not inherited, enumerable properties. Functions and DOM10 * by their own, not inherited, enumerable properties. Functions and DOM
11 * nodes are **not** supported.11 * nodes are compared by strict equality, i.e. `===`.
12 *12 *
13 * @static13 * @static
14 * @memberOf _14 * @memberOf _

_equalObjects.js +++3---3

@@ -1,4 +1,4 @@

1var keys = require('./keys');1var getAllKeys = require('./_getAllKeys');
2 2
3/** Used to compose bitmasks for value comparisons. */3/** Used to compose bitmasks for value comparisons. */
4var COMPARE_PARTIAL_FLAG = 1;4var COMPARE_PARTIAL_FLAG = 1;

@@ -24,9 +24,9 @@

24 */24 */
25function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {25function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
26 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,26 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
27 objProps = keys(object),27 objProps = getAllKeys(object),
28 objLength = objProps.length,28 objLength = objProps.length,
29 othProps = keys(other),29 othProps = getAllKeys(other),
30 othLength = othProps.length;30 othLength = othProps.length;
31 31
32 if (objLength != othLength && !isPartial) {32 if (objLength != othLength && !isPartial) {

_createWrap.js +++1---1

@@ -83,7 +83,7 @@

83 thisArg = newData[2];83 thisArg = newData[2];
84 partials = newData[3];84 partials = newData[3];
85 holders = newData[4];85 holders = newData[4];
86 arity = newData[9] = newData[9] == null86 arity = newData[9] = newData[9] === undefined
87 ? (isBindKey ? 0 : func.length)87 ? (isBindKey ? 0 : func.length)
88 : nativeMax(newData[9] - length, 0);88 : nativeMax(newData[9] - length, 0);
89 89

_createRound.js +++6---4

@@ -1,9 +1,11 @@

1var toInteger = require('./toInteger'),1var root = require('./_root'),
2 toInteger = require('./toInteger'),
2 toNumber = require('./toNumber'),3 toNumber = require('./toNumber'),
3 toString = require('./toString');4 toString = require('./toString');
4 5
5/* Built-in method references for those with the same name as other `lodash` methods. */6/* Built-in method references for those with the same name as other `lodash` methods. */
6var nativeMin = Math.min;7var nativeIsFinite = root.isFinite,
8 nativeMin = Math.min;
7 9
8/**10/**
9 * Creates a function like `_.round`.11 * Creates a function like `_.round`.

@@ -16,8 +18,8 @@

16 var func = Math[methodName];18 var func = Math[methodName];
17 return function(number, precision) {19 return function(number, precision) {
18 number = toNumber(number);20 number = toNumber(number);
19 precision = nativeMin(toInteger(precision), 292);
20 if (precision) {21 precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
22 if (precision && nativeIsFinite(number)) {
21 // Shift with exponential notation to avoid floating-point issues.23 // Shift with exponential notation to avoid floating-point issues.
22 // See [MDN](https://mdn.io/round#Examples) for more details.24 // See [MDN](https://mdn.io/round#Examples) for more details.
23 var pair = (toString(number) + 'e').split('e'),25 var pair = (toString(number) + 'e').split('e'),

_createFlow.js +++1---5

@@ -5,9 +5,6 @@

5 isArray = require('./isArray'),5 isArray = require('./isArray'),
6 isLaziable = require('./_isLaziable');6 isLaziable = require('./_isLaziable');
7 7
8/** Used as the size to enable large array optimizations. */
9var LARGE_ARRAY_SIZE = 200;
10
11/** Error message constants. */8/** Error message constants. */
12var FUNC_ERROR_TEXT = 'Expected a function';9var FUNC_ERROR_TEXT = 'Expected a function';
13 10

@@ -64,8 +61,7 @@

64 var args = arguments,61 var args = arguments,
65 value = args[0];62 value = args[0];
66 63
67 if (wrapper && args.length == 1 &&
68 isArray(value) && value.length >= LARGE_ARRAY_SIZE) {64 if (wrapper && args.length == 1 && isArray(value)) {
69 return wrapper.plant(value).value();65 return wrapper.plant(value).value();
70 }66 }
71 var index = 0,67 var index = 0,

lodash.js +++330---236

@@ -1,7 +1,7 @@

1/**1/**
2 * @license2 * @license
3 * Lodash <https://lodash.com/>3 * Lodash <https://lodash.com/>
4 * Copyright JS Foundation and other contributors <https://js.foundation/>4 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
5 * Released under MIT license <https://lodash.com/license>5 * Released under MIT license <https://lodash.com/license>
6 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>6 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
7 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors7 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors

@@ -12,7 +12,7 @@

12 var undefined;12 var undefined;
13 13
14 /** Used as the semantic version number. */14 /** Used as the semantic version number. */
15 var VERSION = '4.17.0';15 var VERSION = '4.17.19';
16 16
17 /** Used as the size to enable large array optimizations. */17 /** Used as the size to enable large array optimizations. */
18 var LARGE_ARRAY_SIZE = 200;18 var LARGE_ARRAY_SIZE = 200;

@@ -143,7 +143,6 @@

143 /** Used to match property names within property paths. */143 /** Used to match property names within property paths. */
144 var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,144 var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
145 reIsPlainProp = /^\w*$/,145 reIsPlainProp = /^\w*$/,
146 reLeadingDot = /^\./,
147 rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;146 rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
148 147
149 /**148 /**

@@ -243,8 +242,8 @@

243 reOptMod = rsModifier + '?',242 reOptMod = rsModifier + '?',
244 rsOptVar = '[' + rsVarRange + ']?',243 rsOptVar = '[' + rsVarRange + ']?',
245 rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',244 rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
246 rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)',
247 rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)',245 rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
246 rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
248 rsSeq = rsOptVar + reOptMod + rsOptJoin,247 rsSeq = rsOptVar + reOptMod + rsOptJoin,
249 rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,248 rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
250 rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';249 rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';

@@ -277,7 +276,7 @@

277 var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');276 var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
278 277
279 /** Used to detect strings that need a more robust regexp to match words. */278 /** Used to detect strings that need a more robust regexp to match words. */
280 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 ]/;279 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 ]/;
281 280
282 /** Used to assign default `context` object properties. */281 /** Used to assign default `context` object properties. */
283 var contextProps = [282 var contextProps = [

@@ -437,6 +436,14 @@

437 /** Used to access faster Node.js helpers. */436 /** Used to access faster Node.js helpers. */
438 var nodeUtil = (function() {437 var nodeUtil = (function() {
439 try {438 try {
439 // Use `util.types` for Node.js 10+.
440 var types = freeModule && freeModule.require && freeModule.require('util').types;
441
442 if (types) {
443 return types;
444 }
445
446 // Legacy `process.binding('util')` for Node.js < 10.
440 return freeProcess && freeProcess.binding && freeProcess.binding('util');447 return freeProcess && freeProcess.binding && freeProcess.binding('util');
441 } catch (e) {}448 } catch (e) {}
442 }());449 }());

@@ -452,34 +459,6 @@

452 /*--------------------------------------------------------------------------*/459 /*--------------------------------------------------------------------------*/
453 460
454 /**461 /**
455 * Adds the key-value `pair` to `map`.
456 *
457 * @private
458 * @param {Object} map The map to modify.
459 * @param {Array} pair The key-value pair to add.
460 * @returns {Object} Returns `map`.
461 */
462 function addMapEntry(map, pair) {
463 // Don't return `map.set` because it's not chainable in IE 11.
464 map.set(pair[0], pair[1]);
465 return map;
466 }
467
468 /**
469 * Adds `value` to `set`.
470 *
471 * @private
472 * @param {Object} set The set to modify.
473 * @param {*} value The value to add.
474 * @returns {Object} Returns `set`.
475 */
476 function addSetEntry(set, value) {
477 // Don't return `set.add` because it's not chainable in IE 11.
478 set.add(value);
479 return set;
480 }
481
482 /**
483 * A faster alternative to `Function#apply`, this function invokes `func`462 * A faster alternative to `Function#apply`, this function invokes `func`
484 * with the `this` binding of `thisArg` and the arguments of `args`.463 * with the `this` binding of `thisArg` and the arguments of `args`.
485 *464 *

@@ -1567,9 +1546,9 @@

1567 * Shortcut fusion is an optimization to merge iteratee calls; this avoids1546 * Shortcut fusion is an optimization to merge iteratee calls; this avoids
1568 * the creation of intermediate arrays and can greatly reduce the number of1547 * the creation of intermediate arrays and can greatly reduce the number of
1569 * iteratee executions. Sections of a chain sequence qualify for shortcut1548 * iteratee executions. Sections of a chain sequence qualify for shortcut
1570 * fusion if the section is applied to an array of at least `200` elements
1571 * and any iteratees accept only one argument. The heuristic for whether a
1572 * section qualifies for shortcut fusion is subject to change.1549 * fusion if the section is applied to an array and iteratees accept only
1550 * one argument. The heuristic for whether a section qualifies for shortcut
1551 * fusion is subject to change.
1573 *1552 *
1574 * Chaining is supported in custom builds as long as the `_#value` method is1553 * Chaining is supported in custom builds as long as the `_#value` method is
1575 * directly or indirectly included in the build.1554 * directly or indirectly included in the build.

@@ -1728,8 +1707,8 @@

1728 1707
1729 /**1708 /**
1730 * By default, the template delimiters used by lodash are like those in1709 * By default, the template delimiters used by lodash are like those in
1731 * embedded Ruby (ERB). Change the following template settings to use
1732 * alternative delimiters.1710 * embedded Ruby (ERB) as well as ES2015 template strings. Change the
1711 * following template settings to use alternative delimiters.
1733 *1712 *
1734 * @static1713 * @static
1735 * @memberOf _1714 * @memberOf _

@@ -1876,8 +1855,7 @@

1876 resIndex = 0,1855 resIndex = 0,
1877 takeCount = nativeMin(length, this.__takeCount__);1856 takeCount = nativeMin(length, this.__takeCount__);
1878 1857
1879 if (!isArr || arrLength < LARGE_ARRAY_SIZE ||
1880 (arrLength == length && takeCount == length)) {1858 if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
1881 return baseWrapperValue(array, this.__actions__);1859 return baseWrapperValue(array, this.__actions__);
1882 }1860 }
1883 var result = [];1861 var result = [];

@@ -1991,7 +1969,7 @@

1991 */1969 */
1992 function hashHas(key) {1970 function hashHas(key) {
1993 var data = this.__data__;1971 var data = this.__data__;
1994 return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);1972 return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
1995 }1973 }
1996 1974
1997 /**1975 /**

@@ -2465,24 +2443,6 @@

2465 }2443 }
2466 2444
2467 /**2445 /**
2468 * Used by `_.defaults` to customize its `_.assignIn` use.
2469 *
2470 * @private
2471 * @param {*} objValue The destination value.
2472 * @param {*} srcValue The source value.
2473 * @param {string} key The key of the property to assign.
2474 * @param {Object} object The parent object of `objValue`.
2475 * @returns {*} Returns the value to assign.
2476 */
2477 function assignInDefaults(objValue, srcValue, key, object) {
2478 if (objValue === undefined ||
2479 (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
2480 return srcValue;
2481 }
2482 return objValue;
2483 }
2484
2485 /**
2486 * This function is like `assignValue` except that it doesn't assign2446 * This function is like `assignValue` except that it doesn't assign
2487 * `undefined` values.2447 * `undefined` values.
2488 *2448 *

@@ -2696,7 +2656,7 @@

2696 if (!cloneableTags[tag]) {2656 if (!cloneableTags[tag]) {
2697 return object ? value : {};2657 return object ? value : {};
2698 }2658 }
2699 result = initCloneByTag(value, tag, baseClone, isDeep);2659 result = initCloneByTag(value, tag, isDeep);
2700 }2660 }
2701 }2661 }
2702 // Check for circular references and return its corresponding clone.2662 // Check for circular references and return its corresponding clone.

@@ -2707,6 +2667,16 @@

2707 }2667 }
2708 stack.set(value, result);2668 stack.set(value, result);
2709 2669
2670 if (isSet(value)) {
2671 value.forEach(function(subValue) {
2672 result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
2673 });
2674 } else if (isMap(value)) {
2675 value.forEach(function(subValue, key) {
2676 result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
2677 });
2678 }
2679
2710 var keysFunc = isFull2680 var keysFunc = isFull
2711 ? (isFlat ? getAllKeysIn : getAllKeys)2681 ? (isFlat ? getAllKeysIn : getAllKeys)
2712 : (isFlat ? keysIn : keys);2682 : (isFlat ? keysIn : keys);

@@ -3056,7 +3026,7 @@

3056 * @returns {*} Returns the resolved value.3026 * @returns {*} Returns the resolved value.
3057 */3027 */
3058 function baseGet(object, path) {3028 function baseGet(object, path) {
3059 path = isKey(path, object) ? [path] : castPath(path);3029 path = castPath(path, object);
3060 3030
3061 var index = 0,3031 var index = 0,
3062 length = path.length;3032 length = path.length;

@@ -3094,8 +3064,7 @@

3094 if (value == null) {3064 if (value == null) {
3095 return value === undefined ? undefinedTag : nullTag;3065 return value === undefined ? undefinedTag : nullTag;
3096 }3066 }
3097 value = Object(value);
3098 return (symToStringTag && symToStringTag in value)3067 return (symToStringTag && symToStringTag in Object(value))
3099 ? getRawTag(value)3068 ? getRawTag(value)
3100 : objectToString(value);3069 : objectToString(value);
3101 }3070 }

@@ -3242,12 +3211,9 @@

3242 * @returns {*} Returns the result of the invoked method.3211 * @returns {*} Returns the result of the invoked method.
3243 */3212 */
3244 function baseInvoke(object, path, args) {3213 function baseInvoke(object, path, args) {
3245 if (!isKey(path, object)) {
3246 path = castPath(path);
3247 object = parent(object, path);
3248 path = last(path);
3249 }
3250 var func = object == null ? object : object[toKey(path)];3214 path = castPath(path, object);
3215 object = parent(object, path);
3216 var func = object == null ? object : object[toKey(last(path))];
3251 return func == null ? undefined : apply(func, object, args);3217 return func == null ? undefined : apply(func, object, args);
3252 }3218 }
3253 3219

@@ -3302,7 +3268,7 @@

3302 if (value === other) {3268 if (value === other) {
3303 return true;3269 return true;
3304 }3270 }
3305 if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {3271 if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
3306 return value !== value && other !== other;3272 return value !== value && other !== other;
3307 }3273 }
3308 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);3274 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);

@@ -3325,17 +3291,12 @@

3325 function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {3291 function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
3326 var objIsArr = isArray(object),3292 var objIsArr = isArray(object),
3327 othIsArr = isArray(other),3293 othIsArr = isArray(other),
3328 objTag = arrayTag,
3329 othTag = arrayTag;3294 objTag = objIsArr ? arrayTag : getTag(object),
3295 othTag = othIsArr ? arrayTag : getTag(other);
3330 3296
3331 if (!objIsArr) {
3332 objTag = getTag(object);
3333 objTag = objTag == argsTag ? objectTag : objTag;
3334 }
3335 if (!othIsArr) {
3336 othTag = getTag(other);
3337 othTag = othTag == argsTag ? objectTag : othTag;
3338 }3297 objTag = objTag == argsTag ? objectTag : objTag;
3298 othTag = othTag == argsTag ? objectTag : othTag;
3299
3339 var objIsObj = objTag == objectTag,3300 var objIsObj = objTag == objectTag,
3340 othIsObj = othTag == objectTag,3301 othIsObj = othTag == objectTag,
3341 isSameTag = objTag == othTag;3302 isSameTag = objTag == othTag;

@@ -3637,13 +3598,13 @@

3637 return;3598 return;
3638 }3599 }
3639 baseFor(source, function(srcValue, key) {3600 baseFor(source, function(srcValue, key) {
3601 stack || (stack = new Stack);
3640 if (isObject(srcValue)) {3602 if (isObject(srcValue)) {
3641 stack || (stack = new Stack);
3642 baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);3603 baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
3643 }3604 }
3644 else {3605 else {
3645 var newValue = customizer3606 var newValue = customizer
3646 ? customizer(object[key], srcValue, (key + ''), object, source, stack)3607 ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
3647 : undefined;3608 : undefined;
3648 3609
3649 if (newValue === undefined) {3610 if (newValue === undefined) {

@@ -3670,8 +3631,8 @@

3670 * counterparts.3631 * counterparts.
3671 */3632 */
3672 function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {3633 function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
3673 var objValue = object[key],
3674 srcValue = source[key],3634 var objValue = safeGet(object, key),
3635 srcValue = safeGet(source, key),
3675 stacked = stack.get(srcValue);3636 stacked = stack.get(srcValue);
3676 3637
3677 if (stacked) {3638 if (stacked) {

@@ -3714,7 +3675,7 @@

3714 if (isArguments(objValue)) {3675 if (isArguments(objValue)) {
3715 newValue = toPlainObject(objValue);3676 newValue = toPlainObject(objValue);
3716 }3677 }
3717 else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {3678 else if (!isObject(objValue) || isFunction(objValue)) {
3718 newValue = initCloneObject(srcValue);3679 newValue = initCloneObject(srcValue);
3719 }3680 }
3720 }3681 }

@@ -3758,8 +3719,21 @@

3758 * @returns {Array} Returns the new sorted array.3719 * @returns {Array} Returns the new sorted array.
3759 */3720 */
3760 function baseOrderBy(collection, iteratees, orders) {3721 function baseOrderBy(collection, iteratees, orders) {
3722 if (iteratees.length) {
3723 iteratees = arrayMap(iteratees, function(iteratee) {
3724 if (isArray(iteratee)) {
3725 return function(value) {
3726 return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
3727 }
3728 }
3729 return iteratee;
3730 });
3731 } else {
3732 iteratees = [identity];
3733 }
3734
3761 var index = -1;3735 var index = -1;
3762 iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));3736 iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
3763 3737
3764 var result = baseMap(collection, function(value, key, collection) {3738 var result = baseMap(collection, function(value, key, collection) {
3765 var criteria = arrayMap(iteratees, function(iteratee) {3739 var criteria = arrayMap(iteratees, function(iteratee) {

@@ -3783,7 +3757,6 @@

3783 * @returns {Object} Returns the new object.3757 * @returns {Object} Returns the new object.
3784 */3758 */
3785 function basePick(object, paths) {3759 function basePick(object, paths) {
3786 object = Object(object);
3787 return basePickBy(object, paths, function(value, path) {3760 return basePickBy(object, paths, function(value, path) {
3788 return hasIn(object, path);3761 return hasIn(object, path);
3789 });3762 });

@@ -3808,7 +3781,7 @@

3808 value = baseGet(object, path);3781 value = baseGet(object, path);
3809 3782
3810 if (predicate(value, path)) {3783 if (predicate(value, path)) {
3811 baseSet(result, path, value);3784 baseSet(result, castPath(path, object), value);
3812 }3785 }
3813 }3786 }
3814 return result;3787 return result;

@@ -3884,18 +3857,9 @@

3884 var previous = index;3857 var previous = index;
3885 if (isIndex(index)) {3858 if (isIndex(index)) {
3886 splice.call(array, index, 1);3859 splice.call(array, index, 1);
3860 } else {
3861 baseUnset(array, index);
3887 }3862 }
3888 else if (!isKey(index, array)) {
3889 var path = castPath(index),
3890 object = parent(array, path);
3891
3892 if (object != null) {
3893 delete object[toKey(last(path))];
3894 }
3895 }
3896 else {
3897 delete array[toKey(index)];
3898 }
3899 }3863 }
3900 }3864 }
3901 return array;3865 return array;

@@ -4015,7 +3979,7 @@

4015 if (!isObject(object)) {3979 if (!isObject(object)) {
4016 return object;3980 return object;
4017 }3981 }
4018 path = isKey(path, object) ? [path] : castPath(path);3982 path = castPath(path, object);
4019 3983
4020 var index = -1,3984 var index = -1,
4021 length = path.length,3985 length = path.length,

@@ -4026,6 +3990,10 @@

4026 var key = toKey(path[index]),3990 var key = toKey(path[index]),
4027 newValue = value;3991 newValue = value;
4028 3992
3993 if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
3994 return object;
3995 }
3996
4029 if (index != lastIndex) {3997 if (index != lastIndex) {
4030 var objValue = nested[key];3998 var objValue = nested[key];
4031 newValue = customizer ? customizer(objValue, key, nested) : undefined;3999 newValue = customizer ? customizer(objValue, key, nested) : undefined;

@@ -4178,11 +4146,14 @@

4178 * into `array`.4146 * into `array`.
4179 */4147 */
4180 function baseSortedIndexBy(array, value, iteratee, retHighest) {4148 function baseSortedIndexBy(array, value, iteratee, retHighest) {
4149 var low = 0,
4150 high = array == null ? 0 : array.length;
4151 if (high === 0) {
4152 return 0;
4153 }
4154
4181 value = iteratee(value);4155 value = iteratee(value);
4182
4183 var low = 0,
4184 high = array == null ? 0 : array.length,
4185 valIsNaN = value !== value,4156 var valIsNaN = value !== value,
4186 valIsNull = value === null,4157 valIsNull = value === null,
4187 valIsSymbol = isSymbol(value),4158 valIsSymbol = isSymbol(value),
4188 valIsUndefined = value === undefined;4159 valIsUndefined = value === undefined;

@@ -4356,11 +4327,9 @@

4356 * @returns {boolean} Returns `true` if the property is deleted, else `false`.4327 * @returns {boolean} Returns `true` if the property is deleted, else `false`.
4357 */4328 */
4358 function baseUnset(object, path) {4329 function baseUnset(object, path) {
4359 path = isKey(path, object) ? [path] : castPath(path);4330 path = castPath(path, object);
4360 object = parent(object, path);4331 object = parent(object, path);
4361
4362 var key = toKey(last(path));
4363 return !(object != null && hasOwnProperty.call(object, key)) || delete object[key];4332 return object == null || delete object[toKey(last(path))];
4364 }4333 }
4365 4334
4366 /**4335 /**

@@ -4500,10 +4469,14 @@

4500 *4469 *
4501 * @private4470 * @private
4502 * @param {*} value The value to inspect.4471 * @param {*} value The value to inspect.
4472 * @param {Object} [object] The object to query keys on.
4503 * @returns {Array} Returns the cast property path array.4473 * @returns {Array} Returns the cast property path array.
4504 */4474 */
4505 function castPath(value) {
4506 return isArray(value) ? value : stringToPath(value);4475 function castPath(value, object) {
4476 if (isArray(value)) {
4477 return value;
4478 }
4479 return isKey(value, object) ? [value] : stringToPath(toString(value));
4507 }4480 }
4508 4481
4509 /**4482 /**

@@ -4588,20 +4561,6 @@

4588 }4561 }
4589 4562
4590 /**4563 /**
4591 * Creates a clone of `map`.
4592 *
4593 * @private
4594 * @param {Object} map The map to clone.
4595 * @param {Function} cloneFunc The function to clone values.
4596 * @param {boolean} [isDeep] Specify a deep clone.
4597 * @returns {Object} Returns the cloned map.
4598 */
4599 function cloneMap(map, isDeep, cloneFunc) {
4600 var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
4601 return arrayReduce(array, addMapEntry, new map.constructor);
4602 }
4603
4604 /**
4605 * Creates a clone of `regexp`.4564 * Creates a clone of `regexp`.
4606 *4565 *
4607 * @private4566 * @private

@@ -4615,20 +4574,6 @@

4615 }4574 }
4616 4575
4617 /**4576 /**
4618 * Creates a clone of `set`.
4619 *
4620 * @private
4621 * @param {Object} set The set to clone.
4622 * @param {Function} cloneFunc The function to clone values.
4623 * @param {boolean} [isDeep] Specify a deep clone.
4624 * @returns {Object} Returns the cloned set.
4625 */
4626 function cloneSet(set, isDeep, cloneFunc) {
4627 var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
4628 return arrayReduce(array, addSetEntry, new set.constructor);
4629 }
4630
4631 /**
4632 * Creates a clone of the `symbol` object.4577 * Creates a clone of the `symbol` object.
4633 *4578 *
4634 * @private4579 * @private

@@ -5183,8 +5128,7 @@

5183 var args = arguments,5128 var args = arguments,
5184 value = args[0];5129 value = args[0];
5185 5130
5186 if (wrapper && args.length == 1 &&
5187 isArray(value) && value.length >= LARGE_ARRAY_SIZE) {5131 if (wrapper && args.length == 1 && isArray(value)) {
5188 return wrapper.plant(value).value();5132 return wrapper.plant(value).value();
5189 }5133 }
5190 var index = 0,5134 var index = 0,

@@ -5491,8 +5435,8 @@

5491 var func = Math[methodName];5435 var func = Math[methodName];
5492 return function(number, precision) {5436 return function(number, precision) {
5493 number = toNumber(number);5437 number = toNumber(number);
5494 precision = nativeMin(toInteger(precision), 292);
5495 if (precision) {5438 precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
5439 if (precision && nativeIsFinite(number)) {
5496 // Shift with exponential notation to avoid floating-point issues.5440 // Shift with exponential notation to avoid floating-point issues.
5497 // See [MDN](https://mdn.io/round#Examples) for more details.5441 // See [MDN](https://mdn.io/round#Examples) for more details.
5498 var pair = (toString(number) + 'e').split('e'),5442 var pair = (toString(number) + 'e').split('e'),

@@ -5596,7 +5540,7 @@

5596 thisArg = newData[2];5540 thisArg = newData[2];
5597 partials = newData[3];5541 partials = newData[3];
5598 holders = newData[4];5542 holders = newData[4];
5599 arity = newData[9] = newData[9] == null5543 arity = newData[9] = newData[9] === undefined
5600 ? (isBindKey ? 0 : func.length)5544 ? (isBindKey ? 0 : func.length)
5601 : nativeMax(newData[9] - length, 0);5545 : nativeMax(newData[9] - length, 0);
5602 5546

@@ -5617,6 +5561,63 @@

5617 }5561 }
5618 5562
5619 /**5563 /**
5564 * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
5565 * of source objects to the destination object for all destination properties
5566 * that resolve to `undefined`.
5567 *
5568 * @private
5569 * @param {*} objValue The destination value.
5570 * @param {*} srcValue The source value.
5571 * @param {string} key The key of the property to assign.
5572 * @param {Object} object The parent object of `objValue`.
5573 * @returns {*} Returns the value to assign.
5574 */
5575 function customDefaultsAssignIn(objValue, srcValue, key, object) {
5576 if (objValue === undefined ||
5577 (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
5578 return srcValue;
5579 }
5580 return objValue;
5581 }
5582
5583 /**
5584 * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
5585 * objects into destination objects that are passed thru.
5586 *
5587 * @private
5588 * @param {*} objValue The destination value.
5589 * @param {*} srcValue The source value.
5590 * @param {string} key The key of the property to merge.
5591 * @param {Object} object The parent object of `objValue`.
5592 * @param {Object} source The parent object of `srcValue`.
5593 * @param {Object} [stack] Tracks traversed source values and their merged
5594 * counterparts.
5595 * @returns {*} Returns the value to assign.
5596 */
5597 function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
5598 if (isObject(objValue) && isObject(srcValue)) {
5599 // Recursively merge objects and arrays (susceptible to call stack limits).
5600 stack.set(srcValue, objValue);
5601 baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
5602 stack['delete'](srcValue);
5603 }
5604 return objValue;
5605 }
5606
5607 /**
5608 * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
5609 * objects.
5610 *
5611 * @private
5612 * @param {*} value The value to inspect.
5613 * @param {string} key The key of the property to inspect.
5614 * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
5615 */
5616 function customOmitClone(value) {
5617 return isPlainObject(value) ? undefined : value;
5618 }
5619
5620 /**
5620 * A specialized version of `baseIsEqualDeep` for arrays with support for5621 * A specialized version of `baseIsEqualDeep` for arrays with support for
5621 * partial deep comparisons.5622 * partial deep comparisons.
5622 *5623 *

@@ -5637,10 +5638,11 @@

5637 if (arrLength != othLength && !(isPartial && othLength > arrLength)) {5638 if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
5638 return false;5639 return false;
5639 }5640 }
5640 // Assume cyclic values are equal.
5641 var stacked = stack.get(array);
5642 if (stacked && stack.get(other)) {
5643 return stacked == other;5641 // Check that cyclic values are equal.
5642 var arrStacked = stack.get(array);
5643 var othStacked = stack.get(other);
5644 if (arrStacked && othStacked) {
5645 return arrStacked == other && othStacked == array;
5644 }5646 }
5645 var index = -1,5647 var index = -1,
5646 result = true,5648 result = true,

@@ -5787,9 +5789,9 @@

5787 */5789 */
5788 function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {5790 function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
5789 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,5791 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
5790 objProps = keys(object),5792 objProps = getAllKeys(object),
5791 objLength = objProps.length,5793 objLength = objProps.length,
5792 othProps = keys(other),5794 othProps = getAllKeys(other),
5793 othLength = othProps.length;5795 othLength = othProps.length;
5794 5796
5795 if (objLength != othLength && !isPartial) {5797 if (objLength != othLength && !isPartial) {

@@ -5802,10 +5804,11 @@

5802 return false;5804 return false;
5803 }5805 }
5804 }5806 }
5805 // Assume cyclic values are equal.
5806 var stacked = stack.get(object);
5807 if (stacked && stack.get(other)) {
5808 return stacked == other;5807 // Check that cyclic values are equal.
5808 var objStacked = stack.get(object);
5809 var othStacked = stack.get(other);
5810 if (objStacked && othStacked) {
5811 return objStacked == other && othStacked == object;
5809 }5812 }
5810 var result = true;5813 var result = true;
5811 stack.set(object, other);5814 stack.set(object, other);

@@ -6027,7 +6030,15 @@

6027 * @param {Object} object The object to query.6030 * @param {Object} object The object to query.
6028 * @returns {Array} Returns the array of symbols.6031 * @returns {Array} Returns the array of symbols.
6029 */6032 */
6030 var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;6033 var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
6034 if (object == null) {
6035 return [];
6036 }
6037 object = Object(object);
6038 return arrayFilter(nativeGetSymbols(object), function(symbol) {
6039 return propertyIsEnumerable.call(object, symbol);
6040 });
6041 };
6031 6042
6032 /**6043 /**
6033 * Creates an array of the own and inherited enumerable symbols of `object`.6044 * Creates an array of the own and inherited enumerable symbols of `object`.

@@ -6128,7 +6139,7 @@

6128 * @returns {boolean} Returns `true` if `path` exists, else `false`.6139 * @returns {boolean} Returns `true` if `path` exists, else `false`.
6129 */6140 */
6130 function hasPath(object, path, hasFunc) {6141 function hasPath(object, path, hasFunc) {
6131 path = isKey(path, object) ? [path] : castPath(path);6142 path = castPath(path, object);
6132 6143
6133 var index = -1,6144 var index = -1,
6134 length = path.length,6145 length = path.length,

@@ -6158,7 +6169,7 @@

6158 */6169 */
6159 function initCloneArray(array) {6170 function initCloneArray(array) {
6160 var length = array.length,6171 var length = array.length,
6161 result = array.constructor(length);6172 result = new array.constructor(length);
6162 6173
6163 // Add properties assigned by `RegExp#exec`.6174 // Add properties assigned by `RegExp#exec`.
6164 if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {6175 if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {

@@ -6185,16 +6196,15 @@

6185 * Initializes an object clone based on its `toStringTag`.6196 * Initializes an object clone based on its `toStringTag`.
6186 *6197 *
6187 * **Note:** This function only supports cloning values with tags of6198 * **Note:** This function only supports cloning values with tags of
6188 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.6199 * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
6189 *6200 *
6190 * @private6201 * @private
6191 * @param {Object} object The object to clone.6202 * @param {Object} object The object to clone.
6192 * @param {string} tag The `toStringTag` of the object to clone.6203 * @param {string} tag The `toStringTag` of the object to clone.
6193 * @param {Function} cloneFunc The function to clone values.
6194 * @param {boolean} [isDeep] Specify a deep clone.6204 * @param {boolean} [isDeep] Specify a deep clone.
6195 * @returns {Object} Returns the initialized clone.6205 * @returns {Object} Returns the initialized clone.
6196 */6206 */
6197 function initCloneByTag(object, tag, cloneFunc, isDeep) {6207 function initCloneByTag(object, tag, isDeep) {
6198 var Ctor = object.constructor;6208 var Ctor = object.constructor;
6199 switch (tag) {6209 switch (tag) {
6200 case arrayBufferTag:6210 case arrayBufferTag:

@@ -6213,7 +6223,7 @@

6213 return cloneTypedArray(object, isDeep);6223 return cloneTypedArray(object, isDeep);
6214 6224
6215 case mapTag:6225 case mapTag:
6216 return cloneMap(object, isDeep, cloneFunc);6226 return new Ctor;
6217 6227
6218 case numberTag:6228 case numberTag:
6219 case stringTag:6229 case stringTag:

@@ -6223,7 +6233,7 @@

6223 return cloneRegExp(object);6233 return cloneRegExp(object);
6224 6234
6225 case setTag:6235 case setTag:
6226 return cloneSet(object, isDeep, cloneFunc);6236 return new Ctor;
6227 6237
6228 case symbolTag:6238 case symbolTag:
6229 return cloneSymbol(object);6239 return cloneSymbol(object);

@@ -6270,10 +6280,13 @@

6270 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.6280 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
6271 */6281 */
6272 function isIndex(value, length) {6282 function isIndex(value, length) {
6283 var type = typeof value;
6273 length = length == null ? MAX_SAFE_INTEGER : length;6284 length = length == null ? MAX_SAFE_INTEGER : length;
6285
6274 return !!length &&6286 return !!length &&
6275 (typeof value == 'number' || reIsUint.test(value)) &&
6276 (value > -1 && value % 1 == 0 && value < length);6287 (type == 'number' ||
6288 (type != 'symbol' && reIsUint.test(value))) &&
6289 (value > -1 && value % 1 == 0 && value < length);
6277 }6290 }
6278 6291
6279 /**6292 /**

@@ -6514,29 +6527,6 @@

6514 }6527 }
6515 6528
6516 /**6529 /**
6517 * Used by `_.defaultsDeep` to customize its `_.merge` use.
6518 *
6519 * @private
6520 * @param {*} objValue The destination value.
6521 * @param {*} srcValue The source value.
6522 * @param {string} key The key of the property to merge.
6523 * @param {Object} object The parent object of `objValue`.
6524 * @param {Object} source The parent object of `srcValue`.
6525 * @param {Object} [stack] Tracks traversed source values and their merged
6526 * counterparts.
6527 * @returns {*} Returns the value to assign.
6528 */
6529 function mergeDefaults(objValue, srcValue, key, object, source, stack) {
6530 if (isObject(objValue) && isObject(srcValue)) {
6531 // Recursively merge objects and arrays (susceptible to call stack limits).
6532 stack.set(srcValue, objValue);
6533 baseMerge(objValue, srcValue, undefined, mergeDefaults, stack);
6534 stack['delete'](srcValue);
6535 }
6536 return objValue;
6537 }
6538
6539 /**
6540 * This function is like6530 * This function is like
6541 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)6531 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
6542 * except that it includes inherited enumerable properties.6532 * except that it includes inherited enumerable properties.

@@ -6605,7 +6595,7 @@

6605 * @returns {*} Returns the parent value.6595 * @returns {*} Returns the parent value.
6606 */6596 */
6607 function parent(object, path) {6597 function parent(object, path) {
6608 return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));6598 return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
6609 }6599 }
6610 6600
6611 /**6601 /**

@@ -6631,6 +6621,26 @@

6631 }6621 }
6632 6622
6633 /**6623 /**
6624 * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
6625 *
6626 * @private
6627 * @param {Object} object The object to query.
6628 * @param {string} key The key of the property to get.
6629 * @returns {*} Returns the property value.
6630 */
6631 function safeGet(object, key) {
6632 if (key === 'constructor' && typeof object[key] === 'function') {
6633 return;
6634 }
6635
6636 if (key == '__proto__') {
6637 return;
6638 }
6639
6640 return object[key];
6641 }
6642
6643 /**
6634 * Sets metadata for `func`.6644 * Sets metadata for `func`.
6635 *6645 *
6636 * **Note:** If this function becomes hot, i.e. is invoked a lot in a short6646 * **Note:** If this function becomes hot, i.e. is invoked a lot in a short

@@ -6745,14 +6755,12 @@

6745 * @returns {Array} Returns the property path array.6755 * @returns {Array} Returns the property path array.
6746 */6756 */
6747 var stringToPath = memoizeCapped(function(string) {6757 var stringToPath = memoizeCapped(function(string) {
6748 string = toString(string);
6749
6750 var result = [];6758 var result = [];
6751 if (reLeadingDot.test(string)) {6759 if (string.charCodeAt(0) === 46 /* . */) {
6752 result.push('');6760 result.push('');
6753 }6761 }
6754 string.replace(rePropName, function(match, number, quote, string) {
6755 result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));6762 string.replace(rePropName, function(match, number, quote, subString) {
6763 result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
6756 });6764 });
6757 return result;6765 return result;
6758 });6766 });

@@ -8280,7 +8288,7 @@

8280 *8288 *
8281 * var users = [8289 * var users = [
8282 * { 'user': 'barney', 'active': false },8290 * { 'user': 'barney', 'active': false },
8283 * { 'user': 'fred', 'active': false},8291 * { 'user': 'fred', 'active': false },
8284 * { 'user': 'pebbles', 'active': true }8292 * { 'user': 'pebbles', 'active': true }
8285 * ];8293 * ];
8286 *8294 *

@@ -9181,6 +9189,10 @@

9181 * // The `_.property` iteratee shorthand.9189 * // The `_.property` iteratee shorthand.
9182 * _.filter(users, 'active');9190 * _.filter(users, 'active');
9183 * // => objects for ['barney']9191 * // => objects for ['barney']
9192 *
9193 * // Combining several predicates using `_.overEvery` or `_.overSome`.
9194 * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
9195 * // => objects for ['fred', 'barney']
9184 */9196 */
9185 function filter(collection, predicate) {9197 function filter(collection, predicate) {
9186 var func = isArray(collection) ? arrayFilter : baseFilter;9198 var func = isArray(collection) ? arrayFilter : baseFilter;

@@ -9481,12 +9493,10 @@

9481 var invokeMap = baseRest(function(collection, path, args) {9493 var invokeMap = baseRest(function(collection, path, args) {
9482 var index = -1,9494 var index = -1,
9483 isFunc = typeof path == 'function',9495 isFunc = typeof path == 'function',
9484 isProp = isKey(path),
9485 result = isArrayLike(collection) ? Array(collection.length) : [];9496 result = isArrayLike(collection) ? Array(collection.length) : [];
9486 9497
9487 baseEach(collection, function(value) {9498 baseEach(collection, function(value) {
9488 var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined);
9489 result[++index] = func ? apply(func, value, args) : baseInvoke(value, path, args);9499 result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
9490 });9500 });
9491 return result;9501 return result;
9492 });9502 });

@@ -9932,15 +9942,15 @@

9932 * var users = [9942 * var users = [
9933 * { 'user': 'fred', 'age': 48 },9943 * { 'user': 'fred', 'age': 48 },
9934 * { 'user': 'barney', 'age': 36 },9944 * { 'user': 'barney', 'age': 36 },
9935 * { 'user': 'fred', 'age': 40 },9945 * { 'user': 'fred', 'age': 30 },
9936 * { 'user': 'barney', 'age': 34 }9946 * { 'user': 'barney', 'age': 34 }
9937 * ];9947 * ];
9938 *9948 *
9939 * _.sortBy(users, [function(o) { return o.user; }]);9949 * _.sortBy(users, [function(o) { return o.user; }]);
9940 * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]9950 * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
9941 *9951 *
9942 * _.sortBy(users, ['user', 'age']);9952 * _.sortBy(users, ['user', 'age']);
9943 * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]9953 * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
9944 */9954 */
9945 var sortBy = baseRest(function(collection, iteratees) {9955 var sortBy = baseRest(function(collection, iteratees) {
9946 if (collection == null) {9956 if (collection == null) {

@@ -10362,9 +10372,11 @@

10362 function remainingWait(time) {10372 function remainingWait(time) {
10363 var timeSinceLastCall = time - lastCallTime,10373 var timeSinceLastCall = time - lastCallTime,
10364 timeSinceLastInvoke = time - lastInvokeTime,10374 timeSinceLastInvoke = time - lastInvokeTime,
10365 result = wait - timeSinceLastCall;10375 timeWaiting = wait - timeSinceLastCall;
10366 10376
10367 return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;10377 return maxing
10378 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
10379 : timeWaiting;
10368 }10380 }
10369 10381
10370 function shouldInvoke(time) {10382 function shouldInvoke(time) {

@@ -10425,6 +10437,7 @@

10425 }10437 }
10426 if (maxing) {10438 if (maxing) {
10427 // Handle invocations in a tight loop.10439 // Handle invocations in a tight loop.
10440 clearTimeout(timerId);
10428 timerId = setTimeout(timerExpired, wait);10441 timerId = setTimeout(timerExpired, wait);
10429 return invokeFunc(lastCallTime);10442 return invokeFunc(lastCallTime);
10430 }10443 }

@@ -10851,18 +10864,14 @@

10851 if (typeof func != 'function') {10864 if (typeof func != 'function') {
10852 throw new TypeError(FUNC_ERROR_TEXT);10865 throw new TypeError(FUNC_ERROR_TEXT);
10853 }10866 }
10854 start = start === undefined ? 0 : nativeMax(toInteger(start), 0);10867 start = start == null ? 0 : nativeMax(toInteger(start), 0);
10855 return baseRest(function(args) {10868 return baseRest(function(args) {
10856 var array = args[start],10869 var array = args[start],
10857 lastIndex = args.length - 1,
10858 otherArgs = castSlice(args, 0, start);10870 otherArgs = castSlice(args, 0, start);
10859 10871
10860 if (array) {10872 if (array) {
10861 arrayPush(otherArgs, array);10873 arrayPush(otherArgs, array);
10862 }10874 }
10863 if (start != lastIndex) {
10864 arrayPush(otherArgs, castSlice(args, start + 1));
10865 }
10866 return apply(func, this, otherArgs);10875 return apply(func, this, otherArgs);
10867 });10876 });
10868 }10877 }

@@ -11525,7 +11534,7 @@

11525 * date objects, error objects, maps, numbers, `Object` objects, regexes,11534 * date objects, error objects, maps, numbers, `Object` objects, regexes,
11526 * sets, strings, symbols, and typed arrays. `Object` objects are compared11535 * sets, strings, symbols, and typed arrays. `Object` objects are compared
11527 * by their own, not inherited, enumerable properties. Functions and DOM11536 * by their own, not inherited, enumerable properties. Functions and DOM
11528 * nodes are **not** supported.11537 * nodes are compared by strict equality, i.e. `===`.
11529 *11538 *
11530 * @static11539 * @static
11531 * @memberOf _11540 * @memberOf _

@@ -12545,7 +12554,9 @@

12545 * // => 312554 * // => 3
12546 */12555 */
12547 function toSafeInteger(value) {12556 function toSafeInteger(value) {
12548 return baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);12557 return value
12558 ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
12559 : (value === 0 ? value : 0);
12549 }12560 }
12550 12561
12551 /**12562 /**

@@ -12798,9 +12809,35 @@

12798 * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });12809 * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
12799 * // => { 'a': 1, 'b': 2 }12810 * // => { 'a': 1, 'b': 2 }
12800 */12811 */
12801 var defaults = baseRest(function(args) {
12802 args.push(undefined, assignInDefaults);
12803 return apply(assignInWith, undefined, args);12812 var defaults = baseRest(function(object, sources) {
12813 object = Object(object);
12814
12815 var index = -1;
12816 var length = sources.length;
12817 var guard = length > 2 ? sources[2] : undefined;
12818
12819 if (guard && isIterateeCall(sources[0], sources[1], guard)) {
12820 length = 1;
12821 }
12822
12823 while (++index < length) {
12824 var source = sources[index];
12825 var props = keysIn(source);
12826 var propsIndex = -1;
12827 var propsLength = props.length;
12828
12829 while (++propsIndex < propsLength) {
12830 var key = props[propsIndex];
12831 var value = object[key];
12832
12833 if (value === undefined ||
12834 (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
12835 object[key] = source[key];
12836 }
12837 }
12838 }
12839
12840 return object;
12804 });12841 });
12805 12842
12806 /**12843 /**

@@ -12823,7 +12860,7 @@

12823 * // => { 'a': { 'b': 2, 'c': 3 } }12860 * // => { 'a': { 'b': 2, 'c': 3 } }
12824 */12861 */
12825 var defaultsDeep = baseRest(function(args) {12862 var defaultsDeep = baseRest(function(args) {
12826 args.push(undefined, mergeDefaults);12863 args.push(undefined, customDefaultsMerge);
12827 return apply(mergeWith, undefined, args);12864 return apply(mergeWith, undefined, args);
12828 });12865 });
12829 12866

@@ -13197,6 +13234,11 @@

13197 * // => { '1': 'c', '2': 'b' }13234 * // => { '1': 'c', '2': 'b' }
13198 */13235 */
13199 var invert = createInverter(function(result, value, key) {13236 var invert = createInverter(function(result, value, key) {
13237 if (value != null &&
13238 typeof value.toString != 'function') {
13239 value = nativeObjectToString.call(value);
13240 }
13241
13200 result[value] = key;13242 result[value] = key;
13201 }, constant(identity));13243 }, constant(identity));
13202 13244

@@ -13227,6 +13269,11 @@

13227 * // => { 'group1': ['a', 'c'], 'group2': ['b'] }13269 * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
13228 */13270 */
13229 var invertBy = createInverter(function(result, value, key) {13271 var invertBy = createInverter(function(result, value, key) {
13272 if (value != null &&
13273 typeof value.toString != 'function') {
13274 value = nativeObjectToString.call(value);
13275 }
13276
13230 if (hasOwnProperty.call(result, value)) {13277 if (hasOwnProperty.call(result, value)) {
13231 result[value].push(key);13278 result[value].push(key);
13232 } else {13279 } else {

@@ -13477,9 +13524,16 @@

13477 if (object == null) {13524 if (object == null) {
13478 return result;13525 return result;
13479 }13526 }
13527 var isDeep = false;
13528 paths = arrayMap(paths, function(path) {
13529 path = castPath(path, object);
13530 isDeep || (isDeep = path.length > 1);
13531 return path;
13532 });
13480 copyObject(object, getAllKeysIn(object), result);13533 copyObject(object, getAllKeysIn(object), result);
13481 result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG);
13482 13534 if (isDeep) {
13535 result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
13536 }
13483 var length = paths.length;13537 var length = paths.length;
13484 while (length--) {13538 while (length--) {
13485 baseUnset(result, paths[length]);13539 baseUnset(result, paths[length]);

@@ -13529,7 +13583,7 @@

13529 * // => { 'a': 1, 'c': 3 }13583 * // => { 'a': 1, 'c': 3 }
13530 */13584 */
13531 var pick = flatRest(function(object, paths) {13585 var pick = flatRest(function(object, paths) {
13532 return object == null ? {} : basePick(object, arrayMap(paths, toKey));13586 return object == null ? {} : basePick(object, paths);
13533 });13587 });
13534 13588
13535 /**13589 /**

@@ -13551,7 +13605,16 @@

13551 * // => { 'a': 1, 'c': 3 }13605 * // => { 'a': 1, 'c': 3 }
13552 */13606 */
13553 function pickBy(object, predicate) {13607 function pickBy(object, predicate) {
13554 return object == null ? {} : basePickBy(object, getAllKeysIn(object), getIteratee(predicate));13608 if (object == null) {
13609 return {};
13610 }
13611 var props = arrayMap(getAllKeysIn(object), function(prop) {
13612 return [prop];
13613 });
13614 predicate = getIteratee(predicate);
13615 return basePickBy(object, props, function(value, path) {
13616 return predicate(value, path[0]);
13617 });
13555 }13618 }
13556 13619
13557 /**13620 /**

@@ -13584,15 +13647,15 @@

13584 * // => 'default'13647 * // => 'default'
13585 */13648 */
13586 function result(object, path, defaultValue) {13649 function result(object, path, defaultValue) {
13587 path = isKey(path, object) ? [path] : castPath(path);13650 path = castPath(path, object);
13588 13651
13589 var index = -1,13652 var index = -1,
13590 length = path.length;13653 length = path.length;
13591 13654
13592 // Ensure the loop is entered when path is empty.13655 // Ensure the loop is entered when path is empty.
13593 if (!length) {13656 if (!length) {
13657 length = 1;
13594 object = undefined;13658 object = undefined;
13595 length = 1;
13596 }13659 }
13597 while (++index < length) {13660 while (++index < length) {
13598 var value = object == null ? undefined : object[toKey(path[index])];13661 var value = object == null ? undefined : object[toKey(path[index])];

@@ -14618,7 +14681,10 @@

14618 */14681 */
14619 function startsWith(string, target, position) {14682 function startsWith(string, target, position) {
14620 string = toString(string);14683 string = toString(string);
14621 position = baseClamp(toInteger(position), 0, string.length);14684 position = position == null
14685 ? 0
14686 : baseClamp(toInteger(position), 0, string.length);
14687
14622 target = baseToString(target);14688 target = baseToString(target);
14623 return string.slice(position, position + target.length) == target;14689 return string.slice(position, position + target.length) == target;
14624 }14690 }

@@ -14737,9 +14803,9 @@

14737 options = undefined;14803 options = undefined;
14738 }14804 }
14739 string = toString(string);14805 string = toString(string);
14740 options = assignInWith({}, options, settings, assignInDefaults);14806 options = assignInWith({}, options, settings, customDefaultsAssignIn);
14741 14807
14742 var imports = assignInWith({}, options.imports, settings.imports, assignInDefaults),14808 var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
14743 importsKeys = keys(imports),14809 importsKeys = keys(imports),
14744 importsValues = baseValues(imports, importsKeys);14810 importsValues = baseValues(imports, importsKeys);
14745 14811

@@ -14758,9 +14824,12 @@

14758 , 'g');14824 , 'g');
14759 14825
14760 // Use a sourceURL for easier debugging.14826 // Use a sourceURL for easier debugging.
14827 // The sourceURL gets injected into the source that's eval-ed, so be careful
14828 // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
14829 // and escape the comment, thus injecting code that gets evaled.
14761 var sourceURL = '//# sourceURL=' +14830 var sourceURL = '//# sourceURL=' +
14762 ('sourceURL' in options
14763 ? options.sourceURL14831 (hasOwnProperty.call(options, 'sourceURL')
14832 ? (options.sourceURL + '').replace(/\s/g, ' ')
14764 : ('lodash.templateSources[' + (++templateCounter) + ']')14833 : ('lodash.templateSources[' + (++templateCounter) + ']')
14765 ) + '\n';14834 ) + '\n';
14766 14835

@@ -14793,7 +14862,7 @@

14793 14862
14794 // If `variable` is not specified wrap a with-statement around the generated14863 // If `variable` is not specified wrap a with-statement around the generated
14795 // code to add the data object to the top of the scope chain.14864 // code to add the data object to the top of the scope chain.
14796 var variable = options.variable;14865 var variable = hasOwnProperty.call(options, 'variable') && options.variable;
14797 if (!variable) {14866 if (!variable) {
14798 source = 'with (obj) {\n' + source + '\n}\n';14867 source = 'with (obj) {\n' + source + '\n}\n';
14799 }14868 }

@@ -15499,6 +15568,9 @@

15499 * values against any array or object value, respectively. See `_.isEqual`15568 * values against any array or object value, respectively. See `_.isEqual`
15500 * for a list of supported value comparisons.15569 * for a list of supported value comparisons.
15501 *15570 *
15571 * **Note:** Multiple values can be checked by combining several matchers
15572 * using `_.overSome`
15573 *
15502 * @static15574 * @static
15503 * @memberOf _15575 * @memberOf _
15504 * @since 3.0.015576 * @since 3.0.0

@@ -15514,6 +15586,10 @@

15514 *15586 *
15515 * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));15587 * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
15516 * // => [{ 'a': 4, 'b': 5, 'c': 6 }]15588 * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
15589 *
15590 * // Checking for several possible values
15591 * _.filter(users, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
15592 * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
15517 */15593 */
15518 function matches(source) {15594 function matches(source) {
15519 return baseMatches(baseClone(source, CLONE_DEEP_FLAG));15595 return baseMatches(baseClone(source, CLONE_DEEP_FLAG));

@@ -15528,6 +15604,9 @@

15528 * `srcValue` values against any array or object value, respectively. See15604 * `srcValue` values against any array or object value, respectively. See
15529 * `_.isEqual` for a list of supported value comparisons.15605 * `_.isEqual` for a list of supported value comparisons.
15530 *15606 *
15607 * **Note:** Multiple values can be checked by combining several matchers
15608 * using `_.overSome`
15609 *
15531 * @static15610 * @static
15532 * @memberOf _15611 * @memberOf _
15533 * @since 3.2.015612 * @since 3.2.0

@@ -15544,6 +15623,10 @@

15544 *15623 *
15545 * _.find(objects, _.matchesProperty('a', 4));15624 * _.find(objects, _.matchesProperty('a', 4));
15546 * // => { 'a': 4, 'b': 5, 'c': 6 }15625 * // => { 'a': 4, 'b': 5, 'c': 6 }
15626 *
15627 * // Checking for several possible values
15628 * _.filter(users, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
15629 * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
15547 */15630 */
15548 function matchesProperty(path, srcValue) {15631 function matchesProperty(path, srcValue) {
15549 return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));15632 return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));

@@ -15767,6 +15850,10 @@

15767 * Creates a function that checks if **all** of the `predicates` return15850 * Creates a function that checks if **all** of the `predicates` return
15768 * truthy when invoked with the arguments it receives.15851 * truthy when invoked with the arguments it receives.
15769 *15852 *
15853 * Following shorthands are possible for providing predicates.
15854 * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
15855 * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
15856 *
15770 * @static15857 * @static
15771 * @memberOf _15858 * @memberOf _
15772 * @since 4.0.015859 * @since 4.0.0

@@ -15793,6 +15880,10 @@

15793 * Creates a function that checks if **any** of the `predicates` return15880 * Creates a function that checks if **any** of the `predicates` return
15794 * truthy when invoked with the arguments it receives.15881 * truthy when invoked with the arguments it receives.
15795 *15882 *
15883 * Following shorthands are possible for providing predicates.
15884 * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
15885 * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
15886 *
15796 * @static15887 * @static
15797 * @memberOf _15888 * @memberOf _
15798 * @since 4.0.015889 * @since 4.0.0

@@ -15812,6 +15903,9 @@

15812 *15903 *
15813 * func(NaN);15904 * func(NaN);
15814 * // => false15905 * // => false
15906 *
15907 * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
15908 * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
15815 */15909 */
15816 var overSome = createOver(arraySome);15910 var overSome = createOver(arraySome);
15817 15911

@@ -16102,7 +16196,7 @@

16102 if (isArray(value)) {16196 if (isArray(value)) {
16103 return arrayMap(value, toKey);16197 return arrayMap(value, toKey);
16104 }16198 }
16105 return isSymbol(value) ? [value] : copyArray(stringToPath(value));16199 return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
16106 }16200 }
16107 16201
16108 /**16202 /**

@@ -16823,14 +16917,13 @@

16823 // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.16917 // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
16824 arrayEach(['drop', 'take'], function(methodName, index) {16918 arrayEach(['drop', 'take'], function(methodName, index) {
16825 LazyWrapper.prototype[methodName] = function(n) {16919 LazyWrapper.prototype[methodName] = function(n) {
16826 var filtered = this.__filtered__;
16827 if (filtered && !index) {
16828 return new LazyWrapper(this);
16829 }
16830 n = n === undefined ? 1 : nativeMax(toInteger(n), 0);16920 n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
16831 16921
16832 var result = this.clone();
16833 if (filtered) {16922 var result = (this.__filtered__ && !index)
16923 ? new LazyWrapper(this)
16924 : this.clone();
16925
16926 if (result.__filtered__) {
16834 result.__takeCount__ = nativeMin(n, result.__takeCount__);16927 result.__takeCount__ = nativeMin(n, result.__takeCount__);
16835 } else {16928 } else {
16836 result.__views__.push({16929 result.__views__.push({

@@ -16999,10 +17092,11 @@

16999 baseForOwn(LazyWrapper.prototype, function(func, methodName) {17092 baseForOwn(LazyWrapper.prototype, function(func, methodName) {
17000 var lodashFunc = lodash[methodName];17093 var lodashFunc = lodash[methodName];
17001 if (lodashFunc) {17094 if (lodashFunc) {
17002 var key = (lodashFunc.name + ''),
17003 names = realNames[key] || (realNames[key] = []);
17004
17005 names.push({ 'name': methodName, 'func': lodashFunc });17095 var key = lodashFunc.name + '';
17096 if (!hasOwnProperty.call(realNames, key)) {
17097 realNames[key] = [];
17098 }
17099 realNames[key].push({ 'name': methodName, 'func': lodashFunc });
17006 }17100 }
17007 });17101 });
17008 17102

_cloneSet.js +++0---22

@@ -1,22 +0,0 @@

1var addSetEntry = require('./_addSetEntry'),
2 arrayReduce = require('./_arrayReduce'),
3 setToArray = require('./_setToArray');
4
5/** Used to compose bitmasks for cloning. */
6var CLONE_DEEP_FLAG = 1;
7
8/**
9 * Creates a clone of `set`.
10 *
11 * @private
12 * @param {Object} set The set to clone.
13 * @param {Function} cloneFunc The function to clone values.
14 * @param {boolean} [isDeep] Specify a deep clone.
15 * @returns {Object} Returns the cloned set.
16 */
17function cloneSet(set, isDeep, cloneFunc) {
18 var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
19 return arrayReduce(array, addSetEntry, new set.constructor);
20}
21
22module.exports = cloneSet;

_cloneMap.js +++0---22

@@ -1,22 +0,0 @@

1var addMapEntry = require('./_addMapEntry'),
2 arrayReduce = require('./_arrayReduce'),
3 mapToArray = require('./_mapToArray');
4
5/** Used to compose bitmasks for cloning. */
6var CLONE_DEEP_FLAG = 1;
7
8/**
9 * Creates a clone of `map`.
10 *
11 * @private
12 * @param {Object} map The map to clone.
13 * @param {Function} cloneFunc The function to clone values.
14 * @param {boolean} [isDeep] Specify a deep clone.
15 * @returns {Object} Returns the cloned map.
16 */
17function cloneMap(map, isDeep, cloneFunc) {
18 var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
19 return arrayReduce(array, addMapEntry, new map.constructor);
20}
21
22module.exports = cloneMap;

_castPath.js +++9---3

@@ -1,15 +1,21 @@

1var isArray = require('./isArray'),1var isArray = require('./isArray'),
2 stringToPath = require('./_stringToPath');2 isKey = require('./_isKey'),
3 stringToPath = require('./_stringToPath'),
4 toString = require('./toString');
3 5
4/**6/**
5 * Casts `value` to a path array if it's not one.7 * Casts `value` to a path array if it's not one.
6 *8 *
7 * @private9 * @private
8 * @param {*} value The value to inspect.10 * @param {*} value The value to inspect.
11 * @param {Object} [object] The object to query keys on.
9 * @returns {Array} Returns the cast property path array.12 * @returns {Array} Returns the cast property path array.
10 */13 */
11function castPath(value) {
12 return isArray(value) ? value : stringToPath(value);14function castPath(value, object) {
15 if (isArray(value)) {
16 return value;
17 }
18 return isKey(value, object) ? [value] : stringToPath(toString(value));
13}19}
14 20
15module.exports = castPath;21module.exports = castPath;

omit.js +++13---3

@@ -1,6 +1,9 @@

1var baseClone = require('./_baseClone'),1var arrayMap = require('./_arrayMap'),
2 baseClone = require('./_baseClone'),
2 baseUnset = require('./_baseUnset'),3 baseUnset = require('./_baseUnset'),
4 castPath = require('./_castPath'),
3 copyObject = require('./_copyObject'),5 copyObject = require('./_copyObject'),
6 customOmitClone = require('./_customOmitClone'),
4 flatRest = require('./_flatRest'),7 flatRest = require('./_flatRest'),
5 getAllKeysIn = require('./_getAllKeysIn');8 getAllKeysIn = require('./_getAllKeysIn');
6 9

@@ -34,9 +37,16 @@

34 if (object == null) {37 if (object == null) {
35 return result;38 return result;
36 }39 }
40 var isDeep = false;
41 paths = arrayMap(paths, function(path) {
42 path = castPath(path, object);
43 isDeep || (isDeep = path.length > 1);
44 return path;
45 });
37 copyObject(object, getAllKeysIn(object), result);46 copyObject(object, getAllKeysIn(object), result);
38 result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG);
39 47 if (isDeep) {
48 result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
49 }
40 var length = paths.length;50 var length = paths.length;
41 while (length--) {51 while (length--) {
42 baseUnset(result, paths[length]);52 baseUnset(result, paths[length]);

_baseUnset.js +++2---11

@@ -1,15 +1,8 @@

1var castPath = require('./_castPath'),1var castPath = require('./_castPath'),
2 isKey = require('./_isKey'),
3 last = require('./last'),2 last = require('./last'),
4 parent = require('./_parent'),3 parent = require('./_parent'),
5 toKey = require('./_toKey');4 toKey = require('./_toKey');
6 5
7/** Used for built-in method references. */
8var objectProto = Object.prototype;
9
10/** Used to check objects for own properties. */
11var hasOwnProperty = objectProto.hasOwnProperty;
12
13/**6/**
14 * The base implementation of `_.unset`.7 * The base implementation of `_.unset`.
15 *8 *

@@ -19,11 +12,9 @@

19 * @returns {boolean} Returns `true` if the property is deleted, else `false`.12 * @returns {boolean} Returns `true` if the property is deleted, else `false`.
20 */13 */
21function baseUnset(object, path) {14function baseUnset(object, path) {
22 path = isKey(path, object) ? [path] : castPath(path);15 path = castPath(path, object);
23 object = parent(object, path);16 object = parent(object, path);
24
25 var key = toKey(last(path));
26 return !(object != null && hasOwnProperty.call(object, key)) || delete object[key];17 return object == null || delete object[toKey(last(path))];
27}18}
28 19
29module.exports = baseUnset;20module.exports = baseUnset;

pick.js +++3---5

@@ -1,7 +1,5 @@

1var arrayMap = require('./_arrayMap'),
2 basePick = require('./_basePick'),
3 flatRest = require('./_flatRest'),
4 toKey = require('./_toKey');1var basePick = require('./_basePick'),
2 flatRest = require('./_flatRest');
5 3
6/**4/**
7 * Creates an object composed of the picked `object` properties.5 * Creates an object composed of the picked `object` properties.

@@ -21,7 +19,7 @@

21 * // => { 'a': 1, 'c': 3 }19 * // => { 'a': 1, 'c': 3 }
22 */20 */
23var pick = flatRest(function(object, paths) {21var pick = flatRest(function(object, paths) {
24 return object == null ? {} : basePick(object, arrayMap(paths, toKey));22 return object == null ? {} : basePick(object, paths);
25});23});
26 24
27module.exports = pick;25module.exports = pick;

pickBy.js +++12---2

@@ -1,4 +1,5 @@

1var baseIteratee = require('./_baseIteratee'),1var arrayMap = require('./_arrayMap'),
2 baseIteratee = require('./_baseIteratee'),
2 basePickBy = require('./_basePickBy'),3 basePickBy = require('./_basePickBy'),
3 getAllKeysIn = require('./_getAllKeysIn');4 getAllKeysIn = require('./_getAllKeysIn');
4 5

@@ -21,7 +22,16 @@

21 * // => { 'a': 1, 'c': 3 }22 * // => { 'a': 1, 'c': 3 }
22 */23 */
23function pickBy(object, predicate) {24function pickBy(object, predicate) {
24 return object == null ? {} : basePickBy(object, getAllKeysIn(object), baseIteratee(predicate));25 if (object == null) {
26 return {};
27 }
28 var props = arrayMap(getAllKeysIn(object), function(prop) {
29 return [prop];
30 });
31 predicate = baseIteratee(predicate);
32 return basePickBy(object, props, function(value, path) {
33 return predicate(value, path[0]);
34 });
25}35}
26 36
27module.exports = pickBy;37module.exports = pickBy;

_baseSet.js +++1---2

@@ -1,7 +1,6 @@

1var assignValue = require('./_assignValue'),1var assignValue = require('./_assignValue'),
2 castPath = require('./_castPath'),2 castPath = require('./_castPath'),
3 isIndex = require('./_isIndex'),3 isIndex = require('./_isIndex'),
4 isKey = require('./_isKey'),
5 isObject = require('./isObject'),4 isObject = require('./isObject'),
6 toKey = require('./_toKey');5 toKey = require('./_toKey');
7 6

@@ -19,7 +18,7 @@

19 if (!isObject(object)) {18 if (!isObject(object)) {
20 return object;19 return object;
21 }20 }
22 path = isKey(path, object) ? [path] : castPath(path);21 path = castPath(path, object);
23 22
24 var index = -1,23 var index = -1,
25 length = path.length,24 length = path.length,

_basePullAt.js +++4---17

@@ -1,9 +1,5 @@

1var castPath = require('./_castPath'),
2 isIndex = require('./_isIndex'),
3 isKey = require('./_isKey'),
4 last = require('./last'),
5 parent = require('./_parent'),
6 toKey = require('./_toKey');1var baseUnset = require('./_baseUnset'),
2 isIndex = require('./_isIndex');
7 3
8/** Used for built-in method references. */4/** Used for built-in method references. */
9var arrayProto = Array.prototype;5var arrayProto = Array.prototype;

@@ -30,18 +26,9 @@

30 var previous = index;26 var previous = index;
31 if (isIndex(index)) {27 if (isIndex(index)) {
32 splice.call(array, index, 1);28 splice.call(array, index, 1);
29 } else {
30 baseUnset(array, index);
33 }31 }
34 else if (!isKey(index, array)) {
35 var path = castPath(index),
36 object = parent(array, path);
37
38 if (object != null) {
39 delete object[toKey(last(path))];
40 }
41 }
42 else {
43 delete array[toKey(index)];
44 }
45 }32 }
46 }33 }
47 return array;34 return array;

_basePickBy.js +++3---2

@@ -1,5 +1,6 @@

1var baseGet = require('./_baseGet'),1var baseGet = require('./_baseGet'),
2 baseSet = require('./_baseSet');2 baseSet = require('./_baseSet'),
3 castPath = require('./_castPath');
3 4
4/**5/**
5 * The base implementation of `_.pickBy` without support for iteratee shorthands.6 * The base implementation of `_.pickBy` without support for iteratee shorthands.

@@ -20,7 +21,7 @@

20 value = baseGet(object, path);21 value = baseGet(object, path);
21 22
22 if (predicate(value, path)) {23 if (predicate(value, path)) {
23 baseSet(result, path, value);24 baseSet(result, castPath(path, object), value);
24 }25 }
25 }26 }
26 return result;27 return result;

_basePick.js +++0---1

@@ -11,7 +11,6 @@

11 * @returns {Object} Returns the new object.11 * @returns {Object} Returns the new object.
12 */12 */
13function basePick(object, paths) {13function basePick(object, paths) {
14 object = Object(object);
15 return basePickBy(object, paths, function(value, path) {14 return basePickBy(object, paths, function(value, path) {
16 return hasIn(object, path);15 return hasIn(object, path);
17 });16 });

result.js +++2---3

@@ -1,6 +1,5 @@

1var castPath = require('./_castPath'),1var castPath = require('./_castPath'),
2 isFunction = require('./isFunction'),2 isFunction = require('./isFunction'),
3 isKey = require('./_isKey'),
4 toKey = require('./_toKey');3 toKey = require('./_toKey');
5 4
6/**5/**

@@ -33,15 +32,15 @@

33 * // => 'default'32 * // => 'default'
34 */33 */
35function result(object, path, defaultValue) {34function result(object, path, defaultValue) {
36 path = isKey(path, object) ? [path] : castPath(path);35 path = castPath(path, object);
37 36
38 var index = -1,37 var index = -1,
39 length = path.length;38 length = path.length;
40 39
41 // Ensure the loop is entered when path is empty.40 // Ensure the loop is entered when path is empty.
42 if (!length) {41 if (!length) {
42 length = 1;
43 object = undefined;43 object = undefined;
44 length = 1;
45 }44 }
46 while (++index < length) {45 while (++index < length) {
47 var value = object == null ? undefined : object[toKey(path[index])];46 var value = object == null ? undefined : object[toKey(path[index])];

_baseMergeDeep.js +++4---3

@@ -11,6 +11,7 @@

11 isObject = require('./isObject'),11 isObject = require('./isObject'),
12 isPlainObject = require('./isPlainObject'),12 isPlainObject = require('./isPlainObject'),
13 isTypedArray = require('./isTypedArray'),13 isTypedArray = require('./isTypedArray'),
14 safeGet = require('./_safeGet'),
14 toPlainObject = require('./toPlainObject');15 toPlainObject = require('./toPlainObject');
15 16
16/**17/**

@@ -29,8 +30,8 @@

29 * counterparts.30 * counterparts.
30 */31 */
31function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {32function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
32 var objValue = object[key],
33 srcValue = source[key],33 var objValue = safeGet(object, key),
34 srcValue = safeGet(source, key),
34 stacked = stack.get(srcValue);35 stacked = stack.get(srcValue);
35 36
36 if (stacked) {37 if (stacked) {

@@ -73,7 +74,7 @@

73 if (isArguments(objValue)) {74 if (isArguments(objValue)) {
74 newValue = toPlainObject(objValue);75 newValue = toPlainObject(objValue);
75 }76 }
76 else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {77 else if (!isObject(objValue) || isFunction(objValue)) {
77 newValue = initCloneObject(srcValue);78 newValue = initCloneObject(srcValue);
78 }79 }
79 }80 }

_baseMerge.js +++4---3

@@ -3,7 +3,8 @@

3 baseFor = require('./_baseFor'),3 baseFor = require('./_baseFor'),
4 baseMergeDeep = require('./_baseMergeDeep'),4 baseMergeDeep = require('./_baseMergeDeep'),
5 isObject = require('./isObject'),5 isObject = require('./isObject'),
6 keysIn = require('./keysIn');6 keysIn = require('./keysIn'),
7 safeGet = require('./_safeGet');
7 8
8/**9/**
9 * The base implementation of `_.merge` without support for multiple sources.10 * The base implementation of `_.merge` without support for multiple sources.

@@ -21,13 +22,13 @@

21 return;22 return;
22 }23 }
23 baseFor(source, function(srcValue, key) {24 baseFor(source, function(srcValue, key) {
25 stack || (stack = new Stack);
24 if (isObject(srcValue)) {26 if (isObject(srcValue)) {
25 stack || (stack = new Stack);
26 baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);27 baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
27 }28 }
28 else {29 else {
29 var newValue = customizer30 var newValue = customizer
30 ? customizer(object[key], srcValue, (key + ''), object, source, stack)31 ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
31 : undefined;32 : undefined;
32 33
33 if (newValue === undefined) {34 if (newValue === undefined) {

_baseIsEqualDeep.js +++5---10

@@ -38,17 +38,12 @@

38function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {38function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
39 var objIsArr = isArray(object),39 var objIsArr = isArray(object),
40 othIsArr = isArray(other),40 othIsArr = isArray(other),
41 objTag = arrayTag,
42 othTag = arrayTag;41 objTag = objIsArr ? arrayTag : getTag(object),
42 othTag = othIsArr ? arrayTag : getTag(other);
43 43
44 if (!objIsArr) {
45 objTag = getTag(object);
46 objTag = objTag == argsTag ? objectTag : objTag;
47 }
48 if (!othIsArr) {
49 othTag = getTag(other);
50 othTag = othTag == argsTag ? objectTag : othTag;
51 }44 objTag = objTag == argsTag ? objectTag : objTag;
45 othTag = othTag == argsTag ? objectTag : othTag;
46
52 var objIsObj = objTag == objectTag,47 var objIsObj = objTag == objectTag,
53 othIsObj = othTag == objectTag,48 othIsObj = othTag == objectTag,
54 isSameTag = objTag == othTag;49 isSameTag = objTag == othTag;

_baseIsEqual.js +++1---2

@@ -1,5 +1,4 @@

1var baseIsEqualDeep = require('./_baseIsEqualDeep'),1var baseIsEqualDeep = require('./_baseIsEqualDeep'),
2 isObject = require('./isObject'),
3 isObjectLike = require('./isObjectLike');2 isObjectLike = require('./isObjectLike');
4 3
5/**4/**

@@ -20,7 +19,7 @@

20 if (value === other) {19 if (value === other) {
21 return true;20 return true;
22 }21 }
23 if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {22 if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
24 return value !== value && other !== other;23 return value !== value && other !== other;
25 }24 }
26 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);25 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);

spread.js +++1---5

@@ -48,18 +48,14 @@

48 if (typeof func != 'function') {48 if (typeof func != 'function') {
49 throw new TypeError(FUNC_ERROR_TEXT);49 throw new TypeError(FUNC_ERROR_TEXT);
50 }50 }
51 start = start === undefined ? 0 : nativeMax(toInteger(start), 0);51 start = start == null ? 0 : nativeMax(toInteger(start), 0);
52 return baseRest(function(args) {52 return baseRest(function(args) {
53 var array = args[start],53 var array = args[start],
54 lastIndex = args.length - 1,
55 otherArgs = castSlice(args, 0, start);54 otherArgs = castSlice(args, 0, start);
56 55
57 if (array) {56 if (array) {
58 arrayPush(otherArgs, array);57 arrayPush(otherArgs, array);
59 }58 }
60 if (start != lastIndex) {
61 arrayPush(otherArgs, castSlice(args, start + 1));
62 }
63 return apply(func, this, otherArgs);59 return apply(func, this, otherArgs);
64 });60 });
65}61}

_baseInvoke.js +++3---7

@@ -1,6 +1,5 @@

1var apply = require('./_apply'),1var apply = require('./_apply'),
2 castPath = require('./_castPath'),2 castPath = require('./_castPath'),
3 isKey = require('./_isKey'),
4 last = require('./last'),3 last = require('./last'),
5 parent = require('./_parent'),4 parent = require('./_parent'),
6 toKey = require('./_toKey');5 toKey = require('./_toKey');

@@ -16,12 +15,9 @@

16 * @returns {*} Returns the result of the invoked method.15 * @returns {*} Returns the result of the invoked method.
17 */16 */
18function baseInvoke(object, path, args) {17function baseInvoke(object, path, args) {
19 if (!isKey(path, object)) {
20 path = castPath(path);
21 object = parent(object, path);
22 path = last(path);
23 }
24 var func = object == null ? object : object[toKey(path)];18 path = castPath(path, object);
19 object = parent(object, path);
20 var func = object == null ? object : object[toKey(last(path))];
25 return func == null ? undefined : apply(func, object, args);21 return func == null ? undefined : apply(func, object, args);
26}22}
27 23

startsWith.js +++4---1

@@ -28,7 +28,10 @@

28 */28 */
29function startsWith(string, target, position) {29function startsWith(string, target, position) {
30 string = toString(string);30 string = toString(string);
31 position = baseClamp(toInteger(position), 0, string.length);31 position = position == null
32 ? 0
33 : baseClamp(toInteger(position), 0, string.length);
34
32 target = baseToString(target);35 target = baseToString(target);
33 return string.slice(position, position + target.length) == target;36 return string.slice(position, position + target.length) == target;
34}37}

_baseGetTag.js +++1---2

@@ -20,8 +20,7 @@

20 if (value == null) {20 if (value == null) {
21 return value === undefined ? undefinedTag : nullTag;21 return value === undefined ? undefinedTag : nullTag;
22 }22 }
23 value = Object(value);
24 return (symToStringTag && symToStringTag in value)23 return (symToStringTag && symToStringTag in Object(value))
25 ? getRawTag(value)24 ? getRawTag(value)
26 : objectToString(value);25 : objectToString(value);
27}26}

_baseGet.js +++1---2

@@ -1,5 +1,4 @@

1var castPath = require('./_castPath'),1var castPath = require('./_castPath'),
2 isKey = require('./_isKey'),
3 toKey = require('./_toKey');2 toKey = require('./_toKey');
4 3
5/**4/**

@@ -11,7 +10,7 @@

11 * @returns {*} Returns the resolved value.10 * @returns {*} Returns the resolved value.
12 */11 */
13function baseGet(object, path) {12function baseGet(object, path) {
14 path = isKey(path, object) ? [path] : castPath(path);13 path = castPath(path, object);
15 14
16 var index = 0,15 var index = 0,
17 length = path.length;16 length = path.length;

takeWhile.js +++1---1

@@ -17,7 +17,7 @@

17 *17 *
18 * var users = [18 * var users = [
19 * { 'user': 'barney', 'active': false },19 * { 'user': 'barney', 'active': false },
20 * { 'user': 'fred', 'active': false},20 * { 'user': 'fred', 'active': false },
21 * { 'user': 'pebbles', 'active': true }21 * { 'user': 'pebbles', 'active': true }
22 * ];22 * ];
23 *23 *

template.js +++21---6

@@ -1,7 +1,7 @@

1var assignInDefaults = require('./_assignInDefaults'),
2 assignInWith = require('./assignInWith'),1var assignInWith = require('./assignInWith'),
3 attempt = require('./attempt'),2 attempt = require('./attempt'),
4 baseValues = require('./_baseValues'),3 baseValues = require('./_baseValues'),
4 customDefaultsAssignIn = require('./_customDefaultsAssignIn'),
5 escapeStringChar = require('./_escapeStringChar'),5 escapeStringChar = require('./_escapeStringChar'),
6 isError = require('./isError'),6 isError = require('./isError'),
7 isIterateeCall = require('./_isIterateeCall'),7 isIterateeCall = require('./_isIterateeCall'),

@@ -27,6 +27,12 @@

27/** Used to match unescaped characters in compiled string literals. */27/** Used to match unescaped characters in compiled string literals. */
28var reUnescapedString = /['\n\r\u2028\u2029\\]/g;28var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
29 29
30/** Used for built-in method references. */
31var objectProto = Object.prototype;
32
33/** Used to check objects for own properties. */
34var hasOwnProperty = objectProto.hasOwnProperty;
35
30/**36/**
31 * Creates a compiled template function that can interpolate data properties37 * Creates a compiled template function that can interpolate data properties
32 * in "interpolate" delimiters, HTML-escape interpolated data properties in38 * in "interpolate" delimiters, HTML-escape interpolated data properties in

@@ -141,9 +147,9 @@

141 options = undefined;147 options = undefined;
142 }148 }
143 string = toString(string);149 string = toString(string);
144 options = assignInWith({}, options, settings, assignInDefaults);150 options = assignInWith({}, options, settings, customDefaultsAssignIn);
145 151
146 var imports = assignInWith({}, options.imports, settings.imports, assignInDefaults),152 var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
147 importsKeys = keys(imports),153 importsKeys = keys(imports),
148 importsValues = baseValues(imports, importsKeys);154 importsValues = baseValues(imports, importsKeys);
149 155

@@ -162,7 +168,14 @@

162 , 'g');168 , 'g');
163 169
164 // Use a sourceURL for easier debugging.170 // Use a sourceURL for easier debugging.
165 var sourceURL = 'sourceURL' in options ? '//# sourceURL=' + options.sourceURL + '\n' : '';171 // The sourceURL gets injected into the source that's eval-ed, so be careful
172 // with lookup (in case of e.g. prototype pollution), and strip newlines if any.
173 // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection.
174 var sourceURL = hasOwnProperty.call(options, 'sourceURL')
175 ? ('//# sourceURL=' +
176 (options.sourceURL + '').replace(/[\r\n]/g, ' ') +
177 '\n')
178 : '';
166 179
167 string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {180 string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
168 interpolateValue || (interpolateValue = esTemplateValue);181 interpolateValue || (interpolateValue = esTemplateValue);

@@ -193,7 +206,9 @@

193 206
194 // If `variable` is not specified wrap a with-statement around the generated207 // If `variable` is not specified wrap a with-statement around the generated
195 // code to add the data object to the top of the scope chain.208 // code to add the data object to the top of the scope chain.
196 var variable = options.variable;209 // Like with sourceURL, we take care to not check the option's prototype,
210 // as this configuration is a code injection vector.
211 var variable = hasOwnProperty.call(options, 'variable') && options.variable;
197 if (!variable) {212 if (!variable) {
198 source = 'with (obj) {\n' + source + '\n}\n';213 source = 'with (obj) {\n' + source + '\n}\n';
199 }214 }

templateSettings.js +++2---2

@@ -5,8 +5,8 @@

5 5
6/**6/**
7 * By default, the template delimiters used by lodash are like those in7 * By default, the template delimiters used by lodash are like those in
8 * embedded Ruby (ERB). Change the following template settings to use
9 * alternative delimiters.8 * embedded Ruby (ERB) as well as ES2015 template strings. Change the
9 * following template settings to use alternative delimiters.
10 *10 *
11 * @static11 * @static
12 * @memberOf _12 * @memberOf _

_baseClone.js +++13---1

@@ -15,7 +15,9 @@

15 initCloneObject = require('./_initCloneObject'),15 initCloneObject = require('./_initCloneObject'),
16 isArray = require('./isArray'),16 isArray = require('./isArray'),
17 isBuffer = require('./isBuffer'),17 isBuffer = require('./isBuffer'),
18 isMap = require('./isMap'),
18 isObject = require('./isObject'),19 isObject = require('./isObject'),
20 isSet = require('./isSet'),
19 keys = require('./keys');21 keys = require('./keys');
20 22
21/** Used to compose bitmasks for cloning. */23/** Used to compose bitmasks for cloning. */

@@ -123,7 +125,7 @@

123 if (!cloneableTags[tag]) {125 if (!cloneableTags[tag]) {
124 return object ? value : {};126 return object ? value : {};
125 }127 }
126 result = initCloneByTag(value, tag, baseClone, isDeep);128 result = initCloneByTag(value, tag, isDeep);
127 }129 }
128 }130 }
129 // Check for circular references and return its corresponding clone.131 // Check for circular references and return its corresponding clone.

@@ -134,6 +136,16 @@

134 }136 }
135 stack.set(value, result);137 stack.set(value, result);
136 138
139 if (isSet(value)) {
140 value.forEach(function(subValue) {
141 result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
142 });
143 } else if (isMap(value)) {
144 value.forEach(function(subValue, key) {
145 result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
146 });
147 }
148
137 var keysFunc = isFull149 var keysFunc = isFull
138 ? (isFlat ? getAllKeysIn : getAllKeys)150 ? (isFlat ? getAllKeysIn : getAllKeys)
139 : (isFlat ? keysIn : keys);151 : (isFlat ? keysIn : keys);

toPath.js +++3---2

@@ -3,7 +3,8 @@

3 isArray = require('./isArray'),3 isArray = require('./isArray'),
4 isSymbol = require('./isSymbol'),4 isSymbol = require('./isSymbol'),
5 stringToPath = require('./_stringToPath'),5 stringToPath = require('./_stringToPath'),
6 toKey = require('./_toKey');6 toKey = require('./_toKey'),
7 toString = require('./toString');
7 8
8/**9/**
9 * Converts `value` to a property path array.10 * Converts `value` to a property path array.

@@ -26,7 +27,7 @@

26 if (isArray(value)) {27 if (isArray(value)) {
27 return arrayMap(value, toKey);28 return arrayMap(value, toKey);
28 }29 }
29 return isSymbol(value) ? [value] : copyArray(stringToPath(value));30 return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
30}31}
31 32
32module.exports = toPath;33module.exports = toPath;

toSafeInteger.js +++3---1

@@ -29,7 +29,9 @@

29 * // => 329 * // => 3
30 */30 */
31function toSafeInteger(value) {31function toSafeInteger(value) {
32 return baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);32 return value
33 ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
34 : (value === 0 ? value : 0);
33}35}
34 36
35module.exports = toSafeInteger;37module.exports = toSafeInteger;

_assignInDefaults.js +++0---27

@@ -1,27 +0,0 @@

1var eq = require('./eq');
2
3/** Used for built-in method references. */
4var objectProto = Object.prototype;
5
6/** Used to check objects for own properties. */
7var hasOwnProperty = objectProto.hasOwnProperty;
8
9/**
10 * Used by `_.defaults` to customize its `_.assignIn` use.
11 *
12 * @private
13 * @param {*} objValue The destination value.
14 * @param {*} srcValue The source value.
15 * @param {string} key The key of the property to assign.
16 * @param {Object} object The parent object of `objValue`.
17 * @returns {*} Returns the value to assign.
18 */
19function assignInDefaults(objValue, srcValue, key, object) {
20 if (objValue === undefined ||
21 (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
22 return srcValue;
23 }
24 return objValue;
25}
26
27module.exports = assignInDefaults;

_addSetEntry.js +++0---15

@@ -1,15 +0,0 @@

1/**
2 * Adds `value` to `set`.
3 *
4 * @private
5 * @param {Object} set The set to modify.
6 * @param {*} value The value to add.
7 * @returns {Object} Returns `set`.
8 */
9function addSetEntry(set, value) {
10 // Don't return `set.add` because it's not chainable in IE 11.
11 set.add(value);
12 return set;
13}
14
15module.exports = addSetEntry;

_addMapEntry.js +++0---15

@@ -1,15 +0,0 @@

1/**
2 * Adds the key-value `pair` to `map`.
3 *
4 * @private
5 * @param {Object} map The map to modify.
6 * @param {Array} pair The key-value pair to add.
7 * @returns {Object} Returns `map`.
8 */
9function addMapEntry(map, pair) {
10 // Don't return `map.set` because it's not chainable in IE 11.
11 map.set(pair[0], pair[1]);
12 return map;
13}
14
15module.exports = addMapEntry;

wrapperLodash.js +++3---3

@@ -29,9 +29,9 @@

29 * Shortcut fusion is an optimization to merge iteratee calls; this avoids29 * Shortcut fusion is an optimization to merge iteratee calls; this avoids
30 * the creation of intermediate arrays and can greatly reduce the number of30 * the creation of intermediate arrays and can greatly reduce the number of
31 * iteratee executions. Sections of a chain sequence qualify for shortcut31 * iteratee executions. Sections of a chain sequence qualify for shortcut
32 * fusion if the section is applied to an array of at least `200` elements
33 * and any iteratees accept only one argument. The heuristic for whether a
34 * section qualifies for shortcut fusion is subject to change.32 * fusion if the section is applied to an array and iteratees accept only
33 * one argument. The heuristic for whether a section qualifies for shortcut
34 * fusion is subject to change.
35 *35 *
36 * Chaining is supported in custom builds as long as the `_#value` method is36 * Chaining is supported in custom builds as long as the `_#value` method is
37 * directly or indirectly included in the build.37 * directly or indirectly included in the build.

fp/_util.js +++2---1

@@ -5,11 +5,12 @@

5 'curry': require('../curry'),5 'curry': require('../curry'),
6 'forEach': require('../_arrayEach'),6 'forEach': require('../_arrayEach'),
7 'isArray': require('../isArray'),7 'isArray': require('../isArray'),
8 'isError': require('../isError'),
8 'isFunction': require('../isFunction'),9 'isFunction': require('../isFunction'),
10 'isWeakMap': require('../isWeakMap'),
9 'iteratee': require('../iteratee'),11 'iteratee': require('../iteratee'),
10 'keys': require('../_baseKeys'),12 'keys': require('../_baseKeys'),
11 'rearg': require('../rearg'),13 'rearg': require('../rearg'),
12 'spread': require('../spread'),
13 'toInteger': require('../toInteger'),14 'toInteger': require('../toInteger'),
14 'toPath': require('../toPath')15 'toPath': require('../toPath')
15};16};

fp/_mapping.js +++2---11

@@ -167,7 +167,8 @@

167 167
168/** Used to map method names to iteratee rearg configs. */168/** Used to map method names to iteratee rearg configs. */
169exports.iterateeRearg = {169exports.iterateeRearg = {
170 'mapKeys': [1]170 'mapKeys': [1],
171 'reduceRight': [1, 0]
171};172};
172 173
173/** Used to map method names to rearg configs. */174/** Used to map method names to rearg configs. */

@@ -260,16 +261,6 @@

260 }261 }
261};262};
262 263
263/** Used to track methods with placeholder support */
264exports.placeholder = {
265 'bind': true,
266 'bindKey': true,
267 'curry': true,
268 'curryRight': true,
269 'partial': true,
270 'partialRight': true
271};
272
273/** Used to map real names to their aliases. */264/** Used to map real names to their aliases. */
274exports.realToAlias = (function() {265exports.realToAlias = (function() {
275 var hasOwnProperty = Object.prototype.hasOwnProperty,266 var hasOwnProperty = Object.prototype.hasOwnProperty,

fp/_baseConvert.js +++54---21

@@ -1,6 +1,9 @@

1var mapping = require('./_mapping'),1var mapping = require('./_mapping'),
2 fallbackHolder = require('./placeholder');2 fallbackHolder = require('./placeholder');
3 3
4/** Built-in value reference. */
5var push = Array.prototype.push;
6
4/**7/**
5 * Creates a function, with an arity of `n`, that invokes `func` with the8 * Creates a function, with an arity of `n`, that invokes `func` with the
6 * arguments it receives.9 * arguments it receives.

@@ -62,6 +65,37 @@

62}65}
63 66
64/**67/**
68 * A specialized version of `_.spread` which flattens the spread array into
69 * the arguments of the invoked `func`.
70 *
71 * @private
72 * @param {Function} func The function to spread arguments over.
73 * @param {number} start The start position of the spread.
74 * @returns {Function} Returns the new function.
75 */
76function flatSpread(func, start) {
77 return function() {
78 var length = arguments.length,
79 lastIndex = length - 1,
80 args = Array(length);
81
82 while (length--) {
83 args[length] = arguments[length];
84 }
85 var array = args[start],
86 otherArgs = args.slice(0, start);
87
88 if (array) {
89 push.apply(otherArgs, array);
90 }
91 if (start != lastIndex) {
92 push.apply(otherArgs, args.slice(start + 1));
93 }
94 return func.apply(this, otherArgs);
95 };
96}
97
98/**
65 * Creates a function that wraps `func` and uses `cloner` to clone the first99 * Creates a function that wraps `func` and uses `cloner` to clone the first
66 * argument it receives.100 * argument it receives.
67 *101 *

@@ -102,8 +136,7 @@

102 * @returns {Function|Object} Returns the converted function or object.136 * @returns {Function|Object} Returns the converted function or object.
103 */137 */
104function baseConvert(util, name, func, options) {138function baseConvert(util, name, func, options) {
105 var setPlaceholder,
106 isLib = typeof name == 'function',139 var isLib = typeof name == 'function',
107 isObj = name === Object(name);140 isObj = name === Object(name);
108 141
109 if (isObj) {142 if (isObj) {

@@ -124,10 +157,10 @@

124 'rearg': 'rearg' in options ? options.rearg : true157 'rearg': 'rearg' in options ? options.rearg : true
125 };158 };
126 159
127 var forceCurry = ('curry' in options) && options.curry,160 var defaultHolder = isLib ? func : fallbackHolder,
161 forceCurry = ('curry' in options) && options.curry,
128 forceFixed = ('fixed' in options) && options.fixed,162 forceFixed = ('fixed' in options) && options.fixed,
129 forceRearg = ('rearg' in options) && options.rearg,163 forceRearg = ('rearg' in options) && options.rearg,
130 placeholder = isLib ? func : fallbackHolder,
131 pristine = isLib ? func.runInContext() : undefined;164 pristine = isLib ? func.runInContext() : undefined;
132 165
133 var helpers = isLib ? func : {166 var helpers = isLib ? func : {

@@ -137,11 +170,12 @@

137 'curry': util.curry,170 'curry': util.curry,
138 'forEach': util.forEach,171 'forEach': util.forEach,
139 'isArray': util.isArray,172 'isArray': util.isArray,
173 'isError': util.isError,
140 'isFunction': util.isFunction,174 'isFunction': util.isFunction,
175 'isWeakMap': util.isWeakMap,
141 'iteratee': util.iteratee,176 'iteratee': util.iteratee,
142 'keys': util.keys,177 'keys': util.keys,
143 'rearg': util.rearg,178 'rearg': util.rearg,
144 'spread': util.spread,
145 'toInteger': util.toInteger,179 'toInteger': util.toInteger,
146 'toPath': util.toPath180 'toPath': util.toPath
147 };181 };

@@ -152,10 +186,11 @@

152 curry = helpers.curry,186 curry = helpers.curry,
153 each = helpers.forEach,187 each = helpers.forEach,
154 isArray = helpers.isArray,188 isArray = helpers.isArray,
189 isError = helpers.isError,
155 isFunction = helpers.isFunction,190 isFunction = helpers.isFunction,
191 isWeakMap = helpers.isWeakMap,
156 keys = helpers.keys,192 keys = helpers.keys,
157 rearg = helpers.rearg,193 rearg = helpers.rearg,
158 spread = helpers.spread,
159 toInteger = helpers.toInteger,194 toInteger = helpers.toInteger,
160 toPath = helpers.toPath;195 toPath = helpers.toPath;
161 196

@@ -282,7 +317,7 @@

282 var data = mapping.methodSpread[name],317 var data = mapping.methodSpread[name],
283 start = data && data.start;318 start = data && data.start;
284 319
285 return start === undefined ? ary(func, n) : spread(func, start);320 return start === undefined ? ary(func, n) : flatSpread(func, start);
286 }321 }
287 return func;322 return func;
288 }323 }

@@ -323,8 +358,9 @@

323 var key = path[index],358 var key = path[index],
324 value = nested[key];359 value = nested[key];
325 360
326 if (value != null) {
327 nested[path[index]] = clone(index == lastIndex ? value : Object(value));361 if (value != null &&
362 !(isFunction(value) || isError(value) || isWeakMap(value))) {
363 nested[key] = clone(index == lastIndex ? value : Object(value));
328 }364 }
329 nested = nested[key];365 nested = nested[key];
330 }366 }

@@ -429,7 +465,7 @@

429 * @param {Function} func The function to wrap.465 * @param {Function} func The function to wrap.
430 * @returns {Function} Returns the converted function.466 * @returns {Function} Returns the converted function.
431 */467 */
432 function wrap(name, func) {468 function wrap(name, func, placeholder) {
433 var result,469 var result,
434 realName = mapping.aliasToReal[name] || name,470 realName = mapping.aliasToReal[name] || name,
435 wrapped = func,471 wrapped = func,

@@ -452,8 +488,8 @@

452 each(aryMethodKeys, function(aryKey) {488 each(aryMethodKeys, function(aryKey) {
453 each(mapping.aryMethod[aryKey], function(otherName) {489 each(mapping.aryMethod[aryKey], function(otherName) {
454 if (realName == otherName) {490 if (realName == otherName) {
455 var spreadData = mapping.methodSpread[realName],
456 afterRearg = spreadData && spreadData.afterRearg;491 var data = mapping.methodSpread[realName],
492 afterRearg = data && data.afterRearg;
457 493
458 result = afterRearg494 result = afterRearg
459 ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)495 ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)

@@ -474,17 +510,15 @@

474 };510 };
475 }511 }
476 result.convert = createConverter(realName, func);512 result.convert = createConverter(realName, func);
477 if (mapping.placeholder[realName]) {
478 setPlaceholder = true;
479 result.placeholder = func.placeholder = placeholder;
480 }513 result.placeholder = func.placeholder = placeholder;
514
481 return result;515 return result;
482 }516 }
483 517
484 /*--------------------------------------------------------------------------*/518 /*--------------------------------------------------------------------------*/
485 519
486 if (!isObj) {520 if (!isObj) {
487 return wrap(name, func);521 return wrap(name, func, defaultHolder);
488 }522 }
489 var _ = func;523 var _ = func;
490 524

@@ -494,7 +528,7 @@

494 each(mapping.aryMethod[aryKey], function(key) {528 each(mapping.aryMethod[aryKey], function(key) {
495 var func = _[mapping.remap[key] || key];529 var func = _[mapping.remap[key] || key];
496 if (func) {530 if (func) {
497 pairs.push([key, wrap(key, func)]);531 pairs.push([key, wrap(key, func, _)]);
498 }532 }
499 });533 });
500 });534 });

@@ -520,9 +554,8 @@

520 });554 });
521 555
522 _.convert = convertLib;556 _.convert