Y
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
IshKebab
2170 days ago
No it won't.
link
yqot
2170 days ago
Map, no. Plain object, yes.
link
IshKebab
2166 days ago
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).
link