source: imaps-frontend/node_modules/es-abstract/2024/GetArrayBufferMaxByteLengthOption.js@ 0c6b92a

main
Last change on this file since 0c6b92a was 0c6b92a, checked in by stefan toskovski <stefantoska84@…>, 5 weeks ago

Pred finalna verzija

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