import getNumberFromName from "./GetNumberSequence"
import codephoneNumber from './countryPhoneCodes';

function phoneNumberStart(name:string){ 
  
    let phone_number:string = getNumberFromName(name)
    let start: boolean = false
  
    for (let i = 0; i < codephoneNumber.length; i++) { 
      if(phone_number.startsWith(codephoneNumber[i].code)){
        start = true
        break
      }
    }

    return start
}

export default phoneNumberStart