@@ -36,7 +36,7 @@ const {
3636 encodeUtf8String
3737} = internalBinding ( 'buffer' ) ;
3838
39- var Buffer ;
39+ let Buffer ;
4040function lazyBuffer ( ) {
4141 if ( Buffer === undefined )
4242 Buffer = require ( 'buffer' ) . Buffer ;
@@ -281,8 +281,8 @@ const encodings = new Map([
281281// Unfortunately, String.prototype.trim also removes non-ascii whitespace,
282282// so we have to do this manually
283283function trimAsciiWhitespace ( label ) {
284- var s = 0 ;
285- var e = label . length ;
284+ let s = 0 ;
285+ let e = label . length ;
286286 while ( s < e && (
287287 label [ s ] === '\u0009' ||
288288 label [ s ] === '\u000a' ||
@@ -378,7 +378,7 @@ function makeTextDecoderICU() {
378378 if ( enc === undefined )
379379 throw new ERR_ENCODING_NOT_SUPPORTED ( encoding ) ;
380380
381- var flags = 0 ;
381+ let flags = 0 ;
382382 if ( options !== null ) {
383383 flags |= options . fatal ? CONVERTER_FLAGS_FATAL : 0 ;
384384 flags |= options . ignoreBOM ? CONVERTER_FLAGS_IGNORE_BOM : 0 ;
@@ -406,7 +406,7 @@ function makeTextDecoderICU() {
406406 }
407407 validateArgument ( options , 'object' , 'options' , 'Object' ) ;
408408
409- var flags = 0 ;
409+ let flags = 0 ;
410410 if ( options !== null )
411411 flags |= options . stream ? 0 : CONVERTER_FLAGS_FLUSH ;
412412
@@ -422,7 +422,7 @@ function makeTextDecoderICU() {
422422}
423423
424424function makeTextDecoderJS ( ) {
425- var StringDecoder ;
425+ let StringDecoder ;
426426 function lazyStringDecoder ( ) {
427427 if ( StringDecoder === undefined )
428428 ( { StringDecoder } = require ( 'string_decoder' ) ) ;
@@ -444,7 +444,7 @@ function makeTextDecoderJS() {
444444 if ( enc === undefined || ! hasConverter ( enc ) )
445445 throw new ERR_ENCODING_NOT_SUPPORTED ( encoding ) ;
446446
447- var flags = 0 ;
447+ let flags = 0 ;
448448 if ( options !== null ) {
449449 if ( options . fatal ) {
450450 throw new ERR_NO_ICU ( '"fatal" option' ) ;
0 commit comments