Comparing version 2.2.5 to 2.3.0
@@ -103,3 +103,5 @@ 'use strict' | ||
if (this.options.typed && source[key]._type ) | ||
if ( self.options.excluded && self.options.excluded.indexOf(key) !== -1 ) | ||
continue | ||
if (self.options.typed && source[key]._type ) | ||
object[ key ] = source.value || source.defaultValue || source.defaultvalue | ||
@@ -106,0 +108,0 @@ else |
{ | ||
"name": "assign.js", | ||
"version": "2.2.5", | ||
"version": "2.3.0", | ||
"description": "Tiny libary to assign objects", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -9,3 +9,3 @@ 'use strict' | ||
describe('Assign.js', function () { | ||
let assigner = new Assigner() | ||
let assigner = new Assigner().excluded(['age']) | ||
let person = { | ||
@@ -33,2 +33,3 @@ name: 'Phil', | ||
cloned.extra.spectrum[1] = 200 | ||
expect( cloned ).to.not.have.property('age') | ||
expect( cloned.extra.spectrum ).to.eql( [ 1, 200, 3, 4, 5 ] ) | ||
@@ -35,0 +36,0 @@ expect( person.extra.spectrum ).to.eql( [ 1, 2, 3, 4, 5 ] ) |
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
13782
327