JSPM

iso-3166-1-codes

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 164
  • Score
    100M100P100Q89463F
  • License MIT

Just the codes, nothing more

Package Exports

  • iso-3166-1-codes

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (iso-3166-1-codes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ISO 3166-1 codes

A list of numeric, alpha2, alpha3 and name (English short name) from ISO 3166-1.

const countries = require('iso-3166-1-codes');

console.log(countries.map(c => c.name));
    // Albania
    // …


// export a Map
byNumeric()
byAlpha2()
byAlpha3()

const byNumeric = countries.byNumeric();
const byAlpha2 = countries.byAlpha2();

byNumeric.has('208');
    // true

byAlpha2.get('DK');
    // { numeric: '208', alpha2: 'DK', alpha3: 'DNK', name: 'Denmark' }