You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
329 B
10 lines
329 B
2 years ago
|
var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');
|
||
|
|
||
|
var min = Math.min;
|
||
|
|
||
|
// `ToLength` abstract operation
|
||
|
// https://tc39.es/ecma262/#sec-tolength
|
||
|
module.exports = function (argument) {
|
||
|
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
||
|
};
|