Skip to content

Commit 70fcde8

Browse files
committed
Transform error messages
1 parent c2e1475 commit 70fcde8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var getOffset = require( '@stdlib/ndarray-offset' );
2727
var getShape = require( '@stdlib/ndarray-shape' );
2828
var getOrder = require( '@stdlib/ndarray-order' );
2929
var getData = require( '@stdlib/ndarray-data-buffer' );
30-
var format = require( '@stdlib/string-format' );
30+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
3131

3232

3333
// MAIN //
@@ -55,7 +55,7 @@ var format = require( '@stdlib/string-format' );
5555
*/
5656
function ndarray2array( x ) {
5757
if ( !isndarrayLike( x ) ) {
58-
throw new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );
58+
throw new TypeError( format( '1dfDv', x ) );
5959
}
6060
return toArray( getData( x ), getShape( x ), getStrides( x ), getOffset( x ), getOrder( x ) ); // eslint-disable-line max-len
6161
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@stdlib/ndarray-order": "^0.2.2",
4545
"@stdlib/ndarray-shape": "^0.2.2",
4646
"@stdlib/ndarray-strides": "^0.2.2",
47-
"@stdlib/string-format": "^0.2.2",
47+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
4848
"@stdlib/types": "^0.4.3",
4949
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
5050
},

0 commit comments

Comments
 (0)