Skip to content

Commit

Permalink
move accessible Object#hasOwnProperty (Object.hasOwn) proposal to…
Browse files Browse the repository at this point in the history
… the stage 3

May 2021 TC39 meeting, babel/proposals#74 (comment)
  • Loading branch information
zloirock committed May 25, 2021
1 parent 29277be commit c412ee2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
@@ -1,6 +1,6 @@
## Changelog
##### Unreleased
- Nothing
- Accessible `Object#hasOwnProperty` (`Object.hasOwn`) proposal moved to the stage 3, [May 2021 TC39 meeting](https://github.com/babel/proposals/issues/74#issuecomment-848121673)

##### 3.12.1 - 2021.05.09
- Fixed some cases of `Function#toString` with multiple `core-js` instances
Expand Down
36 changes: 18 additions & 18 deletions README.md
Expand Up @@ -1806,6 +1806,24 @@ core-js(-pure)/features/typed-array/at
[1, 2, 3].at(1); // => 2
[1, 2, 3].at(-1); // => 3
```
##### [Accessible `Object#hasOwnProperty`](https://github.com/tc39/proposal-accessible-object-hasownproperty)[⬆](#index)
Module [`esnext.object.has-own`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.object.has-own.js).
```js
class Object {
hasOwn(object: object, key: PropertyKey): boolean;
}
```
[*CommonJS entry points:*](#commonjs-api)
```
core-js/proposals/accessible-object-hasownproperty
core-js(-pure)/features/object/has-own
```
[*Examples*](http://es6.zloirock.ru/#log(Object.hasOwn(%7B%20foo%3A%2042%20%7D%2C%20'foo'))%3B%20%2F%2F%20%3D%3E%20true%0Alog(Object.hasOwn(%7B%20foo%3A%2042%20%7D%2C%20'bar'))%3B%20%2F%2F%20%3D%3E%20false%0Alog(Object.hasOwn(%7B%7D%2C%20'toString'))%3B%20%2F%2F%20%3D%3E%20false):
```js
Object.hasOwn({ foo: 42 }, 'foo'); // => true
Object.hasOwn({ foo: 42 }, 'bar'); // => false
Object.hasOwn({}, 'toString'); // => false
````
#### Stage 2 proposals[⬆](#index)
[*CommonJS entry points:*](#commonjs-api)
Expand Down Expand Up @@ -2032,24 +2050,6 @@ core-js/features/typed-array/find-last-index
[1, 2, 3, 4].findLast(it => it % 2); // => 3
[1, 2, 3, 4].findLastIndex(it => it % 2); // => 2
````
##### [Accessible `Object#hasOwnProperty`](https://github.com/tc39/proposal-accessible-object-hasownproperty)[⬆](#index)
Module [`esnext.object.has-own`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.object.has-own.js).
```js
class Object {
hasOwn(object: object, key: PropertyKey): boolean;
}
```
[*CommonJS entry points:*](#commonjs-api)
```
core-js/proposals/accessible-object-hasownproperty
core-js(-pure)/features/object/has-own
```
[*Examples*](http://es6.zloirock.ru/#log(Object.hasOwn(%7B%20foo%3A%2042%20%7D%2C%20'foo'))%3B%20%2F%2F%20%3D%3E%20true%0Alog(Object.hasOwn(%7B%20foo%3A%2042%20%7D%2C%20'bar'))%3B%20%2F%2F%20%3D%3E%20false%0Alog(Object.hasOwn(%7B%7D%2C%20'toString'))%3B%20%2F%2F%20%3D%3E%20false):
```js
Object.hasOwn({ foo: 42 }, 'foo'); // => true
Object.hasOwn({ foo: 42 }, 'bar'); // => false
Object.hasOwn({}, 'toString'); // => false
````
##### [`Symbol.metadata` for decorators proposal](https://github.com/tc39/proposal-decorators)[⬆](#index)
Module [`esnext.symbol.metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.symbol.metadata.js).
```js
Expand Down
1 change: 0 additions & 1 deletion packages/core-js/stage/2.js
@@ -1,4 +1,3 @@
require('../proposals/accessible-object-hasownproperty');
require('../proposals/array-find-from-last');
require('../proposals/array-is-template-object');
require('../proposals/decorators');
Expand Down
1 change: 1 addition & 0 deletions packages/core-js/stage/3.js
@@ -1,3 +1,4 @@
require('../proposals/accessible-object-hasownproperty');
require('../proposals/relative-indexing-method');
var parent = require('./4');

Expand Down

0 comments on commit c412ee2

Please sign in to comment.