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

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


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: <>

More information about the es-discuss mailing list