SuperHash(entries)
set(keys, value)
get(keys)
has(keys)
keys
entries
values
forEach(cb, context)
delete(keys)
clear
- entries (
Array
) two dimensional array with entries to prefill the map. Keys must be an array (even if just one)
Creates a new SuperHash
Example entries
Array
[[1,2,3],'foo'], [[{foo: 'bar', {blip:'blop'}],'bar']]
- keys (
...*
) Used to generate hash - value (
*
) to be associated with the key
Creates a hash from the keys if it doesn't exist and sets the last argument passed in as the value
- keys (
...*
) Used to generate a hash for lookup
Returns the value associated with the hash generated from the keys
- keys (
...*
) - Used to generate a hash for lookup
Tells whether or not value associated with the hash generated from the keys is in the map
Returns all keys from the hash map
Returns all entries (key/value pairs) from the hash map
Returns all values from the hash map
- cb (
Function
) callback function called with(key, value)
for each entry in the map - context (
*
)this
context for the callback
Loops through each value in the hashmap passing it as the first argument in callack
hashMap.forEach(function(value){
});
- keys (
...*
) - Used to generate a hash for lookup
Removes the hash generated by the keys and the associated value
Deletes all keys and values from hash map