UNPKG

@beenotung/tslib

Version:
25 lines (24 loc) 815 B
/** ****************************** * Thailand mobile phone number * *********************************/ /** * starts with 06, 08, or 09 (two-digit prefix) * Mobile prefixes: 06x (060-068), 08x (080-089), 09x (090-099) * reference: https://en.wikipedia.org/wiki/Telephone_numbers_in_Thailand */ export declare function is_th_mobile_phone_prefix(tel: string): boolean; /** * with/without +66 prefix */ export declare function is_th_mobile_phone(tel: number | string): boolean; /** * very forgiving * * @returns +66xxxxxxxxx if valid (9 digits after country code) * empty string if not valid */ export declare function to_full_th_mobile_phone(tel: string | number): string; /** * @returns +66 AA BBB BBBB if valid */ export declare function format_th_mobile_phone(tel: string | number): string;