| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b92511d commit 0677649
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,6 +8,7 @@ const { | |||
| 8 | 8 | ObjectDefineProperties, | |
| 9 | 9 | ObjectGetOwnPropertyDescriptors, | |
| 10 | 10 | Symbol, | |
| 11 | + SymbolToStringTag, | ||
| 11 | 12 | } = primordials; | |
| 12 | 13 | ||
| 13 | 14 | const { | |
@@ -358,7 +359,7 @@ ObjectDefineProperties( | |||
| 358 | 359 | 'encode': { enumerable: true }, | |
| 359 | 360 | 'encodeInto': { enumerable: true }, | |
| 360 | 361 | 'encoding': { enumerable: true }, | |
| 361 | - [Symbol.toStringTag]: { | ||
| 362 | + [SymbolToStringTag]: { | ||
| 362 | 363 | configurable: true, | |
| 363 | 364 | value: 'TextEncoder' | |
| 364 | 365 | } }); | |
@@ -554,7 +555,7 @@ function makeTextDecoderJS() { | |||
| 554 | 555 | ObjectDefineProperties(TextDecoder.prototype, { | |
| 555 | 556 | decode: { enumerable: true }, | |
| 556 | 557 | [inspect]: { enumerable: false }, | |
| 557 | - [Symbol.toStringTag]: { | ||
| 558 | + [SymbolToStringTag]: { | ||
| 558 | 559 | configurable: true, | |
| 559 | 560 | value: 'TextDecoder' | |
| 560 | 561 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,6 +13,7 @@ const { | |||
| 13 | 13 | ReflectOwnKeys, | |
| 14 | 14 | Symbol, | |
| 15 | 15 | SymbolIterator, | |
| 16 | + SymbolToStringTag, | ||
| 16 | 17 | } = primordials; | |
| 17 | 18 | ||
| 18 | 19 | const { inspect } = require('internal/util/inspect'); | |
@@ -431,7 +432,7 @@ ObjectDefineProperties(URL.prototype, { | |||
| 431 | 432 | return ret; | |
| 432 | 433 | } | |
| 433 | 434 | }, | |
| 434 | - [Symbol.toStringTag]: { | ||
| 435 | + [SymbolToStringTag]: { | ||
| 435 | 436 | configurable: true, | |
| 436 | 437 | value: 'URL' | |
| 437 | 438 | }, | |
@@ -859,7 +860,7 @@ function serializeParams(array) { | |||
| 859 | 860 | // Mainly to mitigate func-name-matching ESLint rule | |
| 860 | 861 | function defineIDLClass(proto, classStr, obj) { | |
| 861 | 862 | // https://heycam.github.io/webidl/#dfn-class-string | |
| 862 | - ObjectDefineProperty(proto, Symbol.toStringTag, { | ||
| 863 | + ObjectDefineProperty(proto, SymbolToStringTag, { | ||
| 863 | 864 | writable: false, | |
| 864 | 865 | enumerable: false, | |
| 865 | 866 | configurable: true, | |
@@ -1244,7 +1245,7 @@ defineIDLClass(URLSearchParamsIteratorPrototype, 'URLSearchParams Iterator', { | |||
| 1244 | 1245 | } else { | |
| 1245 | 1246 | outputStr = ` ${outputStrs.join(', ')}`; | |
| 1246 | 1247 | } | |
| 1247 | - return `${this[Symbol.toStringTag]} {${outputStr} }`; | ||
| 1248 | + return `${this[SymbolToStringTag]} {${outputStr} }`; | ||
| 1248 | 1249 | } | |
| 1249 | 1250 | }); | |
| 1250 | 1251 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments