1.0.3 • Published 7 years ago

@intelia/countries v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

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