8000 Auto-generated commit · stdlib-js/array-zeros-like@fcb8796 · GitHub
[go: up one dir, main page]

Skip to content

Commit fcb8796

Browse files
committed
Auto-generated commit
1 parent 037b9f7 commit fcb8796

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var format = require( '@stdlib/string-format' );
2324
var dtype = require( '@stdlib/array-dtype' );
2425
var zeros = require( '@stdlib/array-zeros' );
2526

@@ -46,7 +47,7 @@ var zeros = require( '@stdlib/array-zeros' );
4647
function zerosLike( x ) {
4748
var dt = dtype( x ); // delegate input argument validation to dtype resolution
4849
if ( dt === null ) {
49-
throw new TypeError( 'invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `' + x + '`.' );
50+
throw new TypeError( format( 'invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.', x ) );
5051
}
5152
if ( arguments.length > 1 ) {
5253
dt = arguments[ 1 ];

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"dependencies": {
4040
"@stdlib/array-dtype": "^0.0.x",
4141
"@stdlib/array-zeros": "^0.0.x",
42+
"@stdlib/string-format": "^0.0.x",
4243
"@stdlib/types": "^0.0.x"
4344
},
4445
"devDependencies": {

0 commit comments

Comments
 (0)
0