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
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var Get = require('./Get');
|
---|
| 4 | var ToIndex = require('./ToIndex');
|
---|
| 5 | var Type = require('./Type');
|
---|
| 6 |
|
---|
[0c6b92a] | 7 | // https://262.ecma-international.org/15.0/#sec-getarraybuffermaxbytelengthoption
|
---|
[d565449] | 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.