GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: use Object.hasOwn() in util doc · nodejs/node@14ea8fc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • util.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/util.md‎

Copy file name to clipboardExpand all lines: doc/api/util.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const callbackFunction = util.callbackify(fn);
6767
callbackFunction((err, ret) => {
6868
// When the Promise was rejected with `null` it is wrapped with an Error and
6969
// the original value is stored in `reason`.
70-
err && err.hasOwnProperty('reason') && err.reason === null; // true
70+
err && Object.hasOwn(err, 'reason') && err.reason === null; // true
7171
});
7272
```
7373

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.