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.0 to 1.1.1

9

lib/index.js

@@ -41,4 +41,11 @@ // Load modules

var newObj = (obj instanceof Array ? [] : {});
var create = function (obj) {
var o = {};
o.__proto__ = Object.getPrototypeOf(obj);
return o;
};
var newObj = (obj instanceof Array ? [] : create(obj));
seen.orig.push(obj);

@@ -45,0 +52,0 @@ seen.copy.push(newObj);

2

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

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

@@ -0,0 +0,0 @@ <a href="https://github.com/spumko"><img src="https://raw.github.com/spumko/spumko/master/images/from.png" align="right" /></a>

@@ -202,2 +202,20 @@ // Load modules

});
it('should clone an object with a prototype', function (done) {
var Obj = function () {
this.a = 5;
};
Obj.prototype.b = function () { return 'c'; };
var a = new Obj();
var b = Hoek.clone(a);
expect(b.a).to.equal(5);
expect(b.b()).to.equal('c');
expect(a).to.deep.equal(b);
done();
});
});

@@ -204,0 +222,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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