File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -341,22 +341,16 @@ Object.defineProperties(
341341 value : 'TextEncoder'
342342 } } ) ;
343343
344- const { hasConverter , TextDecoder } =
344+ const TextDecoder =
345345 process . binding ( 'config' ) . hasIntl ?
346346 makeTextDecoderICU ( ) :
347347 makeTextDecoderJS ( ) ;
348348
349- function hasTextDecoder ( encoding = 'utf-8' ) {
350- validateArgument ( encoding , 'string' , 'encoding' , 'string' ) ;
351- return hasConverter ( getEncodingFromLabel ( encoding ) ) ;
352- }
353-
354349function makeTextDecoderICU ( ) {
355350 const {
356351 decode : _decode ,
357352 getConverter,
358- hasConverter
359- } = process . binding ( 'icu' ) ;
353+ } = internalBinding ( 'icu' ) ;
360354
361355 class TextDecoder {
362356 constructor ( encoding = 'utf-8' , options = { } ) {
@@ -409,7 +403,7 @@ function makeTextDecoderICU() {
409403 }
410404 }
411405
412- return { hasConverter , TextDecoder } ;
406+ return TextDecoder ;
413407}
414408
415409function makeTextDecoderJS ( ) {
@@ -497,7 +491,7 @@ function makeTextDecoderJS() {
497491 }
498492 }
499493
500- return { hasConverter , TextDecoder } ;
494+ return TextDecoder ;
501495}
502496
503497// Mix in some shared properties.
@@ -552,7 +546,6 @@ function makeTextDecoderJS() {
552546
553547module . exports = {
554548 getEncodingFromLabel,
555- hasTextDecoder,
556549 TextDecoder,
557550 TextEncoder
558551} ;
You can’t perform that action at this time.
0 commit comments