vre2h / use-react-countries

19 stars 9 forks source link

It would be very useful if it included a country code #6

Open tzabek opened 2 months ago

RaymondSalim commented 2 months ago

There is country calling code. country.countryCallingCode

type country = {
  name: string,
  capital: string,
  area: number,
  coordinates: number[],
  currencies: {
    name: string,
    symbol: string
  }[],
  languages: string[],
  maps: {
    googleMaps: string,
    openStreetMaps: string
  },
  postalCode: {
    format: string,
    regex: string
  },
  flags: {
    png: string,
    svg: string
  },
  population: number,
  emoji: string,
  countryCallingCode: string
}
tzabek commented 2 months ago

Yes, I understand there is a country calling code. What I meant was a 2-letter code like FR for France or ES for Spain or GB for Great Britain or PL for Poland. Adding this would be very helpful :)

Thanks for a reply