/**
 * Formats a phone number string as 10 digit with leading 1 and plus sign
 */
export default async function formatPhoneNumber(phone) {
  let formattedNumber = phone.replace(/\D/g, "");
  if (phone.length === 10) {
    formattedNumber = `1${formattedNumber}`;
  }
  return `+${formattedNumber}`;
}
