Skip to content

esco/superhash-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SuperHash

Build Status Coverage Status Code Climate

superhash

HashMap that supports using one or more keys of any type*

Hash keys are generated using esco/multikey-hash

Installation

$ npm install superhash

Examples

var SuperHash = require('superhash');
var hashMap = new SuperHash();
var data = 'value';

Single key:

hashMap.set(5, data);
hashMap.get("5"); // returns undefined
hashMap.get(5); // returns 'value'
hashMap.delete(5); // returns true

Multiple keys:

var obj = { name: 'foo' };
hashMap.set(1, obj, true, data);
hashMap.get(1, obj, "true"); // returns undefined
hashMap.get(1, obj, true); // returns 'value'
hashMap.delete(1, obj, true); // returns true

API

See API.md

FAQ

What types of keys can be used?

Any primitive or mutable object can be used as a key.

Who named this module?

@nik

LICENSE

MIT

About

HashMap that supports using one or more keys of any type.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published