Skip to content

Instantly share code, notes, and snippets.

@dominicbartl
Last active November 25, 2017 09:23
Show Gist options
  • Save dominicbartl/f0507c786bad45cc942de471b1427e48 to your computer and use it in GitHub Desktop.
Save dominicbartl/f0507c786bad45cc942de471b1427e48 to your computer and use it in GitHub Desktop.
A list of countries with name, currency and info if they're in the EU
const countries = require('world-countries/countries');
const EU = ["AT","BE","BG","CY","CZ","DE","DK","ES","EE","FI","FR","GB","GR","HR","HU","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SK","SI","SE"];
let mapped = countries.map((country) => {
return {
cca2: country.cca2,
ccn3: country.ccn3,
cca3: country.cca3,
currency: country.currency,
name: country.name.common,
in_eu: EU.indexOf(country.cca2) >= 0
}
});
@smart-oversight
Copy link

thanks for the EU CCA2 list :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment