Persian Tools - v4.0.4
    Preparing search index...

    Interface WordsToNumberOptions

    Configuration for wordsToNumber.

    interface WordsToNumberOptions {
        addCommas?: boolean;
        autoConvertArabicCharsToPersian?: boolean;
        autoConvertDigitsToEn?: boolean;
        digits?: "en" | "fa" | "ar";
        fuzzy?: boolean;
    }
    Index

    Properties

    addCommas?: boolean

    Inserts thousands separators into the numeric output (e.g., 350000 -> "350,000").

    autoConvertArabicCharsToPersian?: boolean

    Automatically converts Arabic characters to Persian characters before parsing. - Default: false

    autoConvertDigitsToEn?: boolean

    Automatically converts Arabic and Persian digits to English digits before parsing. - Default: false

    digits?: "en" | "fa" | "ar"

    Converts the numeric result to a particular digit style: - "en" for English digits (e.g., "1234") - "fa" for Persian digits (e.g., "۱۲۳۴") - "ar" for Arabic digits (e.g., "١٢٣٤")

    fuzzy?: boolean

    Enables fuzzy Persian typo fixer before parsing. If true, the input text will pass through fuzzy(...).

    • Default: false