main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
355 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');
|
---|
3 |
|
---|
4 | var min = Math.min;
|
---|
5 |
|
---|
6 | // `ToLength` abstract operation
|
---|
7 | // https://tc39.es/ecma262/#sec-tolength
|
---|
8 | module.exports = function (argument) {
|
---|
9 | var len = toIntegerOrInfinity(argument);
|
---|
10 | return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
---|
11 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.