• Smart constructor for valid arbitrary precision numeric values.

    In our context, a valid arbitrary precision number is a finite numeric value represented as a :class value.

    In general, the given value will be converted into a :class value if:

    1. the value is valid number excluding NaN, Infinity and -Infinity, and
    2. the value is a string value and its sanitized representation can be parsed into a valid number excluding NaN, Infinity and -Infinity.

    Parameters

    • x: string | number

      The value to convert to :class.

    Returns functional.Maybe<Decimal>

    functional!Just finite :class value if argument is a valid, finite numeric value, functional!Nothing otherwise.

Generated using TypeDoc