arabic-digits
Version:
A light-weight utility to convert arabic digits to english or modern digits and vice versa.
18 lines (17 loc) • 575 B
TypeScript
/**
*
* @param num number or a string that contain the number to be converted
* @param intOnly remove any character that is not a digit
*/
export declare const toArabic: (num: number | string, intOnly?: boolean) => string;
/**
*
* @param num a string that contain the number to be converted
* @param intOnly remove any character that is not a digit
*/
export declare const fromArabic: (num: string, intOnly?: boolean) => string;
/**
*
* @param num a string that contain the number to be tested
*/
export declare const hasArabic: (num: string) => RegExpMatchArray;