manifold/common/categories.ts
2022-06-21 10:01:51 -05:00

33 lines
720 B
TypeScript

import { difference } from 'lodash'
export const CATEGORIES = {
politics: 'Politics',
technology: 'Technology',
science: 'Science',
world: 'World',
sports: 'Sports',
economics: 'Economics',
personal: 'Personal',
culture: 'Culture',
manifold: 'Manifold',
covid: 'Covid',
crypto: 'Crypto',
gaming: 'Gaming',
fun: 'Fun',
}
export type category = keyof typeof CATEGORIES
export const TO_CATEGORY = Object.fromEntries(
Object.entries(CATEGORIES).map(([k, v]) => [v, k])
)
export const CATEGORY_LIST = Object.keys(CATEGORIES)
export const EXCLUDED_CATEGORIES: category[] = ['fun', 'manifold', 'personal']
export const DEFAULT_CATEGORIES = difference(
CATEGORY_LIST,
EXCLUDED_CATEGORIES
)