source: frontend/node_modules/es-abstract/2024/GetArrayBufferMaxByteLengthOption.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 531 bytes
Line 
1'use strict';
2
3var isObject = require('es-object-atoms/isObject');
4
5var Get = require('./Get');
6var ToIndex = require('./ToIndex');
7
8// https://262.ecma-international.org/15.0/#sec-getarraybuffermaxbytelengthoption
9
10module.exports = function GetArrayBufferMaxByteLengthOption(options) {
11 if (!isObject(options)) {
12 return 'EMPTY'; // step 1
13 }
14
15 var maxByteLength = Get(options, 'maxByteLength'); // step 2
16
17 if (typeof maxByteLength === 'undefined') {
18 return 'EMPTY'; // step 3
19 }
20
21 return ToIndex(maxByteLength); // step 4
22};
Note: See TracBrowser for help on using the repository browser.