@intelia/countries
v1.0.3
Published
A utility for the list of world countries
Downloads
1
Readme
WORLD COUNTRIES
A utility for world countries
USAGE
- Get a list of country codes
import { getCountryCodes } from '@intelia/countries';
const countryCodes = getCountryCodes();
console.log(countryCodes); // ['AF', ..., 'ZW']
- Get a list of country names
import { getCountryNames } from '@intelia/countries';
const countryNames = getCountryNames()
console.log(countryNames); // ['Afghanistan', ..., 'Zimbabwe']
- Get a country-code to country-name mapping
import COUNTRIES from '@intelia/countries';
console.log(COUNTRIES); // { AF: "Afghanistan", ..., ZW: "Zimbabwe" }
TESTING
To test, simply run
npm i
followed by
npm test