UNPKG

compute-array-dtype

Version:

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

20 lines (15 loc) 336 B
'use strict'; var DTYPES = { 'Int8Array': 'int8', 'Uint8Array': 'uint8', 'Uint8ClampedArray': 'uint8_clamped', 'Int16Array': 'int16', 'Uint16Array': 'uint16', 'Int32Array': 'int32', 'Uint32Array': 'uint32', 'Float32Array': 'float32', 'Float64Array': 'float64', 'Array': 'generic' }; // EXPORTS // module.exports = DTYPES;