diff options
author | Sebastien Ahkrin <sebastien48criquet@gmail.com> | 2019-12-11 23:08:38 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-12-13 23:15:21 +0300 |
commit | ac1cc5c254e604db83d690a5bc858dd4082916b8 (patch) | |
tree | cd159d3d34e58f1ac38649ff43404fb31b7cc6a6 /lib/internal/encoding.js | |
parent | fb8b483c34884a60814471fc97ccc33a87589351 (diff) |
lib: update Symbol.toStringTag by SymbolToStringTag primordial
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'lib/internal/encoding.js')
-rw-r--r-- | lib/internal/encoding.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/internal/encoding.js b/lib/internal/encoding.js index c053a3cfa31..927fd5afc5a 100644 --- a/lib/internal/encoding.js +++ b/lib/internal/encoding.js @@ -8,6 +8,7 @@ const { ObjectDefineProperties, ObjectGetOwnPropertyDescriptors, Symbol, + SymbolToStringTag, } = primordials; const { @@ -358,7 +359,7 @@ ObjectDefineProperties( 'encode': { enumerable: true }, 'encodeInto': { enumerable: true }, 'encoding': { enumerable: true }, - [Symbol.toStringTag]: { + [SymbolToStringTag]: { configurable: true, value: 'TextEncoder' } }); @@ -554,7 +555,7 @@ function makeTextDecoderJS() { ObjectDefineProperties(TextDecoder.prototype, { decode: { enumerable: true }, [inspect]: { enumerable: false }, - [Symbol.toStringTag]: { + [SymbolToStringTag]: { configurable: true, value: 'TextDecoder' } |