+1
-1
@@ -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", |
+2
-0
@@ -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() { |
63948
0.27%1475
0.34%