Fix more build errors

This commit is contained in:
Darren Clarke 2023-03-15 12:17:43 +00:00
parent 1bdc1e60db
commit 30ce47826f
61 changed files with 1161 additions and 541 deletions

View file

@ -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