abstract-object
Advanced tools
Comparing version 1.6.0 to 1.6.1
var isObject = require('./isObject'); | ||
module.exports = function(origin, add) { | ||
// Don't do anything if add isn't an object | ||
if (!add || !isObject(add)) return origin; | ||
var keys = Object.keys(add); | ||
var i = keys.length; | ||
while (i--) { | ||
origin[keys[i]] = add[keys[i]]; | ||
module.exports = function (origin) { | ||
for (var i=1; i < arguments.length; i++) { | ||
var add = arguments[i]; | ||
// Don't do anything if add isn't an object | ||
if (!add || !isObject(add)) continue; | ||
var keys = Object.keys(add); | ||
var j = keys.length; | ||
while (j--) { | ||
origin[keys[j]] = add[keys[j]]; | ||
} | ||
} | ||
return origin; | ||
} | ||
{ | ||
"name": "abstract-object", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "AbstractObject with Object State Events Support, RefObject with RefCount and AddRef/Release Support.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/snowyu/abstract-object", |
var isObject = require('./isObject'); | ||
module.exports = function(origin, add) { | ||
// Don't do anything if add isn't an object | ||
if (!add || !isObject(add)) return origin; | ||
var keys = Object.keys(add); | ||
var i = keys.length; | ||
while (i--) { | ||
origin[keys[i]] = add[keys[i]]; | ||
module.exports = function (origin) { | ||
for (var i=1; i < arguments.length; i++) { | ||
var add = arguments[i]; | ||
// Don't do anything if add isn't an object | ||
if (!add || !isObject(add)) continue; | ||
var keys = Object.keys(add); | ||
var j = keys.length; | ||
while (j--) { | ||
origin[keys[j]] = add[keys[j]]; | ||
} | ||
} | ||
return origin; | ||
} | ||
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
82034
71
950