File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -63,30 +63,30 @@ function singleQuoteEscape (value) {
6363 *
6464 * @returns {string } Formatted string
6565 */
66- exports . format = function format ( value , ...format ) {
66+ exports . format = function format ( value , ...formatVariables ) {
6767 if ( typeof value !== 'string' ) return ''
6868
6969 let i = 0
7070 value = value . replace ( / (?< ! % ) % ( [ s d i f j o O c v ] | q [ s d ] ) / g, ( m ) => {
7171 // JSON-stringify
7272 if ( m === '%v' ) {
73- const [ elem ] = format . splice ( i , 1 )
73+ const [ elem ] = formatVariables . splice ( i , 1 )
7474 return JSON . stringify ( elem )
7575 }
7676 // Escape for double-quoted string
7777 if ( m === '%qd' ) {
78- const [ elem ] = format . splice ( i , 1 )
78+ const [ elem ] = formatVariables . splice ( i , 1 )
7979 return doubleQuoteEscape ( elem )
8080 }
8181 // Escape for single-quoted string
8282 if ( m === '%qs' ) {
83- const [ elem ] = format . splice ( i , 1 )
83+ const [ elem ] = formatVariables . splice ( i , 1 )
8484 return singleQuoteEscape ( elem )
8585 }
8686 i += 1
8787 return m
8888 } )
8989
90- const ret = util . format ( value , ...format )
90+ const ret = util . format ( value , ...formatVariables )
9191 return ret
9292}
You can’t perform that action at this time.
0 commit comments