8000 Transform error messages · stdlib-js/utils-until@face99c · GitHub
[go: up one dir, main page]

Skip to content

Commit face99c

Browse files
committed
Transform error messages
1 parent 63316fc commit face99c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/main.js

Lines changed: 3 additions & 3 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 //
@@ -49,10 +49,10 @@ var format = require( '@stdlib/string-format' );
4949
function until( predicate, fcn, thisArg ) {
5050
var i;
5151
if ( !isFunction( predicate ) ) {
52-
throw new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );
52+
throw new TypeError( format( '1YF3c', predicate ) );
5353
}
5454
if ( !isFunction( fcn ) ) {
55-
throw new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', fcn ) );
55+
throw new TypeError( format( '1YF2H', fcn ) );
5656
}
5757
i = 0;
5858
while ( !predicate( i ) ) {

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