Fix more build errors
This commit is contained in:
parent
1bdc1e60db
commit
30ce47826f
61 changed files with 1161 additions and 541 deletions
|
|
@ -4,14 +4,12 @@ export const E164Regex = /^\+[1-9]\d{1,14}$/;
|
|||
/**
|
||||
* Returns true if the number is a valid E164 number
|
||||
*/
|
||||
export const isValidE164Number = (phoneNumber) => {
|
||||
return E164Regex.test(phoneNumber);
|
||||
};
|
||||
export const isValidE164Number = (phoneNumber: string) => E164Regex.test(phoneNumber);
|
||||
|
||||
/**
|
||||
* Given a phone number approximation, will clean out whitespace and punctuation.
|
||||
*/
|
||||
export const sanitizeE164Number = (phoneNumber) => {
|
||||
export const sanitizeE164Number = (phoneNumber: string) => {
|
||||
if (!phoneNumber) return "";
|
||||
if (!phoneNumber.trim()) return "";
|
||||
const sanitized = phoneNumber
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue