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

Skip to content

Commit fd7995b

Browse files
committed
Transform error messages
1 parent a143003 commit fd7995b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/main.js

Expand all lines: 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 //
@@ -52,10 +52,10 @@ function noneBy( collection, predicate, thisArg ) {
5252
var len;
5353
var i;
5454
if ( !isCollection( collection ) ) {
55-
throw new TypeError( format( 'invalid argument. First argument must be a collection. Value: `%s`.', collection ) );
55+
throw new TypeError( format( '1VzAh', collection ) );
5656
}
5757
if ( !isFunction( predicate ) ) {
58-
throw new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', predicate ) );
58+
throw new TypeError( format( '1Vz2H', predicate ) );
5959
}
6060
len = collection.length;
6161
for ( i = 0; i < len; 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