normalizePhoneDigits
function normalizePhoneDigits(phone): string | null;Defined in: internal/phone-utils.ts:27
Normalizes a phone string to digits with country code (no leading plus).
Accepts local (0300…), international (+92300…, 0092300…), short
(300…) and the common +92 (0) 300… / +920300… forms, with spaces,
dashes, dots, slashes or parentheses, and Urdu or Arabic-Indic digits.
Returns null when the input is not a Pakistani mobile number on an
allocated 03XX prefix.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
phone |
string |
Returns
Section titled “Returns”string | null