Node-Red configuration
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.

to-length.js 355B

1234567891011
  1. 'use strict';
  2. var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');
  3. var min = Math.min;
  4. // `ToLength` abstract operation
  5. // https://tc39.es/ecma262/#sec-tolength
  6. module.exports = function (argument) {
  7. var len = toIntegerOrInfinity(argument);
  8. return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  9. };