Comparing version 0.1.1 to 0.2.0
var _ = require('isa.js'); | ||
module.exports = { | ||
copyObject: function(source, props, object, respect) { | ||
var self = this; | ||
object = object || { }; | ||
@@ -11,4 +12,8 @@ | ||
var key = props[index]; | ||
if( !respect || !object[key] ) | ||
object[key] = source[key]; | ||
if( _.isObject( object[key] ) ){ | ||
self.copyObject( source[key], Object.keys(source[key]), object[key], respect ); | ||
} | ||
else | ||
if( !respect || !object[key] ) | ||
object[key] = source[key]; | ||
} | ||
@@ -15,0 +20,0 @@ return object; |
{ | ||
"name": "assign.js", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "Tiny libary to assign objects", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
19832
39