@@ -682,12 +682,13 @@ function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
682
682
if ( remaining > 0 ) {
683
683
output . push ( `... ${ remaining } more item${ remaining > 1 ? 's' : '' } ` ) ;
684
684
}
685
- keys . forEach ( function ( key ) {
685
+ for ( var n = 0 ; n < keys . length ; n ++ ) {
686
+ var key = keys [ n ] ;
686
687
if ( typeof key === 'symbol' || ! key . match ( / ^ \d + $ / ) ) {
687
688
output . push ( formatProperty ( ctx , value , recurseTimes , visibleKeys ,
688
689
key , true ) ) ;
689
690
}
690
- } ) ;
691
+ }
691
692
return output ;
692
693
}
693
694
@@ -718,10 +719,10 @@ function formatSet(ctx, value, recurseTimes, visibleKeys, keys) {
718
719
var str = formatValue ( ctx , v , nextRecurseTimes ) ;
719
720
output . push ( str ) ;
720
721
} ) ;
721
- keys . forEach ( function ( key ) {
722
+ for ( var n = 0 ; n < keys . length ; n ++ ) {
722
723
output . push ( formatProperty ( ctx , value , recurseTimes , visibleKeys ,
723
- key , false ) ) ;
724
- } ) ;
724
+ keys [ n ] , false ) ) ;
725
+ }
725
726
return output ;
726
727
}
727
728
@@ -735,10 +736,10 @@ function formatMap(ctx, value, recurseTimes, visibleKeys, keys) {
735
736
str += formatValue ( ctx , v , nextRecurseTimes ) ;
736
737
output . push ( str ) ;
737
738
} ) ;
738
- keys . forEach ( function ( key ) {
739
+ for ( var n = 0 ; n < keys . length ; n ++ ) {
739
740
output . push ( formatProperty ( ctx , value , recurseTimes , visibleKeys ,
740
- key , false ) ) ;
741
- } ) ;
741
+ keys [ n ] , false ) ) ;
742
+ }
742
743
return output ;
743
744
}
744
745
@@ -768,10 +769,10 @@ function formatPromise(ctx, value, recurseTimes, visibleKeys, keys) {
768
769
output . push ( str ) ;
769
770
}
770
771
}
771
- keys . forEach ( function ( key ) {
772
+ for ( var n = 0 ; n < keys . length ; n ++ ) {
772
773
output . push ( formatProperty ( ctx , value , recurseTimes , visibleKeys ,
773
- key , false ) ) ;
774
- } ) ;
774
+ keys [ n ] , false ) ) ;
775
+ }
775
776
return output ;
776
777
}
777
778
0 commit comments