You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
674 B
28 lines
674 B
var global = require('./_global'); |
|
var hide = require('./_hide'); |
|
var uid = require('./_uid'); |
|
var TYPED = uid('typed_array'); |
|
var VIEW = uid('view'); |
|
var ABV = !!(global.ArrayBuffer && global.DataView); |
|
var CONSTR = ABV; |
|
var i = 0; |
|
var l = 9; |
|
var Typed; |
|
|
|
var TypedArrayConstructors = ( |
|
'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' |
|
).split(','); |
|
|
|
while (i < l) { |
|
if (Typed = global[TypedArrayConstructors[i++]]) { |
|
hide(Typed.prototype, TYPED, true); |
|
hide(Typed.prototype, VIEW, true); |
|
} else CONSTR = false; |
|
} |
|
|
|
module.exports = { |
|
ABV: ABV, |
|
CONSTR: CONSTR, |
|
TYPED: TYPED, |
|
VIEW: VIEW |
|
};
|
|
|