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