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

Skip to content

Commit ce07cf5

Browse files
committed
Transform error messages
1 parent ba7c38c commit ce07cf5

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
@@ -22,7 +22,7 @@
2222

2323
var isCollection = require( '@stdlib/assert-is-collection' );
2424
var isFunction = require( '@stdlib/assert-is-function' );
25-
var format = require( '@stdlib/string-format' );
25+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
2626

2727

2828
// MAIN //
@@ -60,13 +60,13 @@ function untilEachRight( collection, predicate, fcn, thisArg ) {
6060
var len;
6161
var i;
6262
if ( !isCollection( collection ) ) {
63-
throw new TypeError( format( 'invalid argument. First argument must be a collection. Value: `%s`.', collection ) );
63+
throw new TypeError( format( '1YBAh', collection ) );
6464
}
6565
if ( !isFunction( predicate ) ) {
66-
throw new < 8000 span class="pl-v">TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', predicate ) );
66+
throw new TypeError( format( '1YB2H', predicate ) );
6767
}
6868
if ( !isFunction( fcn ) ) {
69-
throw new TypeError( format( 'invalid argument. Third argument must be a function. Value: `%s`.', fcn ) );
69+
throw new TypeError( format( '1YB3N', fcn ) );
7070
}
7171
len = collection.length;
7272
i = len - 1;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"dependencies": {
4040
"@stdlib/assert-is-collection": "^0.2.2",
4141
"@stdlib/assert-is-function": "^0.2.2",
42-
"@stdlib/string-format": "^0.2.2",
42+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
4343
"@stdlib/types": "^0.4.3",
4444
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
4545
},

0 commit comments

Comments
 (0)
0