compute-array-constructors
Version:
Returns an array constructor corresponding to an array data type.
20 lines (15 loc) • 314 B
JavaScript
var CTORS = {
'int8': Int8Array,
'uint8': Uint8Array,
'uint8_clamped': Uint8ClampedArray,
'int16': Int16Array,
'uint16': Uint16Array,
'int32': Int32Array,
'uint32': Uint32Array,
'float32': Float32Array,
'float64': Float64Array,
'generic': Array
};
// EXPORTS //
module.exports = CTORS;
;