Skip to content

Commit 636d18d

Browse files
committed
Rename package
1 parent eb64c84 commit 636d18d

File tree

19 files changed

+169
-169
lines changed

19 files changed

+169
-169
lines changed

lib/node_modules/@stdlib/string/sprintf/README.md renamed to lib/node_modules/@stdlib/string/format/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ limitations under the License.
1818
1919
-->
2020

21-
# sprintf
21+
# format
2222

2323
> Insert supplied variable values into a format string.
2424
@@ -33,16 +33,16 @@ limitations under the License.
3333
## Usage
3434

3535
```javascript
36-
var sprintf = require( '@stdlib/string/sprintf' );
36+
var format = require( '@stdlib/string/format' );
3737
```
3838

39-
#### sprintf( str, ...args )
39+
#### format( str, ...args )
4040

4141
Inserts supplied variable values into a format string.
4242

4343
```javascript
4444
var str = 'Hello, %s! My name is %s.';
45-
var out = sprintf( str, 'world', 'Bob' );
45+
var out = format( str, 'world', 'Bob' );
4646
// returns 'Hello, world! My name is Bob.'
4747
```
4848

@@ -76,21 +76,21 @@ The format string is a string literal containing zero or more conversion specifi
7676
<!-- eslint no-undef: "error" -->
7777

7878
```javascript
79-
var sprintf = require( '@stdlib/string/sprintf' );
79+
var format = require( '@stdlib/string/format' );
8080

81-
var out = sprintf( '%s %s!', 'Hello', 'World' );
81+
var out = format( '%s %s!', 'Hello', 'World' );
8282
// returns 'Hello World!'
8383

84-
out = sprintf( 'Pi: ~%.2f', 3.141592653589793 );
84+
out = format( 'Pi: ~%.2f', 3.141592653589793 );
8585
// returns 'Pi: ~3.14'
8686

87-
out = sprintf( '%-10s %-10s', 'a', 'b' );
87+
out = format( '%-10s %-10s', 'a', 'b' );
8888
// returns 'a b '
8989

90-
out = sprintf( '%10s %10s', 'a', 'b' );
90+
out = format( '%10s %10s', 'a', 'b' );
9191
// returns ' a b'
9292

93-
out = sprintf( '%2$s %1$s %3$s', 'b', 'a', 'c' );
93+
out = format( '%2$s %1$s %3$s', 'b', 'a', 'c' );
9494
// returns 'a b c'
9595
```
9696

lib/node_modules/@stdlib/string/sprintf/benchmark/benchmark.js renamed to lib/node_modules/@stdlib/string/format/benchmark/benchmark.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
var bench = require( '@stdlib/bench' );
2424
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
2525
var pkg = require( './../package.json' ).name;
26-
var sprintf = require( './../lib' );
26+
var format = require( './../lib' );
2727

2828

2929
// MAIN //
@@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) {
3737

3838
b.tic();
3939
for ( i = 0; i < b.iterations; i++ ) {
40-
out = sprintf( str, 'Hello', 'World' );
40+
out = format( str, 'Hello', 'World' );
4141
if ( !isString( out ) ) {
4242
b.fail( 'should return a string' );
4343
}
@@ -59,7 +59,7 @@ bench( pkg+'::positional', function benchmark( b ) {
5959

6060
b.tic();
6161
for ( i = 0; i < b.iterations; i++ ) {
62-
out = sprintf( str, 'World', 'Hello' );
62+
out = format( str, 'World', 'Hello' );
6363
if ( !isString( out ) ) {
6464
b.fail( 'should return a string' );
6565
}
File renamed without changes.

lib/node_modules/@stdlib/string/sprintf/examples/index.js renamed to lib/node_modules/@stdlib/string/format/examples/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,24 @@
1818

1919
'use strict';
2020

21-
var sprintf = require( './../lib' );
21+
var format = require( './../lib' );
2222

23-
var out = sprintf( '%s %s!', 'Hello', 'World' );
23+
var out = format( '%s %s!', 'Hello', 'World' );
2424
console.log( out );
2525
// => 'Hello World!'
2626

27-
out = sprintf( 'Pi: ~%.2f', 3.141592653589793 );
27+
out = format( 'Pi: ~%.2f', 3.141592653589793 );
2828
console.log( out );
2929
// => 'Pi: ~3.14'
3030

31-
out = sprintf( '%-10s %-10s', 'a', 'b' );
31+
out = format( '%-10s %-10s', 'a', 'b' );
3232
console.log( out );
3333
// => 'a b '
3434

35-
out = sprintf( '%10s %10s', 'a', 'b' );
35+
out = format( '%10s %10s', 'a', 'b' );
3636
console.log( out );
3737
// => ' a b'
3838

39-
out = sprintf( '%2$s %1$s %3$s', 'b', 'a', 'c' );
39+
out = format( '%2$s %1$s %3$s', 'b', 'a', 'c' );
4040
console.log( out );
4141
// => 'a b c'

lib/node_modules/@stdlib/string/sprintf/lib/format_double.js renamed to lib/node_modules/@stdlib/string/format/lib/format_double.js

File renamed without changes.

lib/node_modules/@stdlib/string/sprintf/lib/format_integer.js renamed to lib/node_modules/@stdlib/string/format/lib/format_integer.js

File renamed without changes.

lib/node_modules/@stdlib/string/sprintf/lib/index.js renamed to lib/node_modules/@stdlib/string/format/lib/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@
2121
/**
2222
* Insert supplied variable values into a format string.
2323
*
24-
* @module @stdlib/string/sprintf
24+
* @module @stdlib/string/format
2525
*
2626
* @example
27-
* var sprintf = require( '@stdlib/string/sprintf' );
27+
* var format = require( '@stdlib/string/format' );
2828
*
29-
* var out = sprintf( '%s %s!', 'Hello', 'World' );
29+
* var out = format( '%s %s!', 'Hello', 'World' );
3030
* // returns 'Hello World!'
3131
*
32-
* out = sprintf( 'Pi: ~%.2f', 3.141592653589793 );
32+
* out = format( 'Pi: ~%.2f', 3.141592653589793 );
3333
* // returns 'Pi: ~3.14'
3434
*/
3535

3636
// MODULES //
3737

38-
var sprintf = require( './main.js' );
38+
var format = require( './main.js' );
3939

4040

4141
// EXPORTS //
4242

43-
module.exports = sprintf;
43+
module.exports = format;

lib/node_modules/@stdlib/string/sprintf/lib/main.js renamed to lib/node_modules/@stdlib/string/format/lib/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ var fromCharCode = String.fromCharCode;
4747
* @returns {string} formatted string
4848
*
4949
* @example
50-
* var str = sprintf( 'Hello %s!', 'world' );
50+
* var str = format( 'Hello %s!', 'world' );
5151
* // returns 'Hello world!'
5252
*
5353
* @example
54-
* var str = sprintf( 'Pi: ~%.2f', 3.141592653589793 );
54+
* var str = format( 'Pi: ~%.2f', 3.141592653589793 );
5555
* // returns 'Pi: ~3.14'
5656
*/
57-
function sprintf( str ) {
57+
function format( str ) {
5858
var tokens;
5959
var flags;
6060
var token;
@@ -191,4 +191,4 @@ function sprintf( str ) {
191191

192192
// EXPORTS //
193193

194-
module.exports = sprintf;
194+
module.exports = format;

lib/node_modules/@stdlib/string/sprintf/lib/space_pad.js renamed to lib/node_modules/@stdlib/string/format/lib/space_pad.js

File renamed without changes.

lib/node_modules/@stdlib/string/sprintf/lib/tokenize.js renamed to lib/node_modules/@stdlib/string/format/lib/tokenize.js

File renamed without changes.

0 commit comments

Comments
 (0)