/
lostSun
/
project-client-server-apps
Обзор
Документация
Войти
/
lostSun
/
project-client-server-apps
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
node_modules/es-abstract/2024/GetArrayBufferMaxByteLengthOption.js
22 строки
526 B
1lostsun
initial commit
05 май 2025, 11:35
05 май 2025, 11:35
fe8f535
Код
Авторство
О чём код?
'use strict'; var Get = require('./Get'); var ToIndex = require('./ToIndex'); var isObject = require('../helpers/isObject'); // https://262.ecma-international.org/15.0/#sec-getarraybuffermaxbytelengthoption module.exports = function GetArrayBufferMaxByteLengthOption(options) { if (!isObject(options)) { return 'EMPTY'; // step 1 } var maxByteLength = Get(options, 'maxByteLength'); // step 2 if (typeof maxByteLength === 'undefined') { return 'EMPTY'; // step 3 } return ToIndex(maxByteLength); // step 4 };