Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

underscore-plus

Package Overview
Dependencies
Maintainers
5
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

underscore-plus - npm Package Compare versions

Comparing version 1.6.2 to 1.6.3

24

lib/underscore-plus.js
(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": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc