Merged master into feat/validsession

This commit is contained in:
Linus Flood
2024-12-18 06:23:11 +00:00
37 changed files with 649 additions and 287 deletions

9
utils/isValidJson.ts Normal file
View File

@@ -0,0 +1,9 @@
export default function isValidJson(value: string | null | undefined): boolean {
if (!value || value === "undefined") return false
try {
JSON.parse(value)
return true
} catch {
return false
}
}