> The (x === Object(x)) test evaluates to true for value objects in this > proposal, though. This may break code looking for "primitives" but we need to > see what such code expects. Is it filtering out the legacy typeof-result > primitives (plus "null"), trying to find values for which typeof currently > returns "object" or "function"? If so, I don't see a problem: int64, bignum, > etc. are not legacy primitives. Is this test looking for objects that are > their own wrappers? Again all is well, unless "mutable wrapper" is assumed -- > but that's not safe in the ES5 era to assume, anyway.
The most frequent use case I’ve encountered: does the value have a prototype (i.e., will Object.getPrototypeOf() work)? I’m assuming that value objects will have a prototype, accessible via Object.getPrototypeOf (?) Axel -- Dr. Axel Rauschmayer a...@rauschma.de home: rauschma.de twitter: twitter.com/rauschma blog: 2ality.com
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss