@beenotung/tslib
Version:
utils library in Typescript
30 lines (29 loc) • 1.14 kB
TypeScript
/** ******************************
* Austria mobile phone number *
*********************************/
/**
* Mobile numbers start with 06 or 0660
* Format: 0AA BBB BBBB (variable length with leading 0 in local format)
* Reference: https://en.wikipedia.org/wiki/Telephone_numbers_in_Austria
*/
export declare function is_at_mobile_phone_prefix(tel: string): boolean;
/**
* with/without +43 prefix
*/
export declare function is_at_mobile_phone(tel: number | string): boolean;
/**
* very forgiving
*
* @returns +43xxxxxxxxx if valid (variable length after country code, NO leading 0 in internal format)
* empty string if not valid
*
* Format notes:
* - Local format: 0660 12345678 (variable length WITH leading 0) - used in Austria
* - Internal format: +43 660 12345678 (variable length after +43, NO leading 0)
* - Display format: +43 660 12345678 (formatted by format_at_mobile_phone)
*/
export declare function to_full_at_mobile_phone(tel: string | number): string;
/**
* @returns +43 6xx xxx xxxx if valid (or similar format)
*/
export declare function format_at_mobile_phone(tel: string | number): string;