aboutsummaryrefslogtreecommitdiff
path: root/node_modules/lodash.merge
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
commitbbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch)
treec58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/lodash.merge
parent003fb34971cf63466184351b4db5f7c67df4f444 (diff)
downloadwallet-core-bbff7403fbf46f9ad92240ac213df8d30ef31b64.tar.xz
update packages
Diffstat (limited to 'node_modules/lodash.merge')
-rw-r--r--node_modules/lodash.merge/LICENSE2
-rw-r--r--node_modules/lodash.merge/README.md6
-rw-r--r--node_modules/lodash.merge/index.js1004
-rw-r--r--node_modules/lodash.merge/package.json5
4 files changed, 386 insertions, 631 deletions
diff --git a/node_modules/lodash.merge/LICENSE b/node_modules/lodash.merge/LICENSE
index e0c69d560..c6f2f6145 100644
--- a/node_modules/lodash.merge/LICENSE
+++ b/node_modules/lodash.merge/LICENSE
@@ -1,4 +1,4 @@
-Copyright jQuery Foundation and other contributors <https://jquery.org/>
+Copyright JS Foundation and other contributors <https://js.foundation/>
Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
diff --git a/node_modules/lodash.merge/README.md b/node_modules/lodash.merge/README.md
index d8a0ea4c7..2e0ca9b3e 100644
--- a/node_modules/lodash.merge/README.md
+++ b/node_modules/lodash.merge/README.md
@@ -1,6 +1,6 @@
-# lodash.merge v4.6.0
+# lodash.merge v4.6.1
-The [lodash](https://lodash.com/) method `_.merge` exported as a [Node.js](https://nodejs.org/) module.
+The [Lodash](https://lodash.com/) method `_.merge` exported as a [Node.js](https://nodejs.org/) module.
## Installation
@@ -15,4 +15,4 @@ In Node.js:
var merge = require('lodash.merge');
```
-See the [documentation](https://lodash.com/docs#merge) or [package source](https://github.com/lodash/lodash/blob/4.6.0-npm-packages/lodash.merge) for more details.
+See the [documentation](https://lodash.com/docs#merge) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.merge) for more details.
diff --git a/node_modules/lodash.merge/index.js b/node_modules/lodash.merge/index.js
index e7e710576..4f7b5d3a8 100644
--- a/node_modules/lodash.merge/index.js
+++ b/node_modules/lodash.merge/index.js
@@ -1,7 +1,7 @@
/**
- * lodash (Custom Build) <https://lodash.com/>
+ * Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
@@ -13,12 +13,17 @@ var LARGE_ARRAY_SIZE = 200;
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
+/** Used to detect hot functions by number of calls within a span of milliseconds. */
+var HOT_COUNT = 800,
+ HOT_SPAN = 16;
+
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
+ asyncTag = '[object AsyncFunction]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
@@ -26,12 +31,13 @@ var argsTag = '[object Arguments]',
genTag = '[object GeneratorFunction]',
mapTag = '[object Map]',
numberTag = '[object Number]',
+ nullTag = '[object Null]',
objectTag = '[object Object]',
- promiseTag = '[object Promise]',
+ proxyTag = '[object Proxy]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
- symbolTag = '[object Symbol]',
+ undefinedTag = '[object Undefined]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
@@ -52,9 +58,6 @@ var arrayBufferTag = '[object ArrayBuffer]',
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
-/** Used to match `RegExp` flags from their coerced string values. */
-var reFlags = /\w*$/;
-
/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
@@ -77,22 +80,6 @@ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;
-/** Used to identify `toStringTag` values supported by `_.clone`. */
-var cloneableTags = {};
-cloneableTags[argsTag] = cloneableTags[arrayTag] =
-cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
-cloneableTags[boolTag] = cloneableTags[dateTag] =
-cloneableTags[float32Tag] = cloneableTags[float64Tag] =
-cloneableTags[int8Tag] = cloneableTags[int16Tag] =
-cloneableTags[int32Tag] = cloneableTags[mapTag] =
-cloneableTags[numberTag] = cloneableTags[objectTag] =
-cloneableTags[regexpTag] = cloneableTags[setTag] =
-cloneableTags[stringTag] = cloneableTags[symbolTag] =
-cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
-cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
-cloneableTags[errorTag] = cloneableTags[funcTag] =
-cloneableTags[weakMapTag] = false;
-
/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
@@ -117,7 +104,7 @@ var freeProcess = moduleExports && freeGlobal.process;
/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
try {
- return freeProcess && freeProcess.binding('util');
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
} catch (e) {}
}());
@@ -125,34 +112,6 @@ var nodeUtil = (function() {
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
/**
- * Adds the key-value `pair` to `map`.
- *
- * @private
- * @param {Object} map The map to modify.
- * @param {Array} pair The key-value pair to add.
- * @returns {Object} Returns `map`.
- */
-function addMapEntry(map, pair) {
- // Don't return `map.set` because it's not chainable in IE 11.
- map.set(pair[0], pair[1]);
- return map;
-}
-
-/**
- * Adds `value` to `set`.
- *
- * @private
- * @param {Object} set The set to modify.
- * @param {*} value The value to add.
- * @returns {Object} Returns `set`.
- */
-function addSetEntry(set, value) {
- // Don't return `set.add` because it's not chainable in IE 11.
- set.add(value);
- return set;
-}
-
-/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
@@ -173,71 +132,6 @@ function apply(func, thisArg, args) {
}
/**
- * A specialized version of `_.forEach` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
-function arrayEach(array, iteratee) {
- var index = -1,
- length = array ? array.length : 0;
-
- while (++index < length) {
- if (iteratee(array[index], index, array) === false) {
- break;
- }
- }
- return array;
-}
-
-/**
- * Appends the elements of `values` to `array`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to append.
- * @returns {Array} Returns `array`.
- */
-function arrayPush(array, values) {
- var index = -1,
- length = values.length,
- offset = array.length;
-
- while (++index < length) {
- array[offset + index] = values[index];
- }
- return array;
-}
-
-/**
- * A specialized version of `_.reduce` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initAccum] Specify using the first element of `array` as
- * the initial value.
- * @returns {*} Returns the accumulated value.
- */
-function arrayReduce(array, iteratee, accumulator, initAccum) {
- var index = -1,
- length = array ? array.length : 0;
-
- if (initAccum && length) {
- accumulator = array[++index];
- }
- while (++index < length) {
- accumulator = iteratee(accumulator, array[index], index, array);
- }
- return accumulator;
-}
-
-/**
* The base implementation of `_.times` without support for iteratee shorthands
* or max array length checks.
*
@@ -282,42 +176,6 @@ function getValue(object, key) {
}
/**
- * Checks if `value` is a host object in IE < 9.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
- */
-function isHostObject(value) {
- // Many host objects are `Object` objects that can coerce to strings
- // despite having improperly defined `toString` methods.
- var result = false;
- if (value != null && typeof value.toString != 'function') {
- try {
- result = !!(value + '');
- } catch (e) {}
- }
- return result;
-}
-
-/**
- * Converts `map` to its key-value pairs.
- *
- * @private
- * @param {Object} map The map to convert.
- * @returns {Array} Returns the key-value pairs.
- */
-function mapToArray(map) {
- var index = -1,
- result = Array(map.size);
-
- map.forEach(function(value, key) {
- result[++index] = [key, value];
- });
- return result;
-}
-
-/**
* Creates a unary function that invokes `func` with its argument transformed.
*
* @private
@@ -332,20 +190,17 @@ function overArg(func, transform) {
}
/**
- * Converts `set` to an array of its values.
+ * Gets the value at `key`, unless `key` is "__proto__".
*
* @private
- * @param {Object} set The set to convert.
- * @returns {Array} Returns the values.
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
*/
-function setToArray(set) {
- var index = -1,
- result = Array(set.size);
-
- set.forEach(function(value) {
- result[++index] = value;
- });
- return result;
+function safeGet(object, key) {
+ return key == '__proto__'
+ ? undefined
+ : object[key];
}
/** Used for built-in method references. */
@@ -356,27 +211,27 @@ var arrayProto = Array.prototype,
/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];
-/** Used to detect methods masquerading as native. */
-var maskSrcKey = (function() {
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
- return uid ? ('Symbol(src)_1.' + uid) : '';
-}());
-
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
-/** Used to infer the `Object` constructor. */
-var objectCtorString = funcToString.call(Object);
+/** Used to detect methods masquerading as native. */
+var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+}());
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
-var objectToString = objectProto.toString;
+var nativeObjectToString = objectProto.toString;
+
+/** Used to infer the `Object` constructor. */
+var objectCtorString = funcToString.call(Object);
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
@@ -388,35 +243,53 @@ var reIsNative = RegExp('^' +
var Buffer = moduleExports ? root.Buffer : undefined,
Symbol = root.Symbol,
Uint8Array = root.Uint8Array,
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
getPrototype = overArg(Object.getPrototypeOf, Object),
objectCreate = Object.create,
propertyIsEnumerable = objectProto.propertyIsEnumerable,
- splice = arrayProto.splice;
+ splice = arrayProto.splice,
+ symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+var defineProperty = (function() {
+ try {
+ var func = getNative(Object, 'defineProperty');
+ func({}, '', {});
+ return func;
+ } catch (e) {}
+}());
/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeGetSymbols = Object.getOwnPropertySymbols,
- nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
- nativeKeys = overArg(Object.keys, Object),
- nativeMax = Math.max;
+var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
+ nativeMax = Math.max,
+ nativeNow = Date.now;
/* Built-in method references that are verified to be native. */
-var DataView = getNative(root, 'DataView'),
- Map = getNative(root, 'Map'),
- Promise = getNative(root, 'Promise'),
- Set = getNative(root, 'Set'),
- WeakMap = getNative(root, 'WeakMap'),
+var Map = getNative(root, 'Map'),
nativeCreate = getNative(Object, 'create');
-/** Used to detect maps, sets, and weakmaps. */
-var dataViewCtorString = toSource(DataView),
- mapCtorString = toSource(Map),
- promiseCtorString = toSource(Promise),
- setCtorString = toSource(Set),
- weakMapCtorString = toSource(WeakMap);
-
-/** Used to convert symbols to primitives and strings. */
-var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
+/**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+}());
/**
* Creates a hash object.
@@ -427,7 +300,7 @@ var symbolProto = Symbol ? Symbol.prototype : undefined,
*/
function Hash(entries) {
var index = -1,
- length = entries ? entries.length : 0;
+ length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
@@ -445,6 +318,7 @@ function Hash(entries) {
*/
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ this.size = 0;
}
/**
@@ -458,7 +332,9 @@ function hashClear() {
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
- return this.has(key) && delete this.__data__[key];
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
}
/**
@@ -490,7 +366,7 @@ function hashGet(key) {
*/
function hashHas(key) {
var data = this.__data__;
- return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
}
/**
@@ -505,6 +381,7 @@ function hashHas(key) {
*/
function hashSet(key, value) {
var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
return this;
}
@@ -525,7 +402,7 @@ Hash.prototype.set = hashSet;
*/
function ListCache(entries) {
var index = -1,
- length = entries ? entries.length : 0;
+ length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
@@ -543,6 +420,7 @@ function ListCache(entries) {
*/
function listCacheClear() {
this.__data__ = [];
+ this.size = 0;
}
/**
@@ -567,6 +445,7 @@ function listCacheDelete(key) {
} else {
splice.call(data, index, 1);
}
+ --this.size;
return true;
}
@@ -614,6 +493,7 @@ function listCacheSet(key, value) {
index = assocIndexOf(data, key);
if (index < 0) {
+ ++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
@@ -637,7 +517,7 @@ ListCache.prototype.set = listCacheSet;
*/
function MapCache(entries) {
var index = -1,
- length = entries ? entries.length : 0;
+ length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
@@ -654,6 +534,7 @@ function MapCache(entries) {
* @memberOf MapCache
*/
function mapCacheClear() {
+ this.size = 0;
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
@@ -671,7 +552,9 @@ function mapCacheClear() {
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
- return getMapData(this, key)['delete'](key);
+ var result = getMapData(this, key)['delete'](key);
+ this.size -= result ? 1 : 0;
+ return result;
}
/**
@@ -711,7 +594,11 @@ function mapCacheHas(key) {
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
- getMapData(this, key).set(key, value);
+ var data = getMapData(this, key),
+ size = data.size;
+
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
return this;
}
@@ -730,7 +617,8 @@ MapCache.prototype.set = mapCacheSet;
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
- this.__data__ = new ListCache(entries);
+ var data = this.__data__ = new ListCache(entries);
+ this.size = data.size;
}
/**
@@ -742,6 +630,7 @@ function Stack(entries) {
*/
function stackClear() {
this.__data__ = new ListCache;
+ this.size = 0;
}
/**
@@ -754,7 +643,11 @@ function stackClear() {
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function stackDelete(key) {
- return this.__data__['delete'](key);
+ var data = this.__data__,
+ result = data['delete'](key);
+
+ this.size = data.size;
+ return result;
}
/**
@@ -794,16 +687,18 @@ function stackHas(key) {
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
- var cache = this.__data__;
- if (cache instanceof ListCache) {
- var pairs = cache.__data__;
+ var data = this.__data__;
+ if (data instanceof ListCache) {
+ var pairs = data.__data__;
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
pairs.push([key, value]);
+ this.size = ++data.size;
return this;
}
- cache = this.__data__ = new MapCache(pairs);
+ data = this.__data__ = new MapCache(pairs);
}
- cache.set(key, value);
+ data.set(key, value);
+ this.size = data.size;
return this;
}
@@ -823,18 +718,26 @@ Stack.prototype.set = stackSet;
* @returns {Array} Returns the array of property names.
*/
function arrayLikeKeys(value, inherited) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- // Safari 9 makes `arguments.length` enumerable in strict mode.
- var result = (isArray(value) || isArguments(value))
- ? baseTimes(value.length, String)
- : [];
-
- var length = result.length,
- skipIndexes = !!length;
+ var isArr = isArray(value),
+ isArg = !isArr && isArguments(value),
+ isBuff = !isArr && !isArg && isBuffer(value),
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+ skipIndexes = isArr || isArg || isBuff || isType,
+ result = skipIndexes ? baseTimes(value.length, String) : [],
+ length = result.length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) &&
- !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
+ !(skipIndexes && (
+ // Safari 9 has enumerable `arguments.length` in strict mode.
+ key == 'length' ||
+ // Node.js 0.10 has enumerable non-index properties on buffers.
+ (isBuff && (key == 'offset' || key == 'parent')) ||
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+ // Skip index properties.
+ isIndex(key, length)
+ ))) {
result.push(key);
}
}
@@ -852,8 +755,8 @@ function arrayLikeKeys(value, inherited) {
*/
function assignMergeValue(object, key, value) {
if ((value !== undefined && !eq(object[key], value)) ||
- (typeof key == 'number' && value === undefined && !(key in object))) {
- object[key] = value;
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
}
}
@@ -871,7 +774,7 @@ function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
(value === undefined && !(key in object))) {
- object[key] = value;
+ baseAssignValue(object, key, value);
}
}
@@ -894,130 +797,65 @@ function assocIndexOf(array, key) {
}
/**
- * The base implementation of `_.assign` without support for multiple sources
- * or `customizer` functions.
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
*
* @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
*/
-function baseAssign(object, source) {
- return object && copyObject(source, keys(source), object);
-}
-
-/**
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
- * traversed objects.
- *
- * @private
- * @param {*} value The value to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @param {boolean} [isFull] Specify a clone including symbols.
- * @param {Function} [customizer] The function to customize cloning.
- * @param {string} [key] The key of `value`.
- * @param {Object} [object] The parent object of `value`.
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
- * @returns {*} Returns the cloned value.
- */
-function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
- var result;
- if (customizer) {
- result = object ? customizer(value, key, object, stack) : customizer(value);
- }
- if (result !== undefined) {
- return result;
- }
- if (!isObject(value)) {
- return value;
- }
- var isArr = isArray(value);
- if (isArr) {
- result = initCloneArray(value);
- if (!isDeep) {
- return copyArray(value, result);
- }
+function baseAssignValue(object, key, value) {
+ if (key == '__proto__' && defineProperty) {
+ defineProperty(object, key, {
+ 'configurable': true,
+ 'enumerable': true,
+ 'value': value,
+ 'writable': true
+ });
} else {
- var tag = getTag(value),
- isFunc = tag == funcTag || tag == genTag;
-
- if (isBuffer(value)) {
- return cloneBuffer(value, isDeep);
- }
- if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
- if (isHostObject(value)) {
- return object ? value : {};
- }
- result = initCloneObject(isFunc ? {} : value);
- if (!isDeep) {
- return copySymbols(value, baseAssign(result, value));
- }
- } else {
- if (!cloneableTags[tag]) {
- return object ? value : {};
- }
- result = initCloneByTag(value, tag, baseClone, isDeep);
- }
- }
- // Check for circular references and return its corresponding clone.
- stack || (stack = new Stack);
- var stacked = stack.get(value);
- if (stacked) {
- return stacked;
- }
- stack.set(value, result);
-
- if (!isArr) {
- var props = isFull ? getAllKeys(value) : keys(value);
+ object[key] = value;
}
- arrayEach(props || value, function(subValue, key) {
- if (props) {
- key = subValue;
- subValue = value[key];
- }
- // Recursively populate clone (susceptible to call stack limits).
- assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
- });
- return result;
}
/**
- * The base implementation of `_.create` without support for assigning
- * properties to the created object.
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
*
* @private
- * @param {Object} prototype The object to inherit from.
- * @returns {Object} Returns the new object.
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
*/
-function baseCreate(proto) {
- return isObject(proto) ? objectCreate(proto) : {};
-}
+var baseFor = createBaseFor();
/**
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
- * symbols of `object`.
+ * The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
- * @param {Object} object The object to query.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
- * @returns {Array} Returns the array of property names and symbols.
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
*/
-function baseGetAllKeys(object, keysFunc, symbolsFunc) {
- var result = keysFunc(object);
- return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+function baseGetTag(value) {
+ if (value == null) {
+ return value === undefined ? undefinedTag : nullTag;
+ }
+ return (symToStringTag && symToStringTag in Object(value))
+ ? getRawTag(value)
+ : objectToString(value);
}
/**
- * The base implementation of `getTag`.
+ * The base implementation of `_.isArguments`.
*
* @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
*/
-function baseGetTag(value) {
- return objectToString.call(value);
+function baseIsArguments(value) {
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
}
/**
@@ -1032,7 +870,7 @@ function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
- var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
@@ -1045,27 +883,7 @@ function baseIsNative(value) {
*/
function baseIsTypedArray(value) {
return isObjectLike(value) &&
- isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
-}
-
-/**
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
-function baseKeys(object) {
- if (!isPrototype(object)) {
- return nativeKeys(object);
- }
- var result = [];
- for (var key in Object(object)) {
- if (hasOwnProperty.call(object, key) && key != 'constructor') {
- result.push(key);
- }
- }
- return result;
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
/**
@@ -1105,21 +923,14 @@ function baseMerge(object, source, srcIndex, customizer, stack) {
if (object === source) {
return;
}
- if (!(isArray(source) || isTypedArray(source))) {
- var props = baseKeysIn(source);
- }
- arrayEach(props || source, function(srcValue, key) {
- if (props) {
- key = srcValue;
- srcValue = source[key];
- }
+ baseFor(source, function(srcValue, key) {
if (isObject(srcValue)) {
stack || (stack = new Stack);
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
}
else {
var newValue = customizer
- ? customizer(object[key], srcValue, (key + ''), object, source, stack)
+ ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
: undefined;
if (newValue === undefined) {
@@ -1127,7 +938,7 @@ function baseMerge(object, source, srcIndex, customizer, stack) {
}
assignMergeValue(object, key, newValue);
}
- });
+ }, keysIn);
}
/**
@@ -1146,8 +957,8 @@ function baseMerge(object, source, srcIndex, customizer, stack) {
* counterparts.
*/
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
- var objValue = object[key],
- srcValue = source[key],
+ var objValue = safeGet(object, key),
+ srcValue = safeGet(source, key),
stacked = stack.get(srcValue);
if (stacked) {
@@ -1161,29 +972,37 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
var isCommon = newValue === undefined;
if (isCommon) {
+ var isArr = isArray(srcValue),
+ isBuff = !isArr && isBuffer(srcValue),
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);
+
newValue = srcValue;
- if (isArray(srcValue) || isTypedArray(srcValue)) {
+ if (isArr || isBuff || isTyped) {
if (isArray(objValue)) {
newValue = objValue;
}
else if (isArrayLikeObject(objValue)) {
newValue = copyArray(objValue);
}
- else {
+ else if (isBuff) {
+ isCommon = false;
+ newValue = cloneBuffer(srcValue, true);
+ }
+ else if (isTyped) {
isCommon = false;
- newValue = baseClone(srcValue, true);
+ newValue = cloneTypedArray(srcValue, true);
+ }
+ else {
+ newValue = [];
}
}
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ newValue = objValue;
if (isArguments(objValue)) {
newValue = toPlainObject(objValue);
}
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
- isCommon = false;
- newValue = baseClone(srcValue, true);
- }
- else {
- newValue = objValue;
+ newValue = initCloneObject(srcValue);
}
}
else {
@@ -1208,27 +1027,27 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
* @returns {Function} Returns the new function.
*/
function baseRest(func, start) {
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- array = Array(length);
-
- while (++index < length) {
- array[index] = args[start + index];
- }
- index = -1;
- var otherArgs = Array(start + 1);
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = array;
- return apply(func, this, otherArgs);
- };
+ return setToString(overRest(func, start, identity), func + '');
}
/**
+ * The base implementation of `setToString` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+var baseSetToString = !defineProperty ? identity : function(func, string) {
+ return defineProperty(func, 'toString', {
+ 'configurable': true,
+ 'enumerable': false,
+ 'value': constant(string),
+ 'writable': true
+ });
+};
+
+/**
* Creates a clone of `buffer`.
*
* @private
@@ -1240,7 +1059,9 @@ function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
- var result = new buffer.constructor(buffer.length);
+ var length = buffer.length,
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
+
buffer.copy(result);
return result;
}
@@ -1259,71 +1080,6 @@ function cloneArrayBuffer(arrayBuffer) {
}
/**
- * Creates a clone of `dataView`.
- *
- * @private
- * @param {Object} dataView The data view to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned data view.
- */
-function cloneDataView(dataView, isDeep) {
- var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
-}
-
-/**
- * Creates a clone of `map`.
- *
- * @private
- * @param {Object} map The map to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned map.
- */
-function cloneMap(map, isDeep, cloneFunc) {
- var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
- return arrayReduce(array, addMapEntry, new map.constructor);
-}
-
-/**
- * Creates a clone of `regexp`.
- *
- * @private
- * @param {Object} regexp The regexp to clone.
- * @returns {Object} Returns the cloned regexp.
- */
-function cloneRegExp(regexp) {
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
- result.lastIndex = regexp.lastIndex;
- return result;
-}
-
-/**
- * Creates a clone of `set`.
- *
- * @private
- * @param {Object} set The set to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned set.
- */
-function cloneSet(set, isDeep, cloneFunc) {
- var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
- return arrayReduce(array, addSetEntry, new set.constructor);
-}
-
-/**
- * Creates a clone of the `symbol` object.
- *
- * @private
- * @param {Object} symbol The symbol object to clone.
- * @returns {Object} Returns the cloned symbol object.
- */
-function cloneSymbol(symbol) {
- return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
-}
-
-/**
* Creates a clone of `typedArray`.
*
* @private
@@ -1366,6 +1122,7 @@ function copyArray(source, array) {
* @returns {Object} Returns `object`.
*/
function copyObject(source, props, object, customizer) {
+ var isNew = !object;
object || (object = {});
var index = -1,
@@ -1378,24 +1135,19 @@ function copyObject(source, props, object, customizer) {
? customizer(object[key], source[key], key, object, source)
: undefined;
- assignValue(object, key, newValue === undefined ? source[key] : newValue);
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
}
return object;
}
/**
- * Copies own symbol properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy symbols from.
- * @param {Object} [object={}] The object to copy symbols to.
- * @returns {Object} Returns `object`.
- */
-function copySymbols(source, object) {
- return copyObject(source, getSymbols(source), object);
-}
-
-/**
* Creates a function like `_.assign`.
*
* @private
@@ -1429,14 +1181,27 @@ function createAssigner(assigner) {
}
/**
- * Creates an array of own enumerable property names and symbols of `object`.
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
*
* @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names and symbols.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
*/
-function getAllKeys(object) {
- return baseGetAllKeys(object, keys, getSymbols);
+function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
}
/**
@@ -1468,63 +1233,28 @@ function getNative(object, key) {
}
/**
- * Creates an array of the own enumerable symbol properties of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of symbols.
- */
-var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
-
-/**
- * Gets the `toStringTag` of `value`.
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
*
* @private
* @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
+ * @returns {string} Returns the raw `toStringTag`.
*/
-var getTag = baseGetTag;
-
-// Fallback for data views, maps, sets, and weak maps in IE 11,
-// for data views in Edge < 14, and promises in Node.js.
-if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
- (Map && getTag(new Map) != mapTag) ||
- (Promise && getTag(Promise.resolve()) != promiseTag) ||
- (Set && getTag(new Set) != setTag) ||
- (WeakMap && getTag(new WeakMap) != weakMapTag)) {
- getTag = function(value) {
- var result = objectToString.call(value),
- Ctor = result == objectTag ? value.constructor : undefined,
- ctorString = Ctor ? toSource(Ctor) : undefined;
-
- if (ctorString) {
- switch (ctorString) {
- case dataViewCtorString: return dataViewTag;
- case mapCtorString: return mapTag;
- case promiseCtorString: return promiseTag;
- case setCtorString: return setTag;
- case weakMapCtorString: return weakMapTag;
- }
- }
- return result;
- };
-}
+function getRawTag(value) {
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
+ tag = value[symToStringTag];
-/**
- * Initializes an array clone.
- *
- * @private
- * @param {Array} array The array to clone.
- * @returns {Array} Returns the initialized clone.
- */
-function initCloneArray(array) {
- var length = array.length,
- result = array.constructor(length);
+ try {
+ value[symToStringTag] = undefined;
+ var unmasked = true;
+ } catch (e) {}
- // Add properties assigned by `RegExp#exec`.
- if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
- result.index = array.index;
- result.input = array.input;
+ var result = nativeObjectToString.call(value);
+ if (unmasked) {
+ if (isOwn) {
+ value[symToStringTag] = tag;
+ } else {
+ delete value[symToStringTag];
+ }
}
return result;
}
@@ -1543,55 +1273,6 @@ function initCloneObject(object) {
}
/**
- * Initializes an object clone based on its `toStringTag`.
- *
- * **Note:** This function only supports cloning values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to clone.
- * @param {string} tag The `toStringTag` of the object to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the initialized clone.
- */
-function initCloneByTag(object, tag, cloneFunc, isDeep) {
- var Ctor = object.constructor;
- switch (tag) {
- case arrayBufferTag:
- return cloneArrayBuffer(object);
-
- case boolTag:
- case dateTag:
- return new Ctor(+object);
-
- case dataViewTag:
- return cloneDataView(object, isDeep);
-
- case float32Tag: case float64Tag:
- case int8Tag: case int16Tag: case int32Tag:
- case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
- return cloneTypedArray(object, isDeep);
-
- case mapTag:
- return cloneMap(object, isDeep, cloneFunc);
-
- case numberTag:
- case stringTag:
- return new Ctor(object);
-
- case regexpTag:
- return cloneRegExp(object);
-
- case setTag:
- return cloneSet(object, isDeep, cloneFunc);
-
- case symbolTag:
- return cloneSymbol(object);
- }
-}
-
-/**
* Checks if `value` is a valid array-like index.
*
* @private
@@ -1600,10 +1281,13 @@ function initCloneByTag(object, tag, cloneFunc, isDeep) {
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
+ var type = typeof value;
length = length == null ? MAX_SAFE_INTEGER : length;
+
return !!length &&
- (typeof value == 'number' || reIsUint.test(value)) &&
- (value > -1 && value % 1 == 0 && value < length);
+ (type == 'number' ||
+ (type != 'symbol' && reIsUint.test(value))) &&
+ (value > -1 && value % 1 == 0 && value < length);
}
/**
@@ -1689,10 +1373,90 @@ function nativeKeysIn(object) {
}
/**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+function objectToString(value) {
+ return nativeObjectToString.call(value);
+}
+
+/**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return apply(func, this, otherArgs);
+ };
+}
+
+/**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+var setToString = shortOut(baseSetToString);
+
+/**
+ * Creates a function that'll short out and invoke `identity` instead
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
+ * milliseconds.
+ *
+ * @private
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new shortable function.
+ */
+function shortOut(func) {
+ var count = 0,
+ lastCalled = 0;
+
+ return function() {
+ var stamp = nativeNow(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return arguments[0];
+ }
+ } else {
+ count = 0;
+ }
+ return func.apply(undefined, arguments);
+ };
+}
+
+/**
* Converts `func` to its source code.
*
* @private
- * @param {Function} func The function to process.
+ * @param {Function} func The function to convert.
* @returns {string} Returns the source code.
*/
function toSource(func) {
@@ -1761,11 +1525,10 @@ function eq(value, other) {
* _.isArguments([1, 2, 3]);
* // => false
*/
-function isArguments(value) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
- (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
-}
+var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+};
/**
* Checks if `value` is classified as an `Array` object.
@@ -1887,10 +1650,13 @@ var isBuffer = nativeIsBuffer || stubFalse;
* // => false
*/
function isFunction(value) {
+ if (!isObject(value)) {
+ return false;
+ }
// The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8-9 which returns 'object' for typed array and other constructors.
- var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag;
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
/**
@@ -1951,7 +1717,7 @@ function isLength(value) {
*/
function isObject(value) {
var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
+ return value != null && (type == 'object' || type == 'function');
}
/**
@@ -1979,7 +1745,7 @@ function isObject(value) {
* // => false
*/
function isObjectLike(value) {
- return !!value && typeof value == 'object';
+ return value != null && typeof value == 'object';
}
/**
@@ -2011,8 +1777,7 @@ function isObjectLike(value) {
* // => true
*/
function isPlainObject(value) {
- if (!isObjectLike(value) ||
- objectToString.call(value) != objectTag || isHostObject(value)) {
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
return false;
}
var proto = getPrototype(value);
@@ -2020,8 +1785,8 @@ function isPlainObject(value) {
return true;
}
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
- return (typeof Ctor == 'function' &&
- Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
+ funcToString.call(Ctor) == objectCtorString;
}
/**
@@ -2072,38 +1837,6 @@ function toPlainObject(value) {
}
/**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
-function keys(object) {
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
-}
-
-/**
* Creates an array of the own and inherited enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects.
@@ -2166,25 +1899,48 @@ var merge = createAssigner(function(object, source, srcIndex) {
});
/**
- * This method returns a new empty array.
+ * Creates a function that returns `value`.
*
* @static
* @memberOf _
- * @since 4.13.0
+ * @since 2.4.0
* @category Util
- * @returns {Array} Returns the new empty array.
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new constant function.
* @example
*
- * var arrays = _.times(2, _.stubArray);
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
*
- * console.log(arrays);
- * // => [[], []]
+ * console.log(objects);
+ * // => [{ 'a': 1 }, { 'a': 1 }]
*
- * console.log(arrays[0] === arrays[1]);
- * // => false
+ * console.log(objects[0] === objects[1]);
+ * // => true
+ */
+function constant(value) {
+ return function() {
+ return value;
+ };
+}
+
+/**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
*/
-function stubArray() {
- return [];
+function identity(value) {
+ return value;
}
/**
diff --git a/node_modules/lodash.merge/package.json b/node_modules/lodash.merge/package.json
index 68aa76cf1..3b37b63a2 100644
--- a/node_modules/lodash.merge/package.json
+++ b/node_modules/lodash.merge/package.json
@@ -1,7 +1,7 @@
{
"name": "lodash.merge",
- "version": "4.6.0",
- "description": "The lodash method `_.merge` exported as a module.",
+ "version": "4.6.1",
+ "description": "The Lodash method `_.merge` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
@@ -9,7 +9,6 @@
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
- "Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",