flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
12
VISUALIZACION/node_modules/es-abstract/2023/ToLength.js
generated
vendored
Executable file
12
VISUALIZACION/node_modules/es-abstract/2023/ToLength.js
generated
vendored
Executable 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;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue