8000 Transform error messages · stdlib-js/ndarray-flags@3a565b0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3a565b0

Browse files
committed
Transform error messages
1 parent 26f3126 commit 3a565b0

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
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// MODULES //
2222

2323
var base = require( '@stdlib/ndarray-base-flags' );
24-
var format = require( '@stdlib/string-format' );
24+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
2525

2626

2727
// MAIN //
@@ -42,7 +42,7 @@ var format = require( '@stdlib/string-format' );
4242
function flags( x ) {
4343
// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...
4444
if ( typeof x !== 'object' || x === null ) {
45-
throw new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );
45+
throw new TypeError( format( '1nzDv', x ) );
4646
}
4747
return base( x, true );
4848
}

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/ndarray-base-flags": "^0.2.2",
41-
"@stdlib/string-format": "^0.2.2",
41+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
4242
"@stdlib/types": "^0.4.3",
4343
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
4444
},

0 commit comments

Comments
 (0)
0