Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d1702f5

Browse filesBrowse files
Sebastien-Ahkrintargos
authored andcommitted
lib: update Symbol.toStringTag by SymbolToStringTag primordial
PR-URL: #30908 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent d4ea392 commit d1702f5
Copy full SHA for d1702f5

File tree

Expand file treeCollapse file tree

2 files changed

+7
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-5
lines changed
Open diff view settings
Collapse file

‎lib/internal/encoding.js‎

Copy file name to clipboardExpand all lines: lib/internal/encoding.js
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const {
88
ObjectDefineProperties,
99
ObjectGetOwnPropertyDescriptors,
1010
Symbol,
11+
SymbolToStringTag,
1112
} = primordials;
1213

1314
const {
@@ -358,7 +359,7 @@ ObjectDefineProperties(
358359
'encode': { enumerable: true },
359360
'encodeInto': { enumerable: true },
360361
'encoding': { enumerable: true },
361-
[Symbol.toStringTag]: {
362+
[SymbolToStringTag]: {
362363
configurable: true,
363364
value: 'TextEncoder'
364365
} });
@@ -554,7 +555,7 @@ function makeTextDecoderJS() {
554555
ObjectDefineProperties(TextDecoder.prototype, {
555556
decode: { enumerable: true },
556557
[inspect]: { enumerable: false },
557-
[Symbol.toStringTag]: {
558+
[SymbolToStringTag]: {
558559
configurable: true,
559560
value: 'TextDecoder'
560561
}
Collapse file

‎lib/internal/url.js‎

Copy file name to clipboardExpand all lines: lib/internal/url.js
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const {
1313
ReflectOwnKeys,
1414
Symbol,
1515
SymbolIterator,
16+
SymbolToStringTag,
1617
} = primordials;
1718

1819
const { inspect } = require('internal/util/inspect');
@@ -431,7 +432,7 @@ ObjectDefineProperties(URL.prototype, {
431432
return ret;
432433
}
433434
},
434-
[Symbol.toStringTag]: {
435+
[SymbolToStringTag]: {
435436
configurable: true,
436437
value: 'URL'
437438
},
@@ -859,7 +860,7 @@ function serializeParams(array) {
859860
// Mainly to mitigate func-name-matching ESLint rule
860861
function defineIDLClass(proto, classStr, obj) {
861862
// https://heycam.github.io/webidl/#dfn-class-string
862-
ObjectDefineProperty(proto, Symbol.toStringTag, {
863+
ObjectDefineProperty(proto, SymbolToStringTag, {
863864
writable: false,
864865
enumerable: false,
865866
configurable: true,
@@ -1244,7 +1245,7 @@ defineIDLClass(URLSearchParamsIteratorPrototype, 'URLSearchParams Iterator', {
12441245
} else {
12451246
outputStr = ` ${outputStrs.join(', ')}`;
12461247
}
1247-
return `${this[Symbol.toStringTag]} {${outputStr} }`;
1248+
return `${this[SymbolToStringTag]} {${outputStr} }`;
12481249
}
12491250
});
12501251

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.