chad3814/node-hashtable

calling put() with the same key twice crashes the process

gregorleban opened this issue · 0 comments

Calling the put() method twice using the same key like below crashes the node process:

x = new HashTable()
x.put("x", "y")
x.put("x", "y")

If calling put() multiple times with the same key is not allowed I suggest you rather throw a regular exception that can be caught in node.

Simply updating the existing key could also be a valid solution.