forked from polka_billy/porridger
Code styling
Added brackets for const lambdas Converted const lambdas with multiple instructions to functions
This commit is contained in:
@ -4,7 +4,9 @@ const categories = ['PORRIDGE', 'conspects', 'milk', 'bred', 'wathing', 'cloth',
|
||||
'fruits_vegatables', 'soup', 'dinner', 'conserves', 'pens', 'other_things'] as const
|
||||
type Category = typeof categories[number]
|
||||
|
||||
const isCategory = (obj: unknown): obj is Category => isLiteralUnion(obj, categories)
|
||||
const isCategory = (obj: unknown): obj is Category => (
|
||||
isLiteralUnion(obj, categories)
|
||||
)
|
||||
|
||||
const categoryGraphics: Record<Category, string> = {
|
||||
'PORRIDGE': 'static/PORRIDGE.jpg',
|
||||
|
@ -101,9 +101,9 @@ const lineNames: Record<Lines, string> = {
|
||||
violet: 'Фиолетовая',
|
||||
}
|
||||
|
||||
const lineByName = (name: string) =>
|
||||
const lineByName = (name: string) => (
|
||||
lines.find(line => stations[line].has(name))
|
||||
|
||||
)
|
||||
|
||||
export type { Lines }
|
||||
export { lines, stations, colors, lineNames, lineByName }
|
||||
|
Reference in New Issue
Block a user