diff options
Diffstat (limited to 'client/types.js')
| -rw-r--r-- | client/types.js | 17 |
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' |
