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

    Interface NumericQuantityVerboseResult

    Verbose result returned when verbose: true is set.

    interface NumericQuantityVerboseResult {
        currencyPrefix?: string;
        currencySuffix?: string;
        denominator?: number;
        input: string;
        numerator?: number;
        percentageSuffix?: boolean;
        sign?: "-" | "+";
        trailingInvalid?: string;
        value: number | bigint;
        whole?: number;
    }
    Index

    Properties

    currencyPrefix?: string

    Currency symbol(s) stripped from the start, if any.

    currencySuffix?: string

    Currency symbol(s) stripped from the end, if any.

    denominator?: number

    The denominator of a fraction (e.g. 3 from "1 2/3", or 2 from "1/2"). Always unsigned.

    input: string

    The original input string.

    numerator?: number

    The numerator of a fraction (e.g. 2 from "1 2/3", or 1 from "1/2"). Always unsigned.

    percentageSuffix?: boolean

    True if a % suffix was stripped.

    sign?: "-" | "+"

    The leading sign character ('-' or '+'), if present. Omitted when no explicit sign was in the input.

    trailingInvalid?: string

    Trailing invalid (usually non-numeric) characters detected in the input, if any. Populated even when allowTrailingInvalid is false.

    value: number | bigint

    The parsed numeric value (NaN if invalid).

    whole?: number

    The whole-number part of a mixed fraction (e.g. 1 from "1 2/3"). Omitted for pure fractions, decimals, and integers.