@intelia/countries

1.0.3 • Public • Published

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

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i @intelia/countries

    Weekly Downloads

    1

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    10.2 kB

    Total Files

    4

    Last publish

    Collaborators

    • mfalade