1.1.0 • Published 8 years ago
alpha2-countries v1.1.0
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.