LearnNewsExamplesServices
Frontmatter
id3130
titleObject.hasOwn()
stateClosed
labels
enhancementstale
assigneestobiu
createdAtJun 7, 2022, 11:28 AM
updatedAtSep 15, 2024, 4:35 AM
githubUrlhttps://github.com/neomjs/neo/issues/3130
authortobiu
commentsCount3
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtSep 15, 2024, 4:35 AM

Object.hasOwn()

Closed v8.1.0 enhancementstale
tobiu
tobiu commented on Jun 7, 2022, 11:28 AM

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.

tobiu added the enhancement label on Jun 7, 2022, 11:28 AM
tobiu assigned to @tobiu on Jun 7, 2022, 11:28 AM
tobiu
tobiu Jun 7, 2022, 11:31 AM

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.

@github-actions - 2024-08-31T02:25:54Z

This issue is stale because it has been open for 90 days with no activity.

  • 2024-08-31T02:25:54Z @github-actions added the stale label

@github-actions - 2024-09-15T02:35:54Z

This issue was closed because it has been inactive for 14 days since being marked as stale.

  • 2024-09-15T02:35:54Z @github-actions closed this issue