Because it’s good to have, Standard Sets.
@standardsets/countries
Countries names, letter codes, and ccTLDs.
Utilities for querying Country names, and their equivalent variations/abbreviations.
Install
Via npm
npm install -S @standardsets/core @standardsets/countries
Via Yarn
yarn add @standardsets/core @standardsets/countries
Methods
-
getItemVariation
- Allows for swapping one variation for another. (ex.countryName
→threeLetterCode
|Costa Rica
→CRI
) -
getVariations
- Listing of available variations for the current data set. -
getVariationItems
- Query data set and return the specified variation items. Defaults tocountryName
.