Polyfill for Maps and Sets

Domenic Denicola domenic at domenicdenicola.com
Thu Jan 17 11:12:26 PST 2013


Dude, do you even read the spec?

http://people.mozilla.org/~jorendorff/es6-draft.html#sec-15.14.5.4
________________________________________
From: es-discuss-bounces at mozilla.org [es-discuss-bounces at mozilla.org] on behalf of Thaddee Tyl [thaddee.tyl at gmail.com]
Sent: Thursday, January 17, 2013 14:07
To: Brandon Benvie
Cc: es-discuss Steen
Subject: Re: Polyfill for Maps and Sets

On Thu, Jan 17, 2013 at 7:58 PM, Brandon Benvie
<brandon at brandonbenvie.com> wrote:
> There's multiple polyfills for Map, Set, and WeakMap (WeakMap not being
> fully implementable, but close). Here's one:
> http://benvie.github.com/harmony-collections.

This polyfill isn't exact in the same way that I described.
The difference is, instead of shamelessly adding 'getKeys' in the way
that I suggested,
it shamelessly adds 'forEach', which isn't in the spec.

I'd be happy with any of those, although, again, I believe that
'getKeys' would prove more useful in practice.
_______________________________________________
es-discuss mailing list
es-discuss at mozilla.org
https://mail.mozilla.org/listinfo/es-discuss




More information about the es-discuss mailing list