Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2017-10-03 00:42:55 +0300
committerJames M Snell <jasnell@gmail.com>2017-10-24 07:12:56 +0300
commit7f9eb4c29c38e2c49209230ebf29aa486aed9aca (patch)
tree52978f26dafb7386c26998048d92af998562cae2 /lib/internal/encoding.js
parentb8bc652869683cfb9a22fc4a1b8780d376fff429 (diff)
util: graduate TextEncoder/TextDecoder, tests
Add tests ported from Web Platform Tests. Graduate TextEncoder / TextDecoder from experimental PR-URL: https://github.com/nodejs/node/pull/15743 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'lib/internal/encoding.js')
-rw-r--r--lib/internal/encoding.js20
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/internal/encoding.js b/lib/internal/encoding.js
index 5c2e2072587..09242be8dcf 100644
--- a/lib/internal/encoding.js
+++ b/lib/internal/encoding.js
@@ -10,11 +10,6 @@ const kEncoding = Symbol('encoding');
const kDecoder = Symbol('decoder');
const kEncoder = Symbol('encoder');
-let warned = false;
-const experimental =
- 'The WHATWG Encoding Standard implementation is an experimental API. It ' +
- 'should not yet be used in production applications.';
-
const {
getConstructorOf,
customInspectSymbol: inspect
@@ -289,11 +284,6 @@ function getEncodingFromLabel(label) {
class TextEncoder {
constructor() {
- if (!warned) {
- warned = true;
- process.emitWarning(experimental, 'ExperimentalWarning');
- }
-
this[kEncoder] = true;
}
@@ -353,11 +343,6 @@ function makeTextDecoderICU() {
class TextDecoder {
constructor(encoding = 'utf-8', options = {}) {
- if (!warned) {
- warned = true;
- process.emitWarning(experimental, 'ExperimentalWarning');
- }
-
encoding = `${encoding}`;
if (typeof options !== 'object')
throw new errors.Error('ERR_INVALID_ARG_TYPE', 'options', 'object');
@@ -430,11 +415,6 @@ function makeTextDecoderJS() {
class TextDecoder {
constructor(encoding = 'utf-8', options = {}) {
- if (!warned) {
- warned = true;
- process.emitWarning(experimental, 'ExperimentalWarning');
- }
-
encoding = `${encoding}`;
if (typeof options !== 'object')
throw new errors.Error('ERR_INVALID_ARG_TYPE', 'options', 'object');