Socket
Socket
Sign inDemoInstall

hoek

Package Overview
Dependencies
Maintainers
3
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hoek - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

1

lib/index.js

@@ -96,2 +96,3 @@ // Load modules

typeof target[key] !== 'object' ||
(Array.isArray(target[key]) ^ Array.isArray(value)) ||
value instanceof Date ||

@@ -98,0 +99,0 @@ value instanceof Buffer ||

2

package.json
{
"name": "hoek",
"description": "General purpose node utilities",
"version": "1.1.1",
"version": "1.1.2",
"repository": "git://github.com/spumko/hoek",

@@ -6,0 +6,0 @@ "main": "index",

@@ -224,2 +224,40 @@ // Load modules

it('merges array over an object', function (done) {
var a = {
x: ['n', 'm']
};
var b = {
x: {
n: '1',
m: '2'
}
};
Hoek.merge(b, a);
expect(a.x[0]).to.equal('n');
expect(a.x.n).to.not.exist;
done();
});
it('merges object over an array', function (done) {
var a = {
x: ['n', 'm']
};
var b = {
x: {
n: '1',
m: '2'
}
};
Hoek.merge(a, b);
expect(a.x.n).to.equal('1');
expect(a.x[0]).to.not.exist;
done();
});
it('does not throw if source is null', function (done) {

@@ -226,0 +264,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