With a bit of research I\'ve found that, although ArrayBufferView
wasn\'t initially exposed (through [NoInterfaceObject]) there appeared to be
I would use either:
function isAbv(value) {
return value && value.buffer instanceof ArrayBuffer && value.byteLength !== undefined;
}
or:
var ArrayBufferView = Object.getPrototypeOf(Object.getPrototypeOf(new Uint8Array)).constructor;
function isAbv(value) {
return value instanceof ArrayBufferView;
}
Better answer I guess:
var arr = new Float64Array(100);
arr instanceof (new Uint16Array()).constructor.prototype.__proto__.constructor //true
works in Chrome & Firefox, maybe other browsers too