JSPM

country-iso-3-to-2

1.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 31590
  • Score
    100M100P100Q159526F
  • License MIT

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

Package Exports

  • country-iso-3-to-2
  • country-iso-3-to-2/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (country-iso-3-to-2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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