hannesgassert / countrynames

ISO 3166 Country Name / Code Mapper in Javascript
41 stars 15 forks source link

add getAll to return an array of objects with country and name #3

Closed backus closed 6 years ago

backus commented 10 years ago

This is pretty useful if you're doing something like building a country dropdown in jade.

> countrynames.getAll()
[ { code: 'AD', name: 'ANDORRA' },
  { code: 'AE', name: 'UNITED ARAB EMIRATES' },
  { code: 'AF', name: 'AFGHANISTAN' },
  { code: 'AG', name: 'ANTIGUA AND BARBUDA' },
  { code: 'AI', name: 'ANGUILLA' },
  { code: 'AL', name: 'ALBANIA' },
  { code: 'AM', name: 'ARMENIA' },
  { code: 'AO', name: 'ANGOLA' },
  ...
SmallTarzan commented 10 years ago

i have a problem can u help me ?