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
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var Get = require('./Get');
|
---|
4 | var ToIndex = require('./ToIndex');
|
---|
5 |
|
---|
6 | var isObject = require('../helpers/isObject');
|
---|
7 |
|
---|
8 | // https://262.ecma-international.org/15.0/#sec-getarraybuffermaxbytelengthoption
|
---|
9 |
|
---|
10 | module.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.