UNPKG

@beenotung/tslib

Version:
30 lines (29 loc) 1.1 kB
/** ****************************** * Belgium mobile phone number * *********************************/ /** * Mobile numbers start with 04 * Format: 0AA BBB BB BB (9 digits with leading 0 in local format) * Reference: https://en.wikipedia.org/wiki/Telephone_numbers_in_Belgium */ export declare function is_be_mobile_phone_prefix(tel: string): boolean; /** * with/without +32 prefix */ export declare function is_be_mobile_phone(tel: number | string): boolean; /** * very forgiving * * @returns +32xxxxxxxxx if valid (9 digits after country code, NO leading 0 in internal format) * empty string if not valid * * Format notes: * - Local format: 0471 23 45 67 (9 digits WITH leading 0) - used in Belgium * - Internal format: +32 471 23 45 67 (9 digits after +32, NO leading 0) - always 9 digits * - Display format: +32 471 23 45 67 (formatted by format_be_mobile_phone) */ export declare function to_full_be_mobile_phone(tel: string | number): string; /** * @returns +32 4xx xx xx xx if valid */ export declare function format_be_mobile_phone(tel: string | number): string;