UNPKG

nums2persian

Version:
22 lines (21 loc) 789 B
/** * Main function * @param input * @returns {string} * @constructor */ export declare const Num2persian: (input: any) => string; /** * replace ۱ by 1 and ۲ by 2 and....۹ by 9 * @param e its length equl 1 and contain one of ۰|۱|۲|۳|۴|۵|۶|۷|۸|۸|۹ * @returns 0|1|2|3|4|5|6|7|8|9 */ export declare const persianCharToEnglishNumber: (e: string) => number; /** * * @param e value that it can contain ۱ or 1 * @param cantUseZero @param e can use ۰ or 0 ? when it be true it be possible * @returns {string} that evry ۱ convert to 1 ۲, ۲ convert to 2 and so on and other chars are filter */ export declare const persianStringToEnglishString: (e: string, cantUseZero?: boolean) => string; export declare const formatNumberShowZero: (num: number | null) => string;