alpha2-countries

1.1.0 • Public • Published

alpha2-countries

Exposes ISO 3166-1 alpha-2 country names and codes and simple name/code resolution abilities.

Uses data from https://datahub.io/core/country-list.

Usage

const countries = require('alpha2-countries')
// Input: 'US'
// Output: 'United States'
countries.resolveName('US')
// Input: 'United States'
// Output: 'US'
countries.resolveCode('United States')
// Output: [..., { code: 'US', name: 'United States' }, ...]
countries.getNameCodePairs()

Dependencies

Has no external dependencies.

/alpha2-countries/

    Package Sidebar

    Install

    npm i alpha2-countries

    Weekly Downloads

    280

    Version

    1.1.0

    License

    SEE LICENSE IN LICENSE

    Last publish

    Collaborators

    • slatkovi