UNPKG

@beenotung/tslib

Version:
25 lines (24 loc) 840 B
/** ****************************** * India mobile phone number * *********************************/ /** * starts with 9, 8, 7, or 6 * Mobile numbers (including pagers) on GSM, WCDMA, LTE and NR networks start with either 9, 8, 7 or 6 * reference: https://en.wikipedia.org/wiki/Mobile_telephone_numbering_in_India */ export declare function is_in_mobile_phone_prefix(tel: string): boolean; /** * with/without +91 prefix */ export declare function is_in_mobile_phone(tel: number | string): boolean; /** * very forgiving * * @returns +91xxxxxxxxxx if valid (10 digits after country code) * empty string if not valid */ export declare function to_full_in_mobile_phone(tel: string | number): string; /** * @returns +91 xxxxx xxxxx if valid */ export declare function format_in_mobile_phone(tel: string | number): string;