main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
526 bytes
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var Get = require('./Get');
|
---|
| 4 | var ToIndex = require('./ToIndex');
|
---|
[79a0317] | 5 |
|
---|
| 6 | var isObject = require('../helpers/isObject');
|
---|
[d565449] | 7 |
|
---|
[0c6b92a] | 8 | // https://262.ecma-international.org/15.0/#sec-getarraybuffermaxbytelengthoption
|
---|
[d565449] | 9 |
|
---|
| 10 | module.exports = function GetArrayBufferMaxByteLengthOption(options) {
|
---|
[79a0317] | 11 | if (!isObject(options)) {
|
---|
[d565449] | 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.