just-extend
Advanced tools
Comparing version 1.1.27 to 2.1.0
@@ -48,3 +48,3 @@ module.exports = extend; | ||
var value = extender[key]; | ||
if (deep && value && (typeof value == 'object' || typeof value == 'function')) { | ||
if (deep && isCloneable(value)) { | ||
var base = Array.isArray(value) ? [] : {}; | ||
@@ -59,1 +59,5 @@ result[key] = extend(true, result[key] || base, value); | ||
} | ||
function isCloneable(obj) { | ||
return Array.isArray(obj) || {}.toString.call(obj) == '[object Object]'; | ||
} |
{ | ||
"name": "just-extend", | ||
"version": "1.1.27", | ||
"version": "2.1.0", | ||
"description": "extend an object", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
4212
4
54