Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 0.1.3 to 0.1.4

49

package.json
{
"name": "hasharray",
"author": "Joshua Jung <joshua.p.jung@gmail.com>",
"license": "MIT",
"description": "A data structure that combines a hash and an array for CRUD operations by object keys or index.",
"version": "0.1.3",
"main": "index.js",
"url": "https://github.com/joshjung/hash-array",
"homepage": "https://github.com/joshjung/hash-array",
"email": "joshua.p.jung@gmail.com",
"dependencies": {
"debug": "^1.0.4"
},
"repository": {
"type": "git",
"url": "https://github.com/joshjung/hash-array.git"
},
"keywords": [
"hash",
"hashtable",
"array",
"arraylist",
"dictionary"
]
}
"name": "hasharray",
"author": "Joshua Jung <joshua.p.jung@gmail.com>",
"license": "MIT",
"description": "A data structure that combines a hash and an array for CRUD operations by object keys or index.",
"version": "0.1.4",
"main": "index.js",
"url": "https://github.com/joshjung/hash-array",
"homepage": "https://github.com/joshjung/hash-array",
"email": "joshua.p.jung@gmail.com",
"dependencies": {
"debug": "^1.0.4",
"jclass": "^0.2.5"
},
"repository": {
"type": "git",
"url": "https://github.com/joshjung/hash-array.git"
},
"keywords": [
"hash",
"hashtable",
"array",
"arraylist",
"dictionary"
]
}

@@ -1,20 +0,15 @@

var HashArray = function(keyFields, callback) {
this._map = {};
this._list = [];
this.callback = callback;
var JClass = require('jclass');
this.keyFields = keyFields;
var HashArray = JClass.extend({
init: function(keyFields, callback) {
this._map = {};
this._list = [];
this.callback = callback;
if (callback) {
callback('construct');
}
};
this.keyFields = keyFields;
HashArray.prototype = {
get all() {
return this._list;
if (callback) {
callback('construct');
}
},
get map() {
return this._map;
},
add: function() {

@@ -142,4 +137,16 @@ for (var i = 0; i < arguments.length; i++) {

}
};
});
Object.defineProperty(HashArray.prototype, 'all', {
get: function () {
return this._list;
}
});
Object.defineProperty(HashArray.prototype, 'map', {
get: function () {
return this._map;
}
});
module.exports = HashArray;

@@ -146,0 +153,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