summaryrefslogtreecommitdiff
path: root/client/state_lookup.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2017-04-21 16:03:11 -0400
committerJules Laplace <jules@okfoc.us>2017-04-21 16:03:11 -0400
commitef83dba4a83e23e38b67ee31b79e79c9e25a003d (patch)
treebe0e65ee556d215796f6c64e3df7d8adb5c51554 /client/state_lookup.js
parent5028ad81845308f3b1954dcc1fde664077fa0fa9 (diff)
display orders per product, download as csv
Diffstat (limited to 'client/state_lookup.js')
-rw-r--r--client/state_lookup.js74
1 files changed, 74 insertions, 0 deletions
diff --git a/client/state_lookup.js b/client/state_lookup.js
new file mode 100644
index 0000000..145f344
--- /dev/null
+++ b/client/state_lookup.js
@@ -0,0 +1,74 @@
+
+const states = {
+ 'Alabama': 'AL',
+ 'Alaska': 'AK',
+ 'Arizona': 'AZ',
+ 'Arkansas': 'AR',
+ 'California': 'CA',
+ 'Colorado': 'CO',
+ 'Connecticut': 'CT',
+ 'Delaware': 'DE',
+ 'District Of Columbia': 'DC',
+ 'Florida': 'FL',
+ 'Georgia': 'GA',
+ 'Hawaii': 'HI',
+ 'Idaho': 'ID',
+ 'Illinois': 'IL',
+ 'Indiana': 'IN',
+ 'Iowa': 'IA',
+ 'Kansas': 'KS',
+ 'Kentucky': 'KY',
+ 'Louisiana': 'LA',
+ 'Maine': 'ME',
+ 'Maryland': 'MD',
+ 'Massachusetts': 'MA',
+ 'Michigan': 'MI',
+ 'Minnesota': 'MN',
+ 'Mississippi': 'MS',
+ 'Missouri': 'MO',
+ 'Montana': 'MT',
+ 'Nebraska': 'NE',
+ 'Nevada': 'NV',
+ 'New Hampshire': 'NH',
+ 'New Jersey': 'NJ',
+ 'New Mexico': 'NM',
+ 'New York': 'NY',
+ 'North Carolina': 'NC',
+ 'North Dakota': 'ND',
+ 'Ohio': 'OH',
+ 'Oklahoma': 'OK',
+ 'Oregon': 'OR',
+ 'Pennsylvania': 'PA',
+ 'Rhode Island': 'RI',
+ 'South Carolina': 'SC',
+ 'South Dakota': 'SD',
+ 'Tennessee': 'TN',
+ 'Texas': 'TX',
+ 'Utah': 'UT',
+ 'Vermont': 'VT',
+ 'Virginia': 'VA',
+ 'Washington': 'WA',
+ 'West Virginia': 'WV',
+ 'Wisconsin': 'WI',
+ 'Wyoming': 'WY',
+ 'Alberta': 'AB',
+ 'British Columbia': 'BC',
+ 'Manitoba': 'MB',
+ 'New Brunswick': 'NB',
+ 'Newfoundland and Labrador': 'NL',
+ 'Nova Scotia': 'NS',
+ 'Northwest Territories': 'NT',
+ 'Nunavut': 'NU',
+ 'Ontario': 'ON',
+ 'Prince Edward Island': 'PE',
+ 'Saskatchewan': 'SK',
+ 'Quebec': 'QC',
+ 'Yukon': 'YT',
+}
+
+export default function lookup (state) {
+ if (state in states) {
+ return states[state]
+ }
+ return state
+}