@hyperfrontend/immutable-api-utils/built-in-copy/number

number

Locked, prototype-pollution-resistant copies of the global Number static methods, constants, and the global numeric parsers.

References to Number.MAX_VALUE, Number.MIN_VALUE, Number.MAX_SAFE_INTEGER, Number.MIN_SAFE_INTEGER, Number.EPSILON, Number.NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.isFinite, Number.isInteger, Number.isNaN, Number.isSafeInteger, plus the global parseInt, parseFloat, isNaN, and isFinite, are captured at module-load time and frozen into a tamper-proof namespace. Effective only when imported before any untrusted code has had a chance to mutate the prototype chain.

API Reference

Variables

§type

EPSILON

(Safe copy) The difference between 1 and the smallest floating point number greater than 1.
§type

globalIsFinite

(Safe copy) Global isFinite function (coerces to number first, less strict than Number.isFinite).
§type

globalIsNaN

(Safe copy) Global isNaN function (coerces to number first, less strict than Number.isNaN).
§type

isFinite

(Safe copy) Determines whether the passed value is a finite number.
§type

isInteger

(Safe copy) Determines whether the passed value is an integer.
§type

isNaN

(Safe copy) Determines whether the passed value is NaN (Number method, stricter than global isNaN).
§type

isSafeInteger

(Safe copy) Determines whether the passed value is a safe integer.
§type

MAX_SAFE_INTEGER

(Safe copy) The largest safe integer (2^53 - 1).
§type

MAX_VALUE

(Safe copy) The largest positive representable number.
§type

MIN_SAFE_INTEGER

(Safe copy) The smallest safe integer (-(2^53 - 1)).
§type

MIN_VALUE

(Safe copy) The smallest positive representable number.
§type

NEGATIVE_INFINITY

(Safe copy) Negative infinity.
§type

Number

(Safe copy) Namespace object containing all Number utilities. Note: Importing this imports all methods in this namespace (no tree-shaking).
§type

NUMBER_NaN

(Safe copy) Not-a-Number value.
§type

parseFloat

(Safe copy) Parses a string and returns a floating point number.
§type

parseInt

(Safe copy) Parses a string and returns an integer.
§type

POSITIVE_INFINITY

(Safe copy) Positive infinity.