summaryrefslogtreecommitdiff
path: root/scraper/client/types.js
diff options
context:
space:
mode:
Diffstat (limited to 'scraper/client/types.js')
-rw-r--r--scraper/client/types.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/scraper/client/types.js b/scraper/client/types.js
new file mode 100644
index 00000000..8507d556
--- /dev/null
+++ b/scraper/client/types.js
@@ -0,0 +1,13 @@
+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 api = tagAsType('api', [
+ 'loading', 'loaded', 'error',
+])
+
+export const init = '@@INIT'