Version 1
[yaffs-website] / node_modules / core-js / library / modules / _typed.js
1 var global = require('./_global')
2   , hide   = require('./_hide')
3   , uid    = require('./_uid')
4   , TYPED  = uid('typed_array')
5   , VIEW   = uid('view')
6   , ABV    = !!(global.ArrayBuffer && global.DataView)
7   , CONSTR = ABV
8   , i = 0, l = 9, Typed;
9
10 var TypedArrayConstructors = (
11   'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
12 ).split(',');
13
14 while(i < l){
15   if(Typed = global[TypedArrayConstructors[i++]]){
16     hide(Typed.prototype, TYPED, true);
17     hide(Typed.prototype, VIEW, true);
18   } else CONSTR = false;
19 }
20
21 module.exports = {
22   ABV:    ABV,
23   CONSTR: CONSTR,
24   TYPED:  TYPED,
25   VIEW:   VIEW
26 };