massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / internals / to-length.js
1 var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');
2
3 var min = Math.min;
4
5 // `ToLength` abstract operation
6 // https://tc39.es/ecma262/#sec-tolength
7 module.exports = function (argument) {
8   return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
9 };