function isArrayBufferView(val) {
  let result;
  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
    result = ArrayBuffer.isView(val);
  } else {
    result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
  }
  return result;
}
Determine if a value is a view on an ArrayBuffer

@param {*} val The value to test

@returns {boolean} True if value is a view on an ArrayBuffer, otherwise false