Suggestion: Object.symbols

Jordan Harband ljharb at gmail.com
Thu Jun 16 14:55:25 UTC 2016


Symbols are enumerable by default just like normal
properties. Object.assign skips non-enumerable Symbols.
Object.defineProperty can be used to create a non-enumerable Symbol, but I
believe that only impacts Object.assign (and specific enumerability
methods, obv).

On Thursday, June 16, 2016, doodad-js Admin <doodadjs at gmail.com> wrote:

> (quotes from G.Kay Lee)
>
>
>
> > I believe Symbols are all actually non-enumerable which will void the
> suggestion.
>
>
>
> I can confirm they can be enumerable, or “Object.propertyIsEnumerable” is
> lying to me.
>
>
>
> > And please, stop trying to add all kinds of trivial variations of
> property extraction methods already.
>
>
>
> Who, me ? That’s not trivial.... We have “Object.keys” for enumerables,
> why not “Object.symbols” for enumerables ?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160616/1ea7da1a/attachment.html>


More information about the es-discuss mailing list