Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
doc: use Object.hasOwn() in util doc
Swtich from `hasOwnProperty()` to `Object.hasOwn()`.
  • Loading branch information
Trott committed Jan 31, 2022
commit 3c2d0dfd3bc50bf2b541c0411717492922e8ad0a
2 changes: 1 addition & 1 deletion doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const callbackFunction = util.callbackify(fn);
callbackFunction((err, ret) => {
// When the Promise was rejected with `null` it is wrapped with an Error and
// the original value is stored in `reason`.
err && err.hasOwnProperty('reason') && err.reason === null; // true
err && Object.hasOwn(err, 'reason') && err.reason === null; // true
});
```

Expand Down