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