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

n-deep-merge

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

n-deep-merge - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

10

merge.js

@@ -20,8 +20,10 @@ /*!

deepmerge = function (dest) {
function deepmerge(dest) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
if (!source && typeof source !== 'boolean')
if (!source && !~['boolean', 'string', 'number'].indexOf(typeof source)) {
continue;
}

@@ -41,3 +43,3 @@ var isObj = typeof source === 'object',

for (var key in source) {
dest[key] = this.deepmerge(dest[key], source[key]);
dest[key] = deepmerge(dest[key], source[key]);
}

@@ -49,5 +51,5 @@ } else {

return dest;
};
}
return deepmerge;
}));

2

package.json
{
"name": "n-deep-merge",
"version": "0.0.1",
"version": "0.0.2",
"description": "deep merge a collection of javascript objects and arrays",

@@ -5,0 +5,0 @@ "main": "merge.js",

# n-deep-merge
[![Build Status](https://travis-ci.org/eclifford/bronson.svg?branch=master)](https://travis-ci.org/eclifford/bronson)
[![Coverage Status](https://coveralls.io/repos/eclifford/bronson/badge.png?branch=master)](https://coveralls.io/r/eclifford/bronson?branch=master)
[![Build Status](https://travis-ci.org/eclifford/n-deep-merge.svg?branch=master)](https://travis-ci.org/eclifford/n-deep-merge)

@@ -21,3 +20,3 @@ ## What is n-deep-merge?

```javascript
var merge = require('deep-merge');
var merge = require('n-deep-merge');

@@ -24,0 +23,0 @@ var foo = {

@@ -130,2 +130,9 @@ var expect = require('chai').expect;

});
it('should merge properties with the number 0 or an empty string', function() {
var obj1 = {foo: 0, bar: true},
obj2 = {baz: 1, test: ''};
var obj3 = merge(obj2, obj1);
expect(obj3).to.deep.equal({foo: 0, bar: true, baz: 1, test: ''});
});
});
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