mattbierner / hamt

Javascript Hash Array Mapped Trie
MIT License
250 stars 16 forks source link

Maximum call stack size exceeded #30

Open ifozest opened 5 years ago

ifozest commented 5 years ago

RangeError: Maximum call stack size exceeded

var hamt = require("hamt")

var map = hamt.empty

map = map.set(3947110700580, {});
map = map.set(4861938734628, {});

runkit link with stacktrace https://runkit.com/ifozest/5c94a4ff57f9d100115f3089

mattbierner commented 5 years ago

Are these numbers (3947110700580 and 4861938734628) supposed to be the keys or the raw hash value? set normally takes the keys as strings, so you may weird results like this if you try passing in a numbers directly. I think you either want to convert these numbers to strings, or use the .setHash method instead