Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Nov 7, 2023
1 parent 7eb772b commit a08e933
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/index.js.map

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions format/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,15 @@ var isString = require( './is_string.js' );
* // returns 'Pi: ~3.14'
*/
function format( str ) {
var tokens;
var args;
var i;

if ( !isString( str ) ) {
throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );
}
tokens = tokenize( str );
args = new Array( arguments.length );
args[ 0 ] = tokens;
for ( i = 1; i < args.length; i++ ) {
args[ i ] = arguments[ i ];
args = [ tokenize( str ) ];
for ( i = 1; i < arguments.length; i++ ) {
args.push( arguments[ i ] );
}
return interpolate.apply( null, args );
}
Expand Down

0 comments on commit a08e933

Please sign in to comment.