8000 Transform error messages · stdlib-js/utils-async-try-then@149da3e · GitHub
[go: up one dir, main page]

Skip to content

Commit 149da3e

Browse files
committed
Transform error messages
1 parent 25de7a5 commit 149da3e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// MODULES //
2222

2323
var isFunction = require( '@stdlib/assert-is-function' );
24-
var format = require( '@stdlib/string-format' );
24+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
2525

2626

2727
// MAIN //
@@ -67,13 +67,13 @@ var format = require( '@stdlib/string-format' );
6767
*/
6868
function trythenAsync( x, y, done ) {
6969
if ( !isFunction( x ) ) {
70-
throw new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', x ) );
70+
throw new TypeError( format( '1Rn3c', x ) );
7171
}
7272
if ( !isFunction( y ) ) {
73-
throw new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', y ) );
73+
throw new TypeError( format( '1Rn2H', y ) );
7474
}
7575
if ( !isFunction( done ) ) {
76-
throw new TypeError( format( 'invalid argument. Last argument must be a function. Value: `%s`.', done ) );
76+
throw new TypeError( format( '1Rn3q', done ) );
7777
}
7878
x( clbk1 );
7979

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"dependencies": {
4040
"@stdlib/assert-is-function": "^0.2.2",
41-
"@stdlib/string-format": "^0.2.2",
41+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
4242
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
4343
},
4444
"devDependencies": {

0 commit comments

Comments
 (0)
0