Skip to content

Convert a country code ISO 3166-1 Alpha 3 to ISO 3166-1 Alpha 2

Notifications You must be signed in to change notification settings

vtex/country-iso-3-to-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

country-iso-3-to-2

Convert a country code ISO 3166-1 Alpha-3 to ISO 3166-1 Alpha-2

Install

$ npm install country-iso-3-to-2

Usage

const getCountryISO2 = require("country-iso-3-to-2");

getCountryISO2("BRA")
// "BR"

getCountryISO2("USA")
// "US"

API

getCountryISO2(countryCode)

Parameter: A string with a country code in ISO 3166-1 Alpha-3

Return: A string with the country code in ISO 3166-1 Alpha-2


License

MIT © VTEX

About

Convert a country code ISO 3166-1 Alpha 3 to ISO 3166-1 Alpha 2

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •