|
Last change
on this file since cdcff72 was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
531 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | var isObject = require('es-object-atoms/isObject');
|
|---|
| 4 |
|
|---|
| 5 | var Get = require('./Get');
|
|---|
| 6 | var ToIndex = require('./ToIndex');
|
|---|
| 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.