formatCountry()function

formatCountry(country: string): string
ParamType
countrystring
The country code to format. required
Return
string
The full English country name, or the input unchanged if it is not a known code.

Format a country code into its full country name.

  • Matching is case-insensitive; unknown codes are returned unchanged.

Examples

formatCountry("GB") // "United Kingdom"