On Tue, Sep 2, 2014 at 1:07 PM, Daurnimator q...@daurnimator.com wrote:
I'm the maintainer of lua.vm.js[1], which allows Lua code to run in the
browser.
I've managed to construct a simple and robust cross-language bridge, so that
Lua code can interact with Javascript objects.
When the Lua no
Neither `Set` nor `Map` have `toString` methods defined on the
prototype. This can lead to somewhat surprising behavior for
interactive users (this is node with`es6-shim`):
```js
s = new Set(['a'])
{}
m = new Map([['a','b']])
{}
s.toString()
'[object Object]'
m.toString()
'[object Object]'
ES6 defines `Map.prototype[Symbol.toStringTag]` and
`Set.prototype[Symbol.toStringTag]` such that the ES6 version of
Object.prototype.toString will produce
[object Map] and [object Set] respectively when applied to Map or Set
instances
Allen
On Sep 4, 2014, at 2:51 PM, C. Scott Ananian
On 9/4/14, 5:51 PM, C. Scott Ananian wrote:
s.toString()
'[object Object]'
Per spec this should be [object Set]. Both V8 and SpiderMonkey get
this right, fwiw.
m.toString()
'[object Object]'
Again, should be [object Map].
Eventually node's `util.inspect` (and the various browser
4 matches
Mail list logo