1.0.6 • Published 6 years ago

object-hashmap v1.0.6

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

object-hashmap

object-hashmap is a map util of the form Map<K,V> where K i.e. key and V i.e. value can be either object or primitive data type.

Example usage

JS:

var objectHashMap = require('object-hashmap');
var hashMap = new objectHashMap.ObjectHashMap();

hashMap.put("key1", { test: "key1" });
hashMap.put({ key: "key2" }, { test: "key2" });
hashMap.put({ key: "key2" }, { test: "key3" });
console.log(hashMap.toString());

Installation

Node:

npm install object-hashmap

Methods

//Inserts an element in the map
put(K,V)

//Gets Value asssociated with given key or undefined if there is no such key
get(K)

//Returns String representation of the Map Object
toString()
1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.0

6 years ago