@@ -1165,7 +1165,7 @@ function formatPrimitive(fn, value, ctx) {
1165
1165
1166
1166
function formatNamespaceObject ( ctx , value , recurseTimes , keys ) {
1167
1167
const output = new Array ( keys . length ) ;
1168
- for ( var i = 0 ; i < keys . length ; i ++ ) {
1168
+ for ( let i = 0 ; i < keys . length ; i ++ ) {
1169
1169
try {
1170
1170
output [ i ] = formatProperty ( ctx , value , recurseTimes , keys [ i ] ,
1171
1171
kObjectType ) ;
@@ -1253,7 +1253,7 @@ function formatArray(ctx, value, recurseTimes) {
1253
1253
1254
1254
const remaining = valLen - len ;
1255
1255
const output = [ ] ;
1256
- for ( var i = 0 ; i < len ; i ++ ) {
1256
+ for ( let i = 0 ; i < len ; i ++ ) {
1257
1257
// Special handle sparse arrays.
1258
1258
if ( ! ObjectPrototypeHasOwnProperty ( value , i ) ) {
1259
1259
return formatSpecialArray ( ctx , value , recurseTimes , len , output , i ) ;
@@ -1329,7 +1329,7 @@ function formatSetIterInner(ctx, recurseTimes, entries, state) {
1329
1329
const maxLength = MathMin ( maxArrayLength , entries . length ) ;
1330
1330
let output = new Array ( maxLength ) ;
1331
1331
ctx . indentationLvl += 2 ;
1332
- for ( var i = 0 ; i < maxLength ; i ++ ) {
1332
+ for ( let i = 0 ; i < maxLength ; i ++ ) {
1333
1333
output [ i ] = formatValue ( ctx , entries [ i ] , recurseTimes ) ;
1334
1334
}
1335
1335
ctx . indentationLvl -= 2 ;
@@ -1497,7 +1497,7 @@ function isBelowBreakLength(ctx, output, start, base) {
1497
1497
let totalLength = output . length + start ;
1498
1498
if ( totalLength + output . length > ctx . breakLength )
1499
1499
return false ;
1500
- for ( var i = 0 ; i < output . length ; i ++ ) {
1500
+ for ( let i = 0 ; i < output . length ; i ++ ) {
1501
1501
if ( ctx . colors ) {
1502
1502
totalLength += removeColors ( output [ i ] ) . length ;
1503
1503
} else {
@@ -1618,7 +1618,7 @@ function formatWithOptionsInternal(inspectOptions, ...args) {
1618
1618
let tempStr ;
1619
1619
let lastPos = 0 ;
1620
1620
1621
- for ( var i = 0 ; i < first . length - 1 ; i ++ ) {
1621
+ for ( let i = 0 ; i < first . length - 1 ; i ++ ) {
1622
1622
if ( first . charCodeAt ( i ) === 37 ) { // '%'
1623
1623
const nextChar = first . charCodeAt ( ++ i ) ;
1624
1624
if ( a + 1 !== args . length ) {
0 commit comments