Hacker News new | ask | show | jobs
by temporarysdwvit 2171 days ago
Oh you can, just implement toString and js will use it for hashing
1 comments

No it won't.
Map, no. Plain object, yes.
It doesn't "use `toString` for hashing", it just converts the key to a string. That is not the same (e.g. you can't recover the original key).