File tree 1 file changed +3
-10
lines changed
1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -341,21 +341,15 @@ Object.defineProperties(
341
341
value : 'TextEncoder'
342
342
} } ) ;
343
343
344
- const { hasConverter , TextDecoder } =
344
+ const TextDecoder =
345
345
process . binding ( 'config' ) . hasIntl ?
346
346
makeTextDecoderICU ( ) :
347
347
makeTextDecoderJS ( ) ;
348
348
349
- function hasTextDecoder ( encoding = 'utf-8' ) {
350
- validateArgument ( encoding , 'string' , 'encoding' , 'string' ) ;
351
- return hasConverter ( getEncodingFromLabel ( encoding ) ) ;
352
- }
353
-
354
349
function makeTextDecoderICU ( ) {
355
350
const {
356
351
decode : _decode ,
357
352
getConverter,
358
- hasConverter
359
353
} = internalBinding ( 'icu' ) ;
360
354
361
355
class TextDecoder {
@@ -409,7 +403,7 @@ function makeTextDecoderICU() {
409
403
}
410
404
}
411
405
412
- return { hasConverter , TextDecoder } ;
406
+ return TextDecoder ;
413
407
}
414
408
415
409
function makeTextDecoderJS ( ) {
@@ -497,7 +491,7 @@ function makeTextDecoderJS() {
497
491
}
498
492
}
499
493
500
- return { hasConverter , TextDecoder } ;
494
+ return TextDecoder ;
501
495
}
502
496
503
497
// Mix in some shared properties.
@@ -552,7 +546,6 @@ function makeTextDecoderJS() {
552
546
553
547
module . exports = {
554
548
getEncodingFromLabel,
555
- hasTextDecoder,
556
549
TextDecoder,
557
550
TextEncoder
558
551
} ;
You can’t perform that action at this time.
0 commit comments