This commit is contained in:
Lilith 2025-02-27 02:26:55 +01:00
parent a71a3b5593
commit cb52890889
Signed by: lilith
GPG key ID: 8712A0F317C37175
16657 changed files with 1483086 additions and 1 deletions

12
home/ags/node_modules/es-abstract/2023/ToLength.js generated vendored Normal file
View file

@ -0,0 +1,12 @@
'use strict';
var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
module.exports = function ToLength(argument) {
var len = ToIntegerOrInfinity(argument);
if (len <= 0) { return 0; } // includes converting -0 to +0
if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
return len;
};