chad3814 / node-hashtable

Native hashtable interface for when V8 objects can't take the heat
MIT License
106 stars 41 forks source link

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

Closed gregorleban closed 6 years ago

gregorleban commented 6 years ago

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.