1.0.6 β€’ Published 7 years ago

simple-country-list v1.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Simple Country List

Intended usage: Country selector

This list uses data from country-data package, and reformats it for easier usage in a country selector scenario.

# npm install simple-country-list
var countriesData = require('simple-country-list');

countriesData.countries = [
  // ...
  {
    "code2": [ "GB", "UK" ],
    "code3": [ "GBR" ],
    "alpha2": "GB",
    "alpha3": "GBR",
    "name": "United Kingdom",
    "emoji": "πŸ‡¬πŸ‡§"
  },
  // ...
] // array of countries

countriesData.code2.UK = [
    { // first is always the country with this alpha2
      code2: [ "GB", "UK" ],
      code3: [ "GBR" ],
      alpha2: "GB",
      alpha3: "GBR",
      name: "United Kingdom",
      emoji: "πŸ‡¬πŸ‡§"
    },
    { // another country matching beginning
      code2: [ "UA" ],
      code3: [ "UKR" ],
      alpha2: "UA",
      alpha3: "UKR",
      name: "Ukraine",
      emoji: "πŸ‡ΊπŸ‡¦"
    }
  ]

countriesData.code3.AUS = [
    { // first is always the country with this alpha3
      code2: [ 'AU' ],
      code3: [ 'AUS' ],
      alpha2: "AU",
      alpha3: 'AUS',
      name: 'Australia',
      emoji: 'πŸ‡¦πŸ‡Ί' 
    },
    { // another country matching beginning
      code2: [ 'AT' ],
      code3: [ 'AUT' ],
      alpha2: "AT",
      alpha3: 'AUT',
      name: 'Austria',
      emoji: 'πŸ‡¦πŸ‡Ή' 
    }
  ],
1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago