Comparing version 0.1.2 to 0.1.3-beta-1
@@ -0,0 +0,0 @@ # Confort Changelog |
@@ -23,3 +23,4 @@ const fs = require('fs'); | ||
const isMergeableObject = val => | ||
typeof val === 'object' && ['Object', 'Array'].includes(val.constructor.name); | ||
typeof val === 'object' && | ||
(!val.constructor || ['Object', 'Array'].includes(val.constructor.name)); | ||
@@ -26,0 +27,0 @@ module.exports = class Confort extends EventEmitter { |
{ | ||
"name": "confort", | ||
"version": "0.1.2", | ||
"version": "0.1.3-beta-1", | ||
"description": "A library for incrementally build config objects through layering config files in many formats.", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -0,0 +0,0 @@ # [Confort](https://gitlab.com/GCSBOSS/confort) |
{ | ||
"key": "value" | ||
} |
@@ -80,2 +80,11 @@ const fs = require('fs'); | ||
it('Should merge objects with null prototype', () => { | ||
let o = Object.create(null); | ||
o.b = 2; | ||
let conf = new Confort(o); | ||
conf.addLayer({ a: 1 }); | ||
assert.strictEqual(conf.object.a, 1); | ||
assert.strictEqual(conf.object.b, 2); | ||
}); | ||
it('Should replace objects with a class other than Object', () => { | ||
@@ -82,0 +91,0 @@ class Foo{ constructor(){ this.a = 'foo'; } } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
18219
251