@broofa/merge
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@broofa/merge", | ||
"version": "1.0.0", | ||
"description": "Deep merge JSON structures to allow \"===\" comparison for deep-equality", | ||
"version": "1.0.1", | ||
"description": "Merge immutable JSON data structures to allow for identity (===) comparisons on deeply-equal subtrees", | ||
"main": "index.js", | ||
@@ -17,2 +17,3 @@ "dependencies": { | ||
}, | ||
"homepage": "https://github.com/broofa/BroofaJS/merge", | ||
"repository": { | ||
@@ -19,0 +20,0 @@ "type": "git", |
@@ -5,2 +5,12 @@ var assert = require('assert'); | ||
describe(__filename, async () => { | ||
it('Undefined', async () => { | ||
assert.equal(123, merge(undefined, 123)); | ||
assert.equal(undefined, merge(123, undefined)); | ||
}); | ||
it('Null', async () => { | ||
assert.equal(123, merge(null, 123)); | ||
assert.equal(null, merge(123, null)); | ||
}); | ||
it('Boolean', async () => { | ||
@@ -33,2 +43,3 @@ assert.equal(true, merge(true, true)); | ||
assert.equal(a, merge(a, b)); | ||
assert.notEqual(c, merge(a, c)); // Has entries from both, so is new array | ||
assert.deepEqual(c, merge(a, c)); | ||
@@ -43,2 +54,3 @@ }); | ||
assert.equal(a, merge(a, b)); | ||
assert.notEqual(c, merge(a, c)); // Has entries from both, so is new object | ||
assert.deepEqual(c, merge(a, c)); | ||
@@ -45,0 +57,0 @@ }); |
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
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6018
94