Socket
Socket
Sign inDemoInstall

hoek

Package Overview
Dependencies
Maintainers
2
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 0.0.21 to 0.1.0

14

lib/index.js

@@ -180,2 +180,16 @@ // Load modules

// Find which keys are present
exports.matchKeys = function (obj, keys) {
var matched = [];
for (var i = 0, il = keys.length; i < il; ++i) {
if (obj.hasOwnProperty(keys[i])) {
matched.push(keys[i]);
}
}
return matched;
};
// Flatten array

@@ -182,0 +196,0 @@

2

package.json
{
"name": "hoek",
"description": "General purpose node utilities",
"version": "0.0.21",
"version": "0.1.0",
"author": "Eran Hammer <eran@hueniverse.com> (http://hueniverse.com)",

@@ -6,0 +6,0 @@ "contributors":[

@@ -182,2 +182,18 @@ // Load modules

describe('#matchKeys', function () {
it('should match the existing object keys', function (done) {
var obj = {
a: 1,
b: 2,
c: 3,
d: null
};
expect(Hoek.matchKeys(obj, ['b', 'c', 'd', 'e'])).to.deep.equal(['b', 'c', 'd']);
done();
});
});
describe('#flatten', function () {

@@ -419,3 +435,3 @@

done();
}, 10);
}, 12);
});

@@ -422,0 +438,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