We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae34fc0 commit 1138083Copy full SHA for 1138083
lib/node_modules/@stdlib/types/array/typed/lib/ctors.js
lib/node_modules/@stdlib/types/array/typed/lib/typedarray.js
@@ -3,7 +3,7 @@
3
// MODULES //
4
5
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
6
-var CTORS = require( './ctors.js' );
+var ctors = require( '@stdlib/types/array/typed-ctors' );
7
8
9
// MAIN //
@@ -102,8 +102,8 @@ function typedarray() {
102
} else {
103
dtype = 'float64';
104
}
105
- ctor = CTORS[ dtype ];
106
- if ( ctor === void 0 ) {
+ ctor = ctors( dtype );
+ if ( ctor === null ) {
107
throw new TypeError( 'invalid input argument. Must provide a recognized data type. Value: `'+dtype+'`.' );
108
109
if ( nargs <= 0 ) {
0 commit comments