Skip to content

Commit 282fa3f

Browse files
committed
Auto-generated commit
1 parent 73818e3 commit 282fa3f

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/main.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
var ceil = require( '@stdlib/math-base-special-ceil' );
2424
var isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;
2525
var isnan = require( '@stdlib/math-base-assert-is-nan' );
26+
var format = require( '@stdlib/string-format' );
2627
var MAX_LENGTH = require( '@stdlib/constants-uint32-max' );
2728
var gen = require( '@stdlib/array-base-incrspace' );
2829

@@ -49,17 +50,17 @@ function incrspace( x1, x2, increment ) {
4950
var len;
5051
var inc;
5152
if ( !isNumber( x1 ) || isnan( x1 ) ) {
52-
throw new TypeError( 'invalid argument. Start must be numeric. Value: `' + x1 + '`.' );
53+
throw new TypeError( format( 'invalid argument. Start must be numeric. Value: `%s`.', x1 ) );
5354
}
5455
if ( !isNumber( x2 ) || isnan( x2 ) ) {
55-
throw new TypeError( 'invalid argument. Stop must be numeric. Value: `' + x2 + '`.' );
56+
throw new TypeError( format( 'invalid argument. Stop must be numeric. Value: `%s`.', x2 ) );
5657
}
5758
if ( arguments.length < 3 ) {
5859
inc = 1;
5960
} else {
6061
inc = increment;
6162
if ( !isNumber( inc ) || isnan( inc ) ) {
62-
throw new TypeError( 'invalid argument. Increment must be numeric. Value: `' + inc + '`.' );
63+
throw new TypeError( format( 'invalid argument. Increment must be numeric. Value: `%s`.', inc ) );
6364
}
6465
}
6566
len = ceil( ( x2-x1 ) / inc );

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
"@stdlib/assert-is-number": "^0.0.x",
4242
"@stdlib/constants-uint32-max": "^0.0.x",
4343
"@stdlib/math-base-assert-is-nan": "^0.0.x",
44-
"@stdlib/math-base-special-ceil": "^0.0.x"
44+
"@stdlib/math-base-special-ceil": "^0.0.x",
45+
"@stdlib/string-format": "^0.0.x"
4546
},
4647
"devDependencies": {
4748
"@stdlib/assert-is-array": "^0.0.x",

0 commit comments

Comments
 (0)