Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

array-buffer-is-detached.js 606B

12345678910111213141516171819
  1. 'use strict';
  2. var globalThis = require('../internals/global-this');
  3. var uncurryThis = require('../internals/function-uncurry-this-clause');
  4. var arrayBufferByteLength = require('../internals/array-buffer-byte-length');
  5. var ArrayBuffer = globalThis.ArrayBuffer;
  6. var ArrayBufferPrototype = ArrayBuffer && ArrayBuffer.prototype;
  7. var slice = ArrayBufferPrototype && uncurryThis(ArrayBufferPrototype.slice);
  8. module.exports = function (O) {
  9. if (arrayBufferByteLength(O) !== 0) return false;
  10. if (!slice) return false;
  11. try {
  12. slice(O, 0, 0);
  13. return false;
  14. } catch (error) {
  15. return true;
  16. }
  17. };