8000 Transform error messages · stdlib-js/utils-function-name@9bc3960 · 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 9bc3960

Browse files
committed
Transform error messages
1 parent c73c8d0 commit 9bc3960

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/main.js

Lines changed: 2 additions & 2 deletions
Ori 8000 ginal file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
var isFunction = require( '@stdlib/assert-is-function' );
2424
var hasFunctionNameSupport = require( '@stdlib/assert-has-function-name-support' );
25-
var format = require( '@stdlib/string-format' );
25+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
2626
var RE = require( '@stdlib/regexp-function-name' ).REGEXP;
2727

2828

@@ -59,7 +59,7 @@ var isFunctionNameSupported = hasFunctionNameSupport();
5959
function functionName( fcn ) {
6060
// TODO: add support for generator functions?
6161
if ( isFunction( fcn ) === false ) {
62-
throw new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', fcn ) );
62+
throw new TypeError( format( '1U53J', fcn ) );
6363
}
6464
if ( isFunctionNameSupported ) {
6565
return fcn.name;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"@stdlib/assert-has-function-name-support": "^0.2.2",
4141
"@stdlib/assert-is-function": "^0.2.2",
4242
"@stdlib/regexp-function-name": "^0.2.2",
43-
"@stdlib/string-format": "^0.2.2",
43+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
4444
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
4545
},
4646
"devDependencies": {

0 commit comments

Comments
 (0)
0