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

Skip to content

Commit 2ceacf8

Browse files
committed
Transform error messages
1 parent efa3a44 commit 2ceacf8

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
@@ -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 //
@@ -54,10 +54,10 @@ function forEachRight( collection, fcn, thisArg ) {
5454
var len;
5555
var i;
5656
if ( !isCollection( collection ) ) {
57-
throw new TypeError( format( 'invalid argument. First argument must be a collection. Value: `%s`.', collection ) );
57+
throw new TypeError( format( '1TvAh', collection ) );
5858
}
5959
if ( !isFunction( fcn ) ) {
60-
throw new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', fcn ) );
60+
throw new TypeError( format( '1Tv2H', fcn ) );
6161
}
6262
len = collection.length;
6363
for ( i = len-1; i >= 0; i-- ) {

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.1",
4444
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
4545
},

0 commit comments

Comments
 (0)
0