Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@broofa/merge

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@broofa/merge - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

5

package.json
{
"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 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc