8000 Transform error messages · stdlib-js/ndarray-to-array@ef116fe · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit ef116fe

Browse files
committed
Transform error messages
1 parent d5c630f commit ef116fe

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 isndarrayLike = require( '@stdlib/assert-is-ndarray-like' );
24-
var format = require( '@stdlib/string-format' );
24+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
2525
var toArray = require( '@stdlib/ndarray-base-to-array' );
2626

2727

@@ -50,7 +50,7 @@ var toArray = require( '@stdlib/ndarray-base-to-array' );
5050
*/
5151
function ndarray2array( arr ) {
5252
if ( !isndarrayLike( arr ) ) {
53-
throw new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', arr ) );
53+
throw new TypeError( format( '1dfKy', arr ) );
5454
}
5555
return toArray( arr.data, arr.shape, arr.strides, arr.offset, arr.order );
5656
}

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-ndarray-like": "^0.1.0",
4141
"@stdlib/ndarray-base-to-array": "^0.1.0",
42-
"@stdlib/string-format": "^0.1.0",
42+
"@stdlib/error-tools-fmtprodmsg": "^0.1.0",
4343
"@stdlib/types": "^0.1.0"
4444
},
4545
"devDependencies": {

0 commit comments

Comments
 (0)
0