summaryrefslogtreecommitdiff
path: root/client/types.js
blob: fb1fbe30572d5e9ebe19699636ccaa376ae43c7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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'