8000 Transform error messages · stdlib-js/ndarray-order@0e4981b · GitHub
[go: up one dir, main page]

Skip to content

Commit 0e4981b

Browse files
committed
Transform error messages
1 parent e939782 commit 0e4981b

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
@@ -24,7 +24,7 @@ var isOrder = require( '@stdlib/ndarray-base-assert-is-order' );
2424
var strides = require( '@stdlib/ndarray-strides' );
2525
var ndims = require( '@stdlib/ndarray-ndims' );
2626
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
27-
var format = require( '@stdlib/string-format' );
27+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
2828

2929

3030
// VARIABLES //
@@ -58,7 +58,7 @@ function order( x ) {
5858

5959
// 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...
6060
if ( typeof x !== 'object' || x === null ) {
61-
throw new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );
61+
throw new TypeError( format( '1kZDv', x ) );
6262
}
6363
o = x.order;
6464
if ( isOrder( o ) ) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@stdlib/ndarray-base-strides2order": "^0.2.2",
4242
"@stdlib/ndarray-ndims": "^0.2.2",
4343
"@stdlib/ndarray-strides": "^0.2.2",
44-
"@stdlib/string-format": "^0.2.2",
44+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
4545
"@stdlib/types": "^0.4.3",
4646
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
4747
},

0 commit comments

Comments
 (0)
0