isDataView.js 565 B

12345678910111213141516
  1. var _tagTester = require('./_tagTester.js');
  2. var isFunction = require('./isFunction.js');
  3. var isArrayBuffer = require('./isArrayBuffer.js');
  4. var _stringTagBug = require('./_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. var isDataView$1 = (_stringTagBug.hasStringTagBug ? ie10IsDataView : isDataView);
  12. module.exports = isDataView$1;