Skip to content

Commit 1138083

Browse files
committed
Use pkg for returning a typed array constructor
1 parent ae34fc0 commit 1138083

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

lib/node_modules/@stdlib/types/array/typed/lib/ctors.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

lib/node_modules/@stdlib/types/array/typed/lib/typedarray.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// MODULES //
44

55
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
6-
var CTORS = require( './ctors.js' );
6+
var ctors = require( '@stdlib/types/array/typed-ctors' );
77

88

99
// MAIN //
@@ -102,8 +102,8 @@ function typedarray() {
102102
} else {
103103
dtype = 'float64';
104104
}
105-
ctor = CTORS[ dtype ];
106-
if ( ctor === void 0 ) {
105+
ctor = ctors( dtype );
106+
if ( ctor === null ) {
107107
throw new TypeError( 'invalid input argument. Must provide a recognized data type. Value: `'+dtype+'`.' );
108108
}
109109
if ( nargs <= 0 ) {

0 commit comments

Comments
 (0)