@intelia/countries

A utility for the list of world countries

Stats

StarsIssuesVersionUpdatedCreatedSize
@intelia/countries
1.0.34 years ago4 years agoMinified + gzip package size for @intelia/countries in KB

Readme

WORLD COUNTRIES

A utility for world countries

USAGE
  • Get a list of country codes ```javascript import { getCountryCodes } from '@intelia/countries';const countryCodes = getCountryCodes(); console.log(countryCodes); // ['AF', ..., 'ZW']

+ Get a list of country names 
```javascript
  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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.