Skip to content

Commit 2a2bd0f

Browse files
committed
Transform error messages
1 parent 8f04447 commit 2a2bd0f

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
@@ -26,7 +26,7 @@ var isBooleanArray = require( '@stdlib/assert-is-booleanarray' );
2626
var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' );
2727
var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' );
2828
var reinterpretBoolean = require( '@stdlib/strided-base-reinterpret-boolean' );
29-
var format = require( '@stdlib/string-format' );
29+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
3030
var typeName = require( './type.js' );
3131

3232

@@ -68,7 +68,7 @@ function typedarray2json( arr ) {
6868
} else if ( isBooleanArray( arr ) ) {
6969
data = reinterpretBoolean( arr, 0 );
7070
} else {
71-
throw new TypeError( format( 'invalid argument. Must provide a typed array. Value: `%s`.', arr ) );
71+
throw new TypeError( format( '01b2x', arr ) );
7272
}
7373
out = {
7474
'type': typeName( arr ),

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"@stdlib/strided-base-reinterpret-boolean": "^0.0.2",
5757
"@stdlib/strided-base-reinterpret-complex128": "^0.2.2",
5858
"@stdlib/strided-base-reinterpret-complex64": "^0.2.1",
59-
"@stdlib/string-format": "^0.2.2",
59+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
6060
"@stdlib/types": "^0.4.1",
6161
"@stdlib/utils-constructor-name": "^0.2.2",
6262
"@stdlib/utils-get-prototype-of": "^0.2.2",

0 commit comments

Comments
 (0)