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-byte-length.js 645B

123456789101112131415
  1. 'use strict';
  2. var globalThis = require('../internals/global-this');
  3. var uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');
  4. var classof = require('../internals/classof-raw');
  5. var ArrayBuffer = globalThis.ArrayBuffer;
  6. var TypeError = globalThis.TypeError;
  7. // Includes
  8. // - Perform ? RequireInternalSlot(O, [[ArrayBufferData]]).
  9. // - If IsSharedArrayBuffer(O) is true, throw a TypeError exception.
  10. module.exports = ArrayBuffer && uncurryThisAccessor(ArrayBuffer.prototype, 'byteLength', 'get') || function (O) {
  11. if (classof(O) !== 'ArrayBuffer') throw new TypeError('ArrayBuffer expected');
  12. return O.byteLength;
  13. };