mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Use precomputed values for MAX_ARRAY_LENGTH and MAX_SAFE_INTEGER.
This commit is contained in:
@@ -835,7 +835,7 @@
|
||||
POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
|
||||
|
||||
/** Used as references for the maximum length and index of an array. */
|
||||
var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1,
|
||||
var MAX_ARRAY_LENGTH = 4294967295,
|
||||
MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
|
||||
HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
|
||||
|
||||
@@ -846,7 +846,7 @@
|
||||
* Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
|
||||
* of an array-like value.
|
||||
*/
|
||||
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
|
||||
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||
|
||||
/** Used to store function metadata. */
|
||||
var metaMap = WeakMap && new WeakMap;
|
||||
|
||||
Reference in New Issue
Block a user