Add app package

This commit is contained in:
Jon Staab
2024-08-30 09:46:47 -07:00
parent e462ec2ada
commit 6e1ad713c3
34 changed files with 1193 additions and 48 deletions
+4
View File
@@ -139,6 +139,10 @@ export const parseJson = (json: string | Nil) => {
}
}
export const getJson = (k: string) => parseJson(localStorage.getItem(k) || "")
export const setJson = (k: string, v: any) => localStorage.setItem(k, JSON.stringify(v))
export const tryCatch = <T>(f: () => T, onError?: (e: Error) => void): T | undefined => {
try {
const r = f()