OpenBookPrices / country-data

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

Search by IOC code #51

Open craftbyte opened 8 years ago

craftbyte commented 8 years ago

It would be nice to implement a search by IOC code as well as the alpha2 and alpha3 code. Maybe implement as countries.IOC.code

Sonatrix commented 6 years ago

You can still use lookup var lookup = require('country-data-list').lookup;

// Match a value (grab first from array) var alpha2 = lookup.countries({alpha2: 'GH'})[0]; var ioc = lookup.countries({ioc: 'GCI'})[0];