Maps with object keys

David Bruant bruant.d at
Mon Feb 17 14:27:44 PST 2014

Le 17/02/2014 22:55, Benjamin (Inglor) Gruenbaum a écrit :
> My issue here is that I want to index on "complex" values. I was under 
> the impression ES6 maps solve amongst others the problem that with 
> objects - keys are only strings.
With maps, all native types (string, number, boolean, undefined, null, 
object) can be keys.
For complex values, funnel your values down to one of these (by hashing 
or serializing or whatever fits your need). It's easy enough to write 
and enough use case specific to justify not being part of the language.


More information about the es-discuss mailing list