summaryrefslogtreecommitdiff
path: root/client/types.js
diff options
context:
space:
mode:
authorAdam Harvey <adam@ahprojects.com>2018-12-23 01:37:03 +0100
committerAdam Harvey <adam@ahprojects.com>2018-12-23 01:37:03 +0100
commit4452e02e8b04f3476273574a875bb60cfbb4568b (patch)
tree3ffa44f9621b736250a8b94da14a187dc785c2fe /client/types.js
parent2a65f7a157bd4bace970cef73529867b0e0a374d (diff)
parent5340bee951c18910fd764241945f1f136b5a22b4 (diff)
.
Diffstat (limited to 'client/types.js')
-rw-r--r--client/types.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/client/types.js b/client/types.js
new file mode 100644
index 00000000..fb1fbe30
--- /dev/null
+++ b/client/types.js
@@ -0,0 +1,17 @@
+export const asType = (type, name) => [type, name].join('_').toUpperCase()
+export const tagAsType = (type, names) => (
+ names.reduce((tags, name) => {
+ tags[name] = asType(type, name)
+ return tags
+ }, {})
+)
+
+export const faceSearch = tagAsType('faceSearch', [
+ 'loading', 'loaded', 'error', 'update_options',
+])
+
+export const nameSearch = tagAsType('nameSearch', [
+ 'loading', 'loaded', 'error', 'update_options',
+])
+
+export const init = '@@INIT'