Array.isArray(new Proxy([], {})) should be false (Bug 1096753)

Michał Wadas michalwadas at gmail.com
Fri Nov 14 05:19:47 PST 2014


Hai.

Why not Symbol.isArray?

> To me the most interesting question is how to create objects that get
JSON-stringified as [], not {}. Some sort of symbol-based mechanism makes
sense for that, IMO...

toJSON method.

`JSON.stringify({toJSON: () => [2,3,4,5]})`
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141114/9375b90d/attachment.html>


More information about the es-discuss mailing list