main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 2 weeks ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
645 bytes
|
Rev | Line | |
---|
[79a0317] | 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 |
|
---|
| 6 | var ArrayBuffer = globalThis.ArrayBuffer;
|
---|
| 7 | var TypeError = globalThis.TypeError;
|
---|
| 8 |
|
---|
| 9 | // Includes
|
---|
| 10 | // - Perform ? RequireInternalSlot(O, [[ArrayBufferData]]).
|
---|
| 11 | // - If IsSharedArrayBuffer(O) is true, throw a TypeError exception.
|
---|
| 12 | module.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.