File tree Expand file tree Collapse file tree 1 file changed +22
-20
lines changed
utils/editors/js-console/html/output-console/v2.0 Expand file tree Collapse file tree 1 file changed +22
-20
lines changed Original file line number Diff line number Diff line change 684684
685685 function format ( args ) {
686686
687- if ( typeof args [ 0 ] !== "string" ) return args ;
688-
689- let fmt = args [ 0 ] ;
690- let out = [ ] ;
691- let argIndex = 1 ;
692-
693- out . push ( fmt . replace ( / % [ s d i f o O ] / g, ( match ) => {
694-
695- const val = args [ argIndex ++ ] ;
696- switch ( match ) {
697- case "%s" : return '' + val ;
698- case "%d" :
699- case "%i" : return parseInt ( val , 10 ) ;
700- case "%f" : return parseFloat ( val ) ;
701- case "%o" :
702- case "%O" : return format . fn ( val ) ;
703- default :
704- return match ;
705- }
706-
687+ if ( typeof args [ 0 ] !== 'string' ) return args ;
688+
689+ let fmt = args [ 0 ] ;
690+ let out = [ ] ;
691+ let argIndex = 1 ;
692+
693+ out . push ( fmt . replace ( / % [ s d i f o O ] / g, match => {
694+
695+ var val = args [ argIndex ++ ] ;
696+
697+ switch ( match ) {
698+
699+ case "%s" : return '' + val ;
700+ case "%d" :
701+ case "%i" : return parseInt ( val , 10 ) ;
702+ case "%f" : return parseFloat ( val ) ;
703+ case "%o" :
704+ case "%O" : return format . fn ( val ) ;
705+ default : return match ;
706+
707+ } //switch
708+
707709 } ) ) ;
708710
709711 // Append any remaining args
You can’t perform that action at this time.
0 commit comments