@beenotung/tslib
Version:
utils library in Typescript
24 lines (23 loc) • 706 B
TypeScript
/** ******************************
* Hong Kong mobile phone number *
*********************************/
/**
* 4, 7, 8 heading are allowed since 2018
* news: https://skypost.ulifestyle.com.hk/article/2006268/
* */
export declare function is_hk_mobile_phone_prefix(tel: string): boolean;
/**
* with/without +852 prefix
* */
export declare function is_hk_mobile_phone(tel: number | string): boolean;
/**
* very forgiving
*
* @return +852xxxxyyyy if valid
* empty string if not valid
* */
export declare function to_full_hk_mobile_phone(tel: string | number): string;
/**
* @returns +852 xxxx yyyy if valid
*/
export declare function format_hk_mobile_phone(tel: string | number): string;