@petrpeller hasOwnProperty is slower than setting an objects prototype to null. I want to use it for constants.
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@sebmck@djsmith42 there might also be performance penalty last time I checked -
@bahmutov@djsmith42 The object creation isn't in the hot path. - 1 more reply
New conversation -
-
-
@sebmck Is that not just Object.create(null)? -
@eaf4 Yep, I don't want to have to manually assign properties though. I just want an object literal. - 14 more replies
New conversation -
-
-
@sebmck obj.__proto__ = null; ?Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@sebmck I want a JSON.parse patch that creates prototype-less objects!Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@sebmck the@sindresorhus law states that if there's none eventually he will make one.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 