Skip to content

Commit 8dcbfe8

Browse files
committed
Transform error messages
1 parent bcf65f4 commit 8dcbfe8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
var PINF = require( '@stdlib/constants-float64-pinf' );
2424
var NINF = require( '@stdlib/constants-float64-ninf' );
25-
var format = require( '@stdlib/string-format' );
25+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
2626

2727

2828
// MAIN //
@@ -40,7 +40,7 @@ var format = require( '@stdlib/string-format' );
4040
*/
4141
function number2json( x ) {
4242
if ( typeof x !== 'number' ) {
43-
throw new TypeError( format( 'invalid argument. Must provide a number. Value: `%s`.', x ) );
43+
throw new TypeError( format( '1dn9X', x ) );
4444
}
4545
if ( x !== x ) {
4646
return {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"dependencies": {
4040
"@stdlib/constants-float64-ninf": "^0.2.2",
4141
"@stdlib/constants-float64-pinf": "^0.2.2",
42-
"@stdlib/string-format": "^0.2.2",
42+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
4343
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
4444
},
4545
"devDependencies": {

0 commit comments

Comments
 (0)