numeric-quantity - v3.2.2
    Preparing search index...

    Function numericQuantity

    • Converts a string to a number, like an enhanced version of parseFloat.

      The string can include mixed numbers, vulgar fractions, or Roman numerals. Input is expected to be a string, but will be coerced to string if necessary.

      Parameters

      • quantity: unknown

        The value to parse as a numeric quantity.

      Returns number

    • Converts a string to a number, like an enhanced version of parseFloat.

      The string can include mixed numbers, vulgar fractions, or Roman numerals. Input is expected to be a string, but will be coerced to string if necessary.

      Type Parameters

      Parameters

      • quantity: unknown

        The value to parse as a numeric quantity.

      • options: T

        Optional settings to control parsing behavior.

      Returns NumericQuantityReturnType<T>

    • Converts a string to a number, like an enhanced version of parseFloat.

      The string can include mixed numbers, vulgar fractions, or Roman numerals. Input is expected to be a string, but will be coerced to string if necessary.

      Parameters

      • quantity: unknown

        The value to parse as a numeric quantity.

      • Optionaloptions: NumericQuantityOptions

        Optional settings to control parsing behavior.

      Returns number