@beenotung/tslib
Version:
utils library in Typescript
26 lines (25 loc) • 842 B
TypeScript
/** *****************************
* UAE/Dubai mobile phone number *
*********************************/
/**
* starts with 5 (50, 52, 54, 55, 56, 58)
* reference: https://en.wikipedia.org/wiki/Telephone_numbers_in_the_United_Arab_Emirates
* */
export declare function is_ae_mobile_phone_prefix(tel: string): boolean;
/**
* with/without +971 prefix
* */
export declare function is_ae_mobile_phone(tel: number | string): boolean;
/**
* very forgiving
*
* @return +971xxxxxxxxx if valid (9 digits after country code)
* empty string if not valid
* */
export declare function to_full_ae_mobile_phone(tel: string | number): string;
/**
* @returns +971 5x xxx xxxx if valid
* if local format:05x xxx xxxx
* international format: +971 5x xxx xxxx
*/
export declare function format_ae_mobile_phone(tel: string | number): string;