8000 Transform error messages · stdlib-js/complex-float64-parse@360ac79 · GitHub
[go: up one dir, main page]

Skip to content

Commit 360ac79

Browse files
committed
Transform error messages
1 parent bf81c63 commit 360ac79

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
@@ -23,7 +23,7 @@
2323
var Complex128 = require( '@stdlib/complex-float64-ctor' );
2424
var isString = require( '@stdlib/assert-is-string' ).isPrimitive;
2525
var replace = require( '@stdlib/string-base-replace' );
26-
var format = require( '@stdlib/string-format' );
26+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
2727

2828

2929
// FUNCTIONS //
@@ -64,7 +64,7 @@ function parseComplex128( str ) {
6464
var im = 0;
6565

6666
if ( !isString( str ) ) {
67-
throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );
67+
throw new TypeError( format( 'null3F', str ) );
6868
}
6969

7070
match = replace( str, /\s/g, '' ).match( regexp() );

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"@stdlib/assert-is-string": "^0.2.2",
4141
"@stdlib/complex-float64-ctor": "^0.0.3",
4242
"@stdlib/string-base-replace": "^0.2.2",
43-
"@stdlib/string-format": "^0.2.2",
43+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
4444
"@stdlib/types": "^0.4.1",
4545
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
4646
},

0 commit comments

Comments
 (0)
0