Last active
November 25, 2017 09:23
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks for the EU CCA2 list :)