UNPKG

compute-array-dtype

Version:

Returns an array data type corresponding to an array constructor name.

25 lines (16 loc) 418 B
'use strict'; // DTYPES // var DTYPES = require( './dtypes.js' ); // GET DTYPE // /** * FUNCTION: getType( name ) * Returns an array data type corresponding to an array constructor name. * * @param {String} name - constructor name * @returns {String|Null} array data type or null */ function getType( name ) { return DTYPES[ name ] || null; } // end FUNCTION getType() // EXPORTS // module.exports = getType;