main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
500 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var Get = require('./Get');
|
---|
4 | var ToIndex = require('./ToIndex');
|
---|
5 | var Type = require('./Type');
|
---|
6 |
|
---|
7 | // https://tc39.es/ecma262/#sec-getarraybuffermaxbytelengthoption
|
---|
8 |
|
---|
9 | module.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.