Skip to content

Commit 3fd6d0b

Browse files
committed
add Reflect[@@toStringTag]
tc39/ecma262#2057
1 parent 7fad6ac commit 3fd6d0b

File tree

16 files changed

+43
-0
lines changed

16 files changed

+43
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
##### Unreleased
33
- `String#replaceAll` moved to the stable ES, [per June TC39 meeting](https://github.com/tc39/notes/blob/master/meetings/2020-06/june-2.md#stringprototypereplaceall-for-stage-4)
44
- `Promise.any` and `AggregateError` moved to the stable ES, [per July TC39 meeting](https://github.com/tc39/notes/blob/master/meetings/2020-07/july-21.md#promiseany--aggregateerror-for-stage-4)
5+
- Added `Reflect[@@toStringTag]`, [per July TC39 meeting](https://github.com/tc39/ecma262/pull/2057)
56
- Following the changes in [the `upsert` proposal](https://github.com/tc39/proposal-upsert), `{ Map, WeakMap }#emplace` replace `{ Map, WeakMap }#upsert`, these obsolete methods will be removed in the next major release
67
- [By the current spec](https://tc39.es/ecma262/#sec-aggregate-error-constructor), `AggregateError#errors` is own data property
78
- Added correct iteration closing in the iteration helpers according to the current version of [the proposal](https://tc39.es/proposal-iterator-helpers)

packages/core-js-compat/src/data.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,11 @@ const data = {
812812
firefox: '42',
813813
safari: '10.0',
814814
},
815+
'es.reflect.to-string-tag': {
816+
chrome: '86',
817+
firefox: '82',
818+
safari: '14.0',
819+
},
815820
'es.regexp.constructor': {
816821
chrome: '51',
817822
firefox: '49',

packages/core-js-compat/src/modules-by-versions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ module.exports = {
5959
3.7: [
6060
'es.aggregate-error',
6161
'es.promise.any',
62+
'es.reflect.to-string-tag',
6263
'es.string.replace-all',
6364
'esnext.map.emplace',
6465
'esnext.weak-map.emplace',
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// empty
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// empty

packages/core-js/es/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ require('../modules/es.reflect.own-keys');
208208
require('../modules/es.reflect.prevent-extensions');
209209
require('../modules/es.reflect.set');
210210
require('../modules/es.reflect.set-prototype-of');
211+
require('../modules/es.reflect.to-string-tag');
211212
var path = require('../internals/path');
212213

213214
module.exports = path;

packages/core-js/es/reflect/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ require('../../modules/es.reflect.own-keys');
1111
require('../../modules/es.reflect.prevent-extensions');
1212
require('../../modules/es.reflect.set');
1313
require('../../modules/es.reflect.set-prototype-of');
14+
require('../../modules/es.reflect.to-string-tag');
1415
var path = require('../../internals/path');
1516

1617
module.exports = path.Reflect;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require('../../modules/es.reflect.to-string-tag');
2+
3+
module.exports = 'Reflect';
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require('../../modules/es.reflect.to-string-tag');
2+
3+
module.exports = 'Reflect';
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
var $ = require('../internals/export');
2+
var global = require('../internals/global');
3+
var setToStringTag = require('../internals/set-to-string-tag');
4+
5+
$({ global: true }, { Reflect: {} });
6+
7+
// Reflect[@@toStringTag] property
8+
// https://tc39.es/ecma262/#sec-reflect-@@tostringtag
9+
setToStringTag(global.Reflect, 'Reflect', true);

0 commit comments

Comments
 (0)