🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

hasharray

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hasharray - npm Package Compare versions

Comparing version

to
1.1.2

2

package.json

@@ -6,3 +6,3 @@ {

"description": "A data structure that combines a hash and an array for fast dictionary lookup and traversal by complex keys.",
"version": "1.1.1",
"version": "1.1.2",
"main": "index.js",

@@ -9,0 +9,0 @@ "url": "https://github.com/joshjung/hash-array",

@@ -134,2 +134,4 @@ /*===========================================================================*\

get: function(key) {
if (!this.has(key))
return;
return (!(this._map[key] instanceof Array) || this._map[key].length != 1) ? this._map[key] : this._map[key][0];

@@ -136,0 +138,0 @@ },

@@ -51,2 +51,6 @@ var assert = require('assert'),

});
it('Should not crash on the reserved keyword "constructor".', function() {
assert.equal(ha.get('constructo'), undefined);
});

@@ -53,0 +57,0 @@ it('Should return true to a collides for a similar object.', function() {