@beenotung/tslib
Version:
utils library in Typescript
31 lines (30 loc) • 1.18 kB
TypeScript
/** ******************************
* Australia mobile phone number *
*********************************/
export declare function is_au_mobile_phone_prefix(tel: string): boolean;
/**
* with/without +61 prefix
*/
export declare function is_au_mobile_phone(tel: number | string): boolean;
/**
* landline number example:
* excluding area code: xxxx xxxx
* including area code: (07) xxxx xxxx
* including country and area code: +61 7 xxxx xxxx
* the area code can be 2-digit, being "0x", or 1 digit, being "1"
*
* mobile number example:
* country code: +61
* mobile prefix: e.g. starting with 4 (area and operator code)
* local number: 8 digits
*
* Within Australia, mobile phone numbers begin with 04– the Australian national trunk code 0,
* plus the mobile indicator 4 – followed by eight digits.
*
* This is generally written as 04XX XXX XXX within Australia,
* or as +61 4XX XXX XXX for an international audience.
*
* reference: https://en.wikipedia.org/wiki/Telephone_numbers_in_Australia
*/
export declare function to_full_au_mobile_phone(tel: string | number): string;
export declare function format_au_mobile_phone(tel: string | number): string;