JavaScript sets consider elements "equal" if a === b, which means things like this happen: $ node -e 'console.log(new Set([[1], [1]]))' Set { [ 1 ], [ 1 ] } How do I use a set to store complex values? Am I just out of luck?
-
-
Derived keys aren't an option this time because I'm writing a data structure that can hold any type of data, but I'll find some other workaround. Thanks!
-
You could use something like this but it's definitely on the brittle sidehttps://www.npmjs.com/package/hash-sum …
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 