Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Fix typos (#11)
Browse files Browse the repository at this point in the history
These probably were meant to be `Object.hasOwn` per #3 (comment)
  • Loading branch information
TimvdLippe authored Apr 22, 2021
1 parent 306f679 commit 96bc8e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ The MDN documentation for `Object.prototype.hasOwnProperty` includes [advice][md
## Proposal
This proposal adds a `Object.has(object, property)` method with the same behavior as calling `hasOwnProperty.call(object, property)`
This proposal adds a `Object.hasOwn(object, property)` method with the same behavior as calling `hasOwnProperty.call(object, property)`
```js
let object = { foo: false }
Expand All @@ -114,7 +114,7 @@ Object.hasOwn(object3, "foo") // false
## Implementations

There are currently no native implementations of `Object.has` in JavaScript engines.
There are currently no native implementations of `Object.hasOwn` in JavaScript engines.

A polyfill of `Object.hasOwn()` is available in [polyfill.js](./polyfill.js) or in [core-js](https://github.com/zloirock/core-js/#accessible-objecthasownproperty)

Expand Down

0 comments on commit 96bc8e9

Please sign in to comment.