Module for HashMap integrated with javascript. will only allow strings as keys. uses linked lists to handle collisions(https://github.com/SuperScuffedDev/linked-list).
-
set(key, value): adds or updates the node linked tokeyand itsvalue. -
get(key): returns the value linked tokey. -
has(key): returnstrueifkeyif found in the table. otherwise, returnsfalse. -
remove(key): removes the node linked tokeyfrom the table and returnstrue. otherwise, returnsfalse. -
length(): returns the total number of nodes in the table. -
clear(): removes all nodes in the table, essentially resetting it. -
keys(): returns an array of every key in the table -
values(): returns an array of every value in the table. -
entries(): returns an array of every key: value pair in the table. structured as: [[key, value], [key2, value2]...]