Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save JohnONolan/e5dcac2f4c208f91a94c5468aee30759 to your computer and use it in GitHub Desktop.

Select an option

Save JohnONolan/e5dcac2f4c208f91a94c5468aee30759 to your computer and use it in GitHub Desktop.
availableCountries = {
af: {name: 'Afghanistan', tax_location: 'OS', postal_region: 'RW'},
ax: {name: 'Aland Islands', tax_location: 'OS', postal_region: 'RW'},
al: {name: 'Albania', tax_location: 'OS', postal_region: 'EU'},
dz: {name: 'Algeria', tax_location: 'OS', postal_region: 'RW'},
as: {name: 'American Samoa', tax_location: 'OS', postal_region: 'RW'},
ad: {name: 'Andorra', tax_location: 'OS', postal_region: 'EU'},
ao: {name: 'Angola', tax_location: 'OS', postal_region: 'RW'},
ai: {name: 'Anguilla', tax_location: 'OS', postal_region: 'RW'},
aq: {name: 'Antarctica', tax_location: 'OS', postal_region: 'RW'},
ag: {name: 'Antigua and Barbuda', tax_location: 'OS', postal_region: 'RW'},
ar: {name: 'Argentina', tax_location: 'OS', postal_region: 'RW'},
am: {name: 'Armenia', tax_location: 'OS', postal_region: 'EU'},
aw: {name: 'Aruba', tax_location: 'OS', postal_region: 'RW'},
au: {name: 'Australia', tax_location: 'OS', postal_region: 'RW'},
at: {name: 'Austria', tax_location: 'AT', postal_region: 'EU'},
az: {name: 'Azerbaijan', tax_location: 'OS', postal_region: 'EU'},
bs: {name: 'Bahamas', tax_location: 'OS', postal_region: 'RW'},
bh: {name: 'Bahrain', tax_location: 'OS', postal_region: 'RW'},
bd: {name: 'Bangladesh', tax_location: 'OS', postal_region: 'RW'},
bb: {name: 'Barbados', tax_location: 'OS', postal_region: 'RW'},
by: {name: 'Belarus', tax_location: 'OS', postal_region: 'EU'},
be: {name: 'Belgium', tax_location: 'BE', postal_region: 'EU'},
bz: {name: 'Belize', tax_location: 'OS', postal_region: 'RW'},
bj: {name: 'Benin', tax_location: 'OS', postal_region: 'RW'},
bm: {name: 'Bermuda', tax_location: 'OS', postal_region: 'RW'},
bt: {name: 'Bhutan', tax_location: 'OS', postal_region: 'RW'},
bo: {name: 'Bolivia, Plurinational State of', tax_location: 'OS', postal_region: 'RW'},
ba: {name: 'Bosnia and Herzegovina', tax_location: 'OS', postal_region: 'EU'},
bw: {name: 'Botswana', tax_location: 'OS', postal_region: 'RW'},
bv: {name: 'Bouvet Island', tax_location: 'OS', postal_region: 'RW'},
br: {name: 'Brazil', tax_location: 'OS', postal_region: 'RW'},
io: {name: 'British Indian Ocean Territory', tax_location: 'OS', postal_region: 'RW'},
bn: {name: 'Brunei Darussalam', tax_location: 'OS', postal_region: 'RW'},
bg: {name: 'Bulgaria', tax_location: 'BG', postal_region: 'EU'},
bf: {name: 'Burkina Faso', tax_location: 'OS', postal_region: 'RW'},
bi: {name: 'Burundi', tax_location: 'OS', postal_region: 'RW'},
kh: {name: 'Cambodia', tax_location: 'OS', postal_region: 'RW'},
cm: {name: 'Cameroon', tax_location: 'OS', postal_region: 'RW'},
ca: {name: 'Canada', tax_location: 'OS', postal_region: 'RW'},
cv: {name: 'Cape Verde', tax_location: 'OS', postal_region: 'RW'},
ky: {name: 'Cayman Islands', tax_location: 'OS', postal_region: 'RW'},
cf: {name: 'Central African Republic', tax_location: 'OS', postal_region: 'RW'},
td: {name: 'Chad', tax_location: 'OS', postal_region: 'RW'},
cl: {name: 'Chile', tax_location: 'OS', postal_region: 'RW'},
cn: {name: 'China', tax_location: 'OS', postal_region: 'RW'},
cx: {name: 'Christmas Island', tax_location: 'OS', postal_region: 'RW'},
cc: {name: 'Cocos (keeling) Islands', tax_location: 'OS', postal_region: 'RW'},
co: {name: 'Colombia', tax_location: 'OS', postal_region: 'RW'},
km: {name: 'Comoros', tax_location: 'OS', postal_region: 'RW'},
cg: {name: 'Congo', tax_location: 'OS', postal_region: 'RW'},
cd: {name: 'Congo, the Democratic Republic of the', tax_location: 'OS', postal_region: 'RW'},
ck: {name: 'Cook Islands', tax_location: 'OS', postal_region: 'RW'},
cr: {name: 'Costa Rica', tax_location: 'OS', postal_region: 'RW'},
ci: {name: 'Cote D\'ivoire', tax_location: 'OS', postal_region: 'RW'},
hr: {name: 'Croatia', tax_location: 'HR', postal_region: 'EU'},
cu: {name: 'Cuba', tax_location: 'OS', postal_region: 'RW'},
cy: {name: 'Cyprus', tax_location: 'CY', postal_region: 'EU'},
cz: {name: 'Czech Republic', tax_location: 'CZ', postal_region: 'EU'},
dk: {name: 'Denmark', tax_location: 'DK', postal_region: 'EU'},
dj: {name: 'Djibouti', tax_location: 'OS', postal_region: 'RW'},
dm: {name: 'Dominica', tax_location: 'OS', postal_region: 'RW'},
do: {name: 'Dominican Republic', tax_location: 'OS', postal_region: 'RW'},
ec: {name: 'Ecuador', tax_location: 'OS', postal_region: 'RW'},
eg: {name: 'Egypt', tax_location: 'OS', postal_region: 'RW'},
sv: {name: 'El Salvador', tax_location: 'OS', postal_region: 'RW'},
gq: {name: 'Equatorial Guinea', tax_location: 'OS', postal_region: 'RW'},
er: {name: 'Eritrea', tax_location: 'OS', postal_region: 'RW'},
ee: {name: 'Estonia', tax_location: 'EE', postal_region: 'EU'},
et: {name: 'Ethiopia', tax_location: 'OS', postal_region: 'RW'},
fk: {name: 'Falkland Islands (malvinas)', tax_location: 'OS', postal_region: 'RW'},
fo: {name: 'Faroe Islands', tax_location: 'OS', postal_region: 'EU'},
fj: {name: 'Fiji', tax_location: 'OS', postal_region: 'RW'},
fi: {name: 'Finland', tax_location: 'FI', postal_region: 'EU'},
fr: {name: 'France', tax_location: 'FR', postal_region: 'EU'},
gf: {name: 'French Guiana', tax_location: 'OS', postal_region: 'RW'},
pf: {name: 'French Polynesia', tax_location: 'OS', postal_region: 'RW'},
tf: {name: 'French Southern Territories', tax_location: 'OS', postal_region: 'RW'},
ga: {name: 'Gabon', tax_location: 'OS', postal_region: 'RW'},
gm: {name: 'Gambia', tax_location: 'OS', postal_region: 'RW'},
ge: {name: 'Georgia', tax_location: 'OS', postal_region: 'EU'},
de: {name: 'Germany', tax_location: 'DE', postal_region: 'EU'},
gh: {name: 'Ghana', tax_location: 'OS', postal_region: 'RW'},
gi: {name: 'Gibraltar', tax_location: 'OS', postal_region: 'RW'},
gr: {name: 'Greece', tax_location: 'GR', postal_region: 'EU'},
gl: {name: 'Greenland', tax_location: 'OS', postal_region: 'EU'},
gd: {name: 'Grenada', tax_location: 'OS', postal_region: 'RW'},
gp: {name: 'Guadeloupe', tax_location: 'OS', postal_region: 'RW'},
gu: {name: 'Guam', tax_location: 'OS', postal_region: 'RW'},
gt: {name: 'Guatemala', tax_location: 'OS', postal_region: 'RW'},
gg: {name: 'Guernsey', tax_location: 'OS', postal_region: 'RW'},
gn: {name: 'Guinea', tax_location: 'OS', postal_region: 'RW'},
gw: {name: 'Guinea-bissau', tax_location: 'OS', postal_region: 'RW'},
gy: {name: 'Guyana', tax_location: 'OS', postal_region: 'RW'},
ht: {name: 'Haiti', tax_location: 'OS', postal_region: 'RW'},
hm: {name: 'Heard Island and Mcdonald Islands', tax_location: 'OS', postal_region: 'RW'},
va: {name: 'Holy See (Vatican City State)', tax_location: 'OS', postal_region: 'EU'},
hn: {name: 'Honduras', tax_location: 'OS', postal_region: 'RW'},
hk: {name: 'Hong Kong', tax_location: 'OS', postal_region: 'RW'},
hu: {name: 'Hungary', tax_location: 'HU', postal_region: 'EU'},
is: {name: 'Iceland', tax_location: 'OS', postal_region: 'EU'},
in: {name: 'India', tax_location: 'OS', postal_region: 'RW'},
id: {name: 'Indonesia', tax_location: 'OS', postal_region: 'RW'},
ir: {name: 'Iran, Islamic Republic of', tax_location: 'OS', postal_region: 'RW'},
iq: {name: 'Iraq', tax_location: 'OS', postal_region: 'RW'},
ie: {name: 'Ireland', tax_location: 'IE', postal_region: 'EU'},
im: {name: 'Isle of Man', tax_location: 'UK', postal_region: 'UK'},
il: {name: 'Israel', tax_location: 'OS', postal_region: 'RW'},
it: {name: 'Italy', tax_location: 'IT', postal_region: 'EU'},
jm: {name: 'Jamaica', tax_location: 'OS', postal_region: 'RW'},
jp: {name: 'Japan', tax_location: 'OS', postal_region: 'RW'},
je: {name: 'Jersey', tax_location: 'OS', postal_region: 'RW'},
jo: {name: 'Jordan', tax_location: 'OS', postal_region: 'RW'},
kz: {name: 'Kazakhstan', tax_location: 'OS', postal_region: 'EU'},
ke: {name: 'Kenya', tax_location: 'OS', postal_region: 'RW'},
ki: {name: 'Kiribati', tax_location: 'OS', postal_region: 'RW'},
kp: {name: 'Korea, Democratic People\'s Republic of', tax_location: 'OS', postal_region: 'RW'},
kr: {name: 'Korea, Republic of', tax_location: 'OS', postal_region: 'RW'},
kw: {name: 'Kuwait', tax_location: 'OS', postal_region: 'RW'},
kg: {name: 'Kyrgyzstan', tax_location: 'OS', postal_region: 'EU'},
la: {name: 'Lao People\'s Democratic Republic', tax_location: 'OS', postal_region: 'RW'},
lv: {name: 'Latvia', tax_location: 'LV', postal_region: 'EU'},
lb: {name: 'Lebanon', tax_location: 'OS', postal_region: 'RW'},
ls: {name: 'Lesotho', tax_location: 'OS', postal_region: 'RW'},
lr: {name: 'Liberia', tax_location: 'OS', postal_region: 'RW'},
ly: {name: 'Libyan Arab Jamahiriya', tax_location: 'OS', postal_region: 'RW'},
li: {name: 'Liechtenstein', tax_location: 'OS', postal_region: 'EU'},
lt: {name: 'Lithuania', tax_location: 'LT', postal_region: 'EU'},
lu: {name: 'Luxembourg', tax_location: 'LU', postal_region: 'EU'},
mo: {name: 'Macao', tax_location: 'OS', postal_region: 'RW'},
mk: {name: 'Macedonia, the Former Yugoslav Republic of', tax_location: 'OS', postal_region: 'EU'},
mg: {name: 'Madagascar', tax_location: 'OS', postal_region: 'RW'},
mw: {name: 'Malawi', tax_location: 'OS', postal_region: 'RW'},
my: {name: 'Malaysia', tax_location: 'OS', postal_region: 'RW'},
mv: {name: 'Maldives', tax_location: 'OS', postal_region: 'RW'},
ml: {name: 'Mali', tax_location: 'OS', postal_region: 'RW'},
mt: {name: 'Malta', tax_location: 'MT', postal_region: 'EU'},
mh: {name: 'Marshall Islands', tax_location: 'OS', postal_region: 'RW'},
mq: {name: 'Martinique', tax_location: 'OS', postal_region: 'RW'},
mr: {name: 'Mauritania', tax_location: 'OS', postal_region: 'RW'},
mu: {name: 'Mauritius', tax_location: 'OS', postal_region: 'RW'},
yt: {name: 'Mayotte', tax_location: 'OS', postal_region: 'RW'},
mx: {name: 'Mexico', tax_location: 'OS', postal_region: 'RW'},
fm: {name: 'Micronesia, Federated States of', tax_location: 'OS', postal_region: 'RW'},
md: {name: 'Moldova, Republic of', tax_location: 'OS', postal_region: 'EU'},
mc: {name: 'Monaco', tax_location: 'OS', postal_region: 'RW'},
mn: {name: 'Mongolia', tax_location: 'OS', postal_region: 'RW'},
me: {name: 'Montenegro', tax_location: 'OS', postal_region: 'EU'},
ms: {name: 'Montserrat', tax_location: 'OS', postal_region: 'RW'},
ma: {name: 'Morocco', tax_location: 'OS', postal_region: 'RW'},
mz: {name: 'Mozambique', tax_location: 'OS', postal_region: 'RW'},
mm: {name: 'Myanmar', tax_location: 'OS', postal_region: 'RW'},
na: {name: 'Namibia', tax_location: 'OS', postal_region: 'RW'},
nr: {name: 'Nauru', tax_location: 'OS', postal_region: 'RW'},
np: {name: 'Nepal', tax_location: 'OS', postal_region: 'RW'},
nl: {name: 'Netherlands', tax_location: 'NL', postal_region: 'EU'},
an: {name: 'Netherlands Antilles', tax_location: 'OS', postal_region: 'RW'},
nc: {name: 'New Caledonia', tax_location: 'OS', postal_region: 'RW'},
nz: {name: 'New Zealand', tax_location: 'OS', postal_region: 'RW'},
ni: {name: 'Nicaragua', tax_location: 'OS', postal_region: 'RW'},
ne: {name: 'Niger', tax_location: 'OS', postal_region: 'RW'},
ng: {name: 'Nigeria', tax_location: 'OS', postal_region: 'RW'},
nu: {name: 'Niue', tax_location: 'OS', postal_region: 'RW'},
nf: {name: 'Norfolk Island', tax_location: 'OS', postal_region: 'RW'},
mp: {name: 'Northern Mariana Islands', tax_location: 'OS', postal_region: 'RW'},
no: {name: 'Norway', tax_location: 'OS', postal_region: 'EU'},
om: {name: 'Oman', tax_location: 'OS', postal_region: 'RW'},
pk: {name: 'Pakistan', tax_location: 'OS', postal_region: 'RW'},
pw: {name: 'Palau', tax_location: 'OS', postal_region: 'RW'},
ps: {name: 'Palestinian Territory, Occupied', tax_location: 'OS', postal_region: 'RW'},
pa: {name: 'Panama', tax_location: 'OS', postal_region: 'RW'},
pg: {name: 'Papua New Guinea', tax_location: 'OS', postal_region: 'RW'},
py: {name: 'Paraguay', tax_location: 'OS', postal_region: 'RW'},
pe: {name: 'Peru', tax_location: 'OS', postal_region: 'RW'},
ph: {name: 'Philippines', tax_location: 'OS', postal_region: 'RW'},
pn: {name: 'Pitcairn', tax_location: 'OS', postal_region: 'RW'},
pl: {name: 'Poland', tax_location: 'PL', postal_region: 'EU'},
pt: {name: 'Portugal', tax_location: 'PT', postal_region: 'EU'},
pr: {name: 'Puerto Rico', tax_location: 'OS', postal_region: 'RW'},
qa: {name: 'Qatar', tax_location: 'OS', postal_region: 'RW'},
re: {name: 'Reunion', tax_location: 'OS', postal_region: 'RW'},
ro: {name: 'Romania', tax_location: 'RO', postal_region: 'EU'},
ru: {name: 'Russia', tax_location: 'OS', postal_region: 'EU'},
// ru: {name: 'Russian Federation', tax_location: 'OS', postal_region: 'EU'},
rw: {name: 'Rwanda', tax_location: 'OS', postal_region: 'RW'},
bl: {name: 'Saint Barthelemy', tax_location: 'OS', postal_region: 'RW'},
sh: {name: 'Saint Helena, Ascension and Tristan Da Cunha', tax_location: 'OS', postal_region: 'RW'},
kn: {name: 'Saint Kitts and Nevis', tax_location: 'OS', postal_region: 'RW'},
lc: {name: 'Saint Lucia', tax_location: 'OS', postal_region: 'RW'},
mf: {name: 'Saint Martin', tax_location: 'OS', postal_region: 'RW'},
pm: {name: 'Saint Pierre and Miquelon', tax_location: 'OS', postal_region: 'RW'},
vc: {name: 'Saint Vincent and the Grenadines', tax_location: 'OS', postal_region: 'RW'},
ws: {name: 'Samoa', tax_location: 'OS', postal_region: 'RW'},
sm: {name: 'San Marino', tax_location: 'OS', postal_region: 'EU'},
st: {name: 'Sao Tome and Principe', tax_location: 'OS', postal_region: 'RW'},
sa: {name: 'Saudi Arabia', tax_location: 'OS', postal_region: 'RW'},
sn: {name: 'Senegal', tax_location: 'OS', postal_region: 'RW'},
rs: {name: 'Serbia', tax_location: 'OS', postal_region: 'EU'},
sc: {name: 'Seychelles', tax_location: 'OS', postal_region: 'RW'},
sl: {name: 'Sierra Leone', tax_location: 'OS', postal_region: 'RW'},
sg: {name: 'Singapore', tax_location: 'OS', postal_region: 'RW'},
sk: {name: 'Slovakia', tax_location: 'SK', postal_region: 'EU'},
si: {name: 'Slovenia', tax_location: 'SI', postal_region: 'EU'},
sb: {name: 'Solomon Islands', tax_location: 'OS', postal_region: 'RW'},
so: {name: 'Somalia', tax_location: 'OS', postal_region: 'RW'},
za: {name: 'South Africa', tax_location: 'OS', postal_region: 'RW'},
gs: {name: 'South Georgia and the South Sandwich Islands', tax_location: 'OS', postal_region: 'RW'},
es: {name: 'Spain', tax_location: 'ES', postal_region: 'EU'},
lk: {name: 'Sri Lanka', tax_location: 'OS', postal_region: 'RW'},
sd: {name: 'Sudan', tax_location: 'OS', postal_region: 'RW'},
sr: {name: 'Suriname', tax_location: 'OS', postal_region: 'RW'},
sj: {name: 'Svalbard and Jan Mayen', tax_location: 'OS', postal_region: 'RW'},
sz: {name: 'Swaziland', tax_location: 'OS', postal_region: 'RW'},
se: {name: 'Sweden', tax_location: 'SE', postal_region: 'EU'},
ch: {name: 'Switzerland', tax_location: 'OS', postal_region: 'EU'},
sy: {name: 'Syrian Arab Republic', tax_location: 'OS', postal_region: 'RW'},
tw: {name: 'Taiwan', tax_location: 'OS', postal_region: 'RW'},
tj: {name: 'Tajikistan', tax_location: 'OS', postal_region: 'EU'},
tz: {name: 'Tanzania, United Republic of', tax_location: 'OS', postal_region: 'RW'},
th: {name: 'Thailand', tax_location: 'OS', postal_region: 'RW'},
tl: {name: 'Timor-leste', tax_location: 'OS', postal_region: 'RW'},
tg: {name: 'Togo', tax_location: 'OS', postal_region: 'RW'},
tk: {name: 'Tokelau', tax_location: 'OS', postal_region: 'RW'},
to: {name: 'Tonga', tax_location: 'OS', postal_region: 'RW'},
tt: {name: 'Trinidad and Tobago', tax_location: 'OS', postal_region: 'RW'},
tn: {name: 'Tunisia', tax_location: 'OS', postal_region: 'RW'},
tr: {name: 'Turkey', tax_location: 'OS', postal_region: 'EU'},
tm: {name: 'Turkmenistan', tax_location: 'OS', postal_region: 'EU'},
tc: {name: 'Turks and Caicos Islands', tax_location: 'OS', postal_region: 'RW'},
tv: {name: 'Tuvalu', tax_location: 'OS', postal_region: 'RW'},
ug: {name: 'Uganda', tax_location: 'OS', postal_region: 'RW'},
ua: {name: 'Ukraine', tax_location: 'OS', postal_region: 'EU'},
ae: {name: 'United Arab Emirates', tax_location: 'OS', postal_region: 'RW'},
gb: {name: 'United Kingdom', tax_location: 'UK', postal_region: 'UK'},
us: {name: 'United States', tax_location: 'OS', postal_region: 'RW'},
um: {name: 'United States Minor Outlying Islands', tax_location: 'OS', postal_region: 'RW'},
uy: {name: 'Uruguay', tax_location: 'OS', postal_region: 'RW'},
uz: {name: 'Uzbekistan', tax_location: 'OS', postal_region: 'EU'},
vu: {name: 'Vanuatu', tax_location: 'OS', postal_region: 'RW'},
ve: {name: 'Venezuela, Bolivarian Republic of', tax_location: 'OS', postal_region: 'RW'},
vn: {name: 'Viet Nam', tax_location: 'OS', postal_region: 'RW'},
vg: {name: 'Virgin Islands, British', tax_location: 'OS', postal_region: 'RW'},
vi: {name: 'Virgin Islands, U.S.', tax_location: 'OS', postal_region: 'RW'},
wf: {name: 'Wallis and Futuna', tax_location: 'OS', postal_region: 'RW'},
eh: {name: 'Western Sahara', tax_location: 'OS', postal_region: 'RW'},
ye: {name: 'Yemen', tax_location: 'OS', postal_region: 'RW'},
zm: {name: 'Zambia', tax_location: 'OS', postal_region: 'RW'},
zw: {name: 'Zimbabwe', tax_location: 'OS', postal_region: 'RW'}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment