Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 88b83c1

Browse filesBrowse files
committed
Transform error messages
1 parent 4d8e361 commit 88b83c1
Copy full SHA for 88b83c1

File tree

2 files changed

+3
-3
lines changed
Filter options

2 files changed

+3
-3
lines changed

‎lib/main.js

Copy file name to clipboardExpand all lines: lib/main.js
+2-2Lines 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

Copy file name to clipboardExpand all lines: package.json
+1-1Lines 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.3",
6161
"@stdlib/utils-constructor-name": "^0.2.2",
6262
"@stdlib/utils-get-prototype-of": "^0.2.2",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.