OpenBookPrices / country-data

Country related data such as ISO codes, currencies etc
MIT License
512 stars 166 forks source link

How to Get the Current 195/6 Countries #55

Open joncursi opened 8 years ago

joncursi commented 8 years ago

Multiple sources online report that the current number of countries is 195 or 196 if you include Taiwan. Is there a way to return a list of just these countries? Or must I maintain a separate array of countries in my app and query based on that?

http://www.infoplease.com/ipa/A0932875.html

evdb commented 8 years ago

That seems like a reasonable thing to support - perhaps something like:

var countries = require('country-data').countries
countries.recognised. ....

Ideally though I'd like the definition of what is a real/recognised/whatever country to come from some authoritative source. Basically I want to avoid weighing in on whether Taiwan is a country or not because that sort of politics tends to ruin my day :)

Can you suggest a source to use?

Also I'm not sure that recognised would be the best description, alternatives welcome.

joncursi commented 8 years ago

Yeah, I see your point. I ended up creating a custom array of countries that my app should care about, but in doing that I basically removed the immense value of having this package.