Overriding Map/etc with get/set hooks?
Tab Atkins Jr.
jackalmage at gmail.com
Mon May 20 22:28:08 PDT 2013
On Mon, May 20, 2013 at 10:20 PM, Domenic Denicola
<domenic at domenicdenicola.com> wrote:
> Oh, I must have misread your original message. I thought it did not allow storing non-string keys. If it can allow storing any kind of key, like a Map, and it's just the initial data you're referring to, then maybe it is a Map. As long as the contract that `map.set(x, y); map.get(x) === y` works for any `x` and `y`, then you're probably fine.
It's a string-keyed map, but that just means that you toString
everything, as Anne says. Your contract is still maintained, assuming
a non-degenerate toString.
More information about the es-discuss