-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: use Object.hasOwn() where applicable #41664
Conversation
Replace Object.prototpye.hasOwnProperty() with Object.hasOwn() where applicable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but why? I get the value of hasOwn when interacting with objects whose prototype you can't be certain of but these are our own tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal is to enforce it with a lint rule in the future? I'm all for it.
These are all flagged by the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:))))))))))))
Landed in e2e2bc8 |
Replace Object.prototpye.hasOwnProperty() with Object.hasOwn() where applicable. PR-URL: nodejs#41664 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tierney Cyren <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Replace Object.prototpye.hasOwnProperty() with Object.hasOwn() where applicable. PR-URL: #41664 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tierney Cyren <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Replace Object.prototpye.hasOwnProperty() with Object.hasOwn() where applicable. PR-URL: #41664 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tierney Cyren <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Replace Object.prototpye.hasOwnProperty() with Object.hasOwn() where applicable. PR-URL: #41664 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tierney Cyren <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Replace Object.prototpye.hasOwnProperty() with Object.hasOwn() where applicable. PR-URL: #41664 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tierney Cyren <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Replace Object.prototpye.hasOwnProperty() with Object.hasOwn() where
applicable.