1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-04-22 10:52:10 +00:00

Update util.ts

This commit is contained in:
Florian Bouillon 2021-12-30 23:46:27 +00:00 committed by GitHub
parent 1d8077d8b4
commit df5bb1aae3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,5 @@
import { SupportedLanguages } from '@tcgdex/sdk' import { SupportedLanguages } from '@tcgdex/sdk'
import { Response } from 'express' import { Response } from 'express'
import fs from 'fs'
export function checkLanguage(str: string): str is SupportedLanguages { export function checkLanguage(str: string): str is SupportedLanguages {
return ['en', 'fr', 'es', 'it', 'pt', 'de'].includes(str) return ['en', 'fr', 'es', 'it', 'pt', 'de'].includes(str)