isDataView.js 507 B

1234567891011121314
  1. import tagTester from './_tagTester.js';
  2. import isFunction from './isFunction.js';
  3. import isArrayBuffer from './isArrayBuffer.js';
  4. import { hasStringTagBug } from './_stringTagBug.js';
  5. var isDataView = tagTester('DataView');
  6. // In IE 10 - Edge 13, we need a different heuristic
  7. // to determine whether an object is a `DataView`.
  8. function ie10IsDataView(obj) {
  9. return obj != null && isFunction(obj.getInt8) && isArrayBuffer(obj.buffer);
  10. }
  11. export default (hasStringTagBug ? ie10IsDataView : isDataView);