lodash.mergewith
Advanced tools
Comparing version 4.6.1 to 4.6.2
48
index.js
/** | ||
* Lodash (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="npm" -o ./` | ||
* Copyright JS Foundation and other contributors <https://js.foundation/> | ||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/> | ||
* Released under MIT license <https://lodash.com/license> | ||
@@ -107,2 +107,10 @@ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
try { | ||
// Use `util.types` for Node.js 10+. | ||
var types = freeModule && freeModule.require && freeModule.require('util').types; | ||
if (types) { | ||
return types; | ||
} | ||
// Legacy `process.binding('util')` for Node.js < 10. | ||
return freeProcess && freeProcess.binding && freeProcess.binding('util'); | ||
@@ -193,16 +201,2 @@ } catch (e) {} | ||
/** | ||
* Gets the value at `key`, unless `key` is "__proto__". | ||
* | ||
* @private | ||
* @param {Object} object The object to query. | ||
* @param {string} key The key of the property to get. | ||
* @returns {*} Returns the property value. | ||
*/ | ||
function safeGet(object, key) { | ||
return key == '__proto__' | ||
? undefined | ||
: object[key]; | ||
} | ||
/** Used for built-in method references. */ | ||
@@ -929,4 +923,4 @@ var arrayProto = Array.prototype, | ||
baseFor(source, function(srcValue, key) { | ||
stack || (stack = new Stack); | ||
if (isObject(srcValue)) { | ||
stack || (stack = new Stack); | ||
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); | ||
@@ -1007,3 +1001,3 @@ } | ||
} | ||
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { | ||
else if (!isObject(objValue) || isFunction(objValue)) { | ||
newValue = initCloneObject(srcValue); | ||
@@ -1421,2 +1415,22 @@ } | ||
/** | ||
* Gets the value at `key`, unless `key` is "__proto__" or "constructor". | ||
* | ||
* @private | ||
* @param {Object} object The object to query. | ||
* @param {string} key The key of the property to get. | ||
* @returns {*} Returns the property value. | ||
*/ | ||
function safeGet(object, key) { | ||
if (key === 'constructor' && typeof object[key] === 'function') { | ||
return; | ||
} | ||
if (key == '__proto__') { | ||
return; | ||
} | ||
return object[key]; | ||
} | ||
/** | ||
* Sets the `toString` method of `func` to return `string`. | ||
@@ -1423,0 +1437,0 @@ * |
{ | ||
"name": "lodash.mergewith", | ||
"version": "4.6.1", | ||
"version": "4.6.2", | ||
"description": "The Lodash method `_.mergeWith` exported as a module.", | ||
@@ -9,6 +9,6 @@ "homepage": "https://lodash.com/", | ||
"keywords": "lodash-modularized, mergewith", | ||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", | ||
"author": "John-David Dalton <john.david.dalton@gmail.com>", | ||
"contributors": [ | ||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", | ||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)" | ||
"John-David Dalton <john.david.dalton@gmail.com>", | ||
"Mathias Bynens <mathias@qiwi.be>" | ||
], | ||
@@ -15,0 +15,0 @@ "repository": "lodash/lodash", |
@@ -1,2 +0,2 @@ | ||
# lodash.mergewith v4.6.1 | ||
# lodash.mergewith v4.6.2 | ||
@@ -18,2 +18,2 @@ The [Lodash](https://lodash.com/) method `_.mergeWith` exported as a [Node.js](https://nodejs.org/) module. | ||
See the [documentation](https://lodash.com/docs#mergeWith) or [package source](https://github.com/lodash/lodash/blob/4.6.1-npm-packages/lodash.mergewith) for more details. | ||
See the [documentation](https://lodash.com/docs#mergeWith) or [package source](https://github.com/lodash/lodash/blob/4.6.2-npm-packages/lodash.mergewith) for more details. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54199
1819