I'm going to add documentation also before we merge it in.
The main thing to note is an added optional (not to be used by anything other than test/spec) parameter, hashCode, to get(), put(), remove(). This is used to simulate collisions. I did this since finding keys that are different, but generate the same hash, using the javascript implementation of java's 32bitint hash function (that I brought over from https://github.com/mgechev/javascript-algorithms/pull/68) would have been a pain.
I'll merge it the way it is. If you agree about the note above you can push the change in master, if you think it might create any issues we can discuss them here.
Creating a PR for this so you can check it out @mgechev before we bring it in. I started off with https://github.com/mgechev/javascript-algorithms/pull/68 as a base, and did quite a bit of modification.
I'm going to add documentation also before we merge it in.
The main thing to note is an added optional (not to be used by anything other than test/spec) parameter, hashCode, to get(), put(), remove(). This is used to simulate collisions. I did this since finding keys that are different, but generate the same hash, using the javascript implementation of java's 32bitint hash function (that I brought over from https://github.com/mgechev/javascript-algorithms/pull/68) would have been a pain.