@@ -36,7 +36,7 @@ const {
36
36
encodeUtf8String
37
37
} = internalBinding ( 'buffer' ) ;
38
38
39
- var Buffer ;
39
+ let Buffer ;
40
40
function lazyBuffer ( ) {
41
41
if ( Buffer === undefined )
42
42
Buffer = require ( 'buffer' ) . Buffer ;
@@ -281,8 +281,8 @@ const encodings = new Map([
281
281
// Unfortunately, String.prototype.trim also removes non-ascii whitespace,
282
282
// so we have to do this manually
283
283
function trimAsciiWhitespace ( label ) {
284
- var s = 0 ;
285
- var e = label . length ;
284
+ let s = 0 ;
285
+ let e = label . length ;
286
286
while ( s < e && (
287
287
label [ s ] === '\u0009' ||
288
288
label [ s ] === '\u000a' ||
@@ -378,7 +378,7 @@ function makeTextDecoderICU() {
378
378
if ( enc === undefined )
379
379
throw new ERR_ENCODING_NOT_SUPPORTED ( encoding ) ;
380
380
381
- var flags = 0 ;
381
+ let flags = 0 ;
382
382
if ( options !== null ) {
383
383
flags |= options . fatal ? CONVERTER_FLAGS_FATAL : 0 ;
384
384
flags |= options . ignoreBOM ? CONVERTER_FLAGS_IGNORE_BOM : 0 ;
@@ -406,7 +406,7 @@ function makeTextDecoderICU() {
406
406
}
407
407
validateArgument ( options , 'object' , 'options' , 'Object' ) ;
408
408
409
- var flags = 0 ;
409
+ let flags = 0 ;
410
410
if ( options !== null )
411
411
flags |= options . stream ? 0 : CONVERTER_FLAGS_FLUSH ;
412
412
@@ -422,7 +422,7 @@ function makeTextDecoderICU() {
422
422
}
423
423
424
424
function makeTextDecoderJS ( ) {
425
- var StringDecoder ;
425
+ let StringDecoder ;
426
426
function lazyStringDecoder ( ) {
427
427
if ( StringDecoder === undefined )
428
428
( { StringDecoder } = require ( 'string_decoder' ) ) ;
@@ -444,7 +444,7 @@ function makeTextDecoderJS() {
444
444
if ( enc === undefined || ! hasConverter ( enc ) )
445
445
throw new ERR_ENCODING_NOT_SUPPORTED ( encoding ) ;
446
446
447
- var flags = 0 ;
447
+ let flags = 0 ;
448
448
if ( options !== null ) {
449
449
if ( options . fatal ) {
450
450
throw new ERR_NO_ICU ( '"fatal" option' ) ;
0 commit comments