Skip to content

Commit e33cae1

Browse files
committed
Auto-generated commit
1 parent aba4e8b commit e33cae1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/.keepalive

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

lib/factory.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ var ctors = require( '@stdlib/array-typed-ctors' );
3333
var reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' );
3434
var reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' );
3535
var arraylike2object = require( '@stdlib/array-base-arraylike2object' );
36+
var format = require( '@stdlib/string-format' );
3637
var copy = require( '@stdlib/utils-copy' );
3738
var ArrayBuffer = require( '@stdlib/array-buffer' );
3839
var ceil = require( '@stdlib/math-base-special-ceil' );
@@ -225,7 +226,7 @@ function factory( options ) {
225226
}
226227
ctor = ctors( dtype );
227228
if ( ctor === null ) {
228-
throw new TypeError( 'invalid argument. Must provide a recognized data type. Value: `'+dtype+'`.' );
229+
throw new TypeError( format( 'invalid argument. Must provide a recognized data type. Value: `%s`.', dtype ) );
229230
}
230231
if ( nargs <= 0 ) {
231232
return new ctor( 0 );
@@ -262,7 +263,7 @@ function factory( options ) {
262263
}
263264
return out;
264265
}
265-
throw new TypeError( 'invalid argument. First argument must be either an array length or an array-like object. Value: `'+arguments[ 0 ]+'`.' );
266+
throw new TypeError( format( 'invalid argument. First argument must be either an array length or an array-like object. Value: `%s`.', arguments[ 0 ] ) );
266267
}
267268

268269
/**
@@ -328,7 +329,7 @@ function factory( options ) {
328329
if ( isTypedArrayLike( buf ) && buf.buffer ) {
329330
buf = buf.buffer;
330331
} else if ( !isArrayBuffer( buf ) ) {
331-
throw new TypeError( 'invalid argument. Must provide a typed array or typed array buffer. Value: `'+buf+'`.' );
332+
throw new TypeError( format( 'invalid argument. Must provide a typed array or typed array buffer. Value: `%s`.', buf ) );
332333
}
333334
if ( buf.byteLength > 0 ) {
334335
n = floor( log2( buf.byteLength ) );

0 commit comments

Comments
 (0)