underscore-plus
Advanced tools
Comparing version 1.6.2 to 1.6.3
(function() { | ||
var isEqual, macModifierKeyMap, nonMacModifierKeyMap, plus, shiftKeyMap, splitKeyPath, _, | ||
var isEqual, isPlainObject, macModifierKeyMap, nonMacModifierKeyMap, plus, shiftKeyMap, splitKeyPath, _, | ||
__slice = [].slice; | ||
@@ -65,2 +65,6 @@ | ||
isPlainObject = function(value) { | ||
return _.isObject(value) && !_.isArray(value); | ||
}; | ||
plus = { | ||
@@ -137,16 +141,14 @@ adviseBefore: function(object, methodName, advice) { | ||
deepExtend: function() { | ||
var key, object, objects, result, value, _i, _len; | ||
objects = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
result = {}; | ||
var key, object, objects, result, target, value, _i, _len; | ||
target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : []; | ||
result = target; | ||
for (_i = 0, _len = objects.length; _i < _len; _i++) { | ||
object = objects[_i]; | ||
for (key in object) { | ||
value = object[key]; | ||
if (_.isObject(value) && !_.isArray(value)) { | ||
if (isPlainObject(result) && isPlainObject(object)) { | ||
for (key in object) { | ||
value = object[key]; | ||
result[key] = plus.deepExtend(result[key], value); | ||
} else { | ||
if (result[key] == null) { | ||
result[key] = value; | ||
} | ||
} | ||
} else { | ||
result = plus.deepClone(object); | ||
} | ||
@@ -153,0 +155,0 @@ } |
{ | ||
"name": "underscore-plus", | ||
"version": "1.6.2", | ||
"version": "1.6.3", | ||
"description": "Underscore plus additional utilities", | ||
@@ -5,0 +5,0 @@ "licenses": [ |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
510
0
16745
3
1
0