sinProject-Inc/talk

View on GitHub
src/params/theme.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { Theme } from '@prisma/client'
import type { ParamMatcher } from '@sveltejs/kit'

export const match = ((param: string): boolean => {
    if (Object.values(Theme).includes(param as Theme)) {
        return true
    } else {
        return false
    }
}) satisfies ParamMatcher