Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
297 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var toInteger = require('../internals/to-integer');
|
---|
| 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(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
---|
| 9 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.