source: imaps-frontend/node_modules/core-js/internals/array-buffer-byte-length.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 645 bytes
Line 
1'use strict';
2var globalThis = require('../internals/global-this');
3var uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');
4var classof = require('../internals/classof-raw');
5
6var ArrayBuffer = globalThis.ArrayBuffer;
7var TypeError = globalThis.TypeError;
8
9// Includes
10// - Perform ? RequireInternalSlot(O, [[ArrayBufferData]]).
11// - If IsSharedArrayBuffer(O) is true, throw a TypeError exception.
12module.exports = ArrayBuffer && uncurryThisAccessor(ArrayBuffer.prototype, 'byteLength', 'get') || function (O) {
13 if (classof(O) !== 'ArrayBuffer') throw new TypeError('ArrayBuffer expected');
14 return O.byteLength;
15};
Note: See TracBrowser for help on using the repository browser.