Skip to content

Commit 81157ee

Browse files
Mustafa UZUNljharb
authored andcommitted
[guide] add Object.hasOwn
1 parent 4ef69ed commit 81157ee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,8 @@ Other Style Guides
311311
/* or */
312312
import has from 'has'; // https://www.npmjs.com/package/has
313313
console.log(has(object, key));
314+
/* or */
315+
console.log(Object.hasOwn(object, key)); // https://www.npmjs.com/package/object.hasown
314316
```
315317
316318
<a name="objects--rest-spread"></a>

0 commit comments

Comments
 (0)