IsSharedArrayBuffer.js 413 B

1234567891011121314151617
  1. 'use strict';
  2. var $TypeError = require('es-errors/type');
  3. var Type = require('./Type');
  4. var isSharedArrayBuffer = require('is-shared-array-buffer');
  5. // https://262.ecma-international.org/8.0/#sec-issharedarraybuffer
  6. module.exports = function IsSharedArrayBuffer(obj) {
  7. if (Type(obj) !== 'Object') {
  8. throw new $TypeError('Assertion failed: Type(O) is not Object');
  9. }
  10. return isSharedArrayBuffer(obj);
  11. };