neo
neo copied to clipboard
Object.hasOwn()
I kind of missed this one :)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn
we can now replace all occurrences of Object.hasOwnProperty() with hasOwn().
MDN recommends to do so, the bundle sizes get a bit smaller and the browser and nodejs support is decent.
well, actually it is not true for the bundle size, since we can call hasOwnProperty() directly on objects, while hasOwn() has to get called on Object. still, we should do it.