File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
extension/src/json-viewer Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -10,32 +10,31 @@ jsl.format = (function () {
1010 function repeat ( s , count ) {
1111 return new Array ( count + 1 ) . join ( s ) ;
1212 }
13- function getSizeOfArray ( jsonstring , startingposition ) {
14- var result ;
15- var currentposition = startingposition + 1 ;
13+ function getSizeOfArray ( jsonString , startingPosition ) {
14+ var currentPosition = startingPosition + 1 ;
1615 var inString = false ;
17- var num_opened = 1 ;
16+ var numOpened = 1 ;
1817 try {
19- while ( num_opened > 0 && currentposition < jsonstring . length ) {
20- var currentChar = jsonstring . charAt ( currentposition )
18+ while ( numOpened > 0 && currentPosition < jsonString . length ) {
19+ var currentChar = jsonString . charAt ( currentPosition )
2120 switch ( currentChar ) {
2221 case '[' :
2322 if ( ! inString ) {
24- num_opened ++ ;
23+ numOpened ++ ;
2524 }
2625 break ;
2726 case ']' :
2827 if ( ! inString ) {
29- num_opened -- ;
28+ numOpened -- ;
3029 }
3130 break ;
3231 case '"' :
3332 inString = ! inString ;
3433 break ;
3534 }
36- currentposition ++ ;
35+ currentPosition ++ ;
3736 }
38- return JSON . parse ( jsonstring . substring ( startingposition , currentposition ) ) . length ;
37+ return JSON . parse ( jsonString . substring ( startingPosition , currentPosition ) ) . length ;
3938 }
4039 catch ( err ) {
4140 return null ;
You can’t perform that action at this time.
0 commit comments