8000 Transform error messages · stdlib-js/utils-async-do-while@0179054 · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0179054

Browse files
committed
Transform error messages
1 parent 6b93b86 commit 0179054

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 //
@@ -62,13 +62,13 @@ function doWhileAsync( fcn, predicate, done, thisArg ) {
6262
var args;
6363
var idx;
6464
if ( !isFunction( fcn ) ) {
65-
throw new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );
65+
throw new TypeError( format( '1R13c', fcn ) );
6666
}
6767
if ( !isFunction( predicate ) ) {
68-
throw new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', predicate ) );
68+
throw new TypeError( format( '1R12H', predicate ) );
6969
}
7070
if ( !isFunction( done ) ) {
71-
throw new TypeError( format( 'invalid argument. Third argument must be a function. Value: `%s`.', done ) );
71+
throw new TypeError( format( '1R13N', done ) );
7272
}
7373
args = [];
7474
idx = 0;

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