import { keepNumbers } from "./string/keep_numbers" const COUNTRY_CODE = '+55' export class PhoneUtils { static toE164(phone: string): string { const hasCountryCode = phone.startsWith('+') const phoneNumber = keepNumbers(phone) return hasCountryCode ? `+${phoneNumber}` : [COUNTRY_CODE, phoneNumber].join('') } }