i disagree. you can write more maintainable and cleaner code with the premise typeof's will never change again (and give a one-time pass for symbols), instead of over-engineered paranoid code that it *may* change again in the future.
On 11/25/17, Oriol _ <[email protected]> wrote: > It was kind of obvious that checking whether some value is an object by > ensuring that it's not any of the existing primitives would stop working if > a new primitive was added, which effectively happened with symbols. If some > library used that, I think it is to blame. Instead, I would recommend > something more simple and reliable like > > > ```js > function isObject(value) { > return Object(value) === value; > } > function isObject(value) { > return new function(){ return value } === value; > } > ``` > > --Oriol > _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

