perf: reduce bundle size of some pages

This commit is contained in:
rusconn
2023-06-15 18:44:39 +09:00
parent 6612a3be2d
commit 4d198c5b96
10 changed files with 27 additions and 24 deletions

View File

@@ -1,4 +1,4 @@
import { tryCatchK } from "fp-ts/lib/Option";
import { fromThrowable } from "neverthrow";
export const safeEncodeURIComponent = tryCatchK(encodeURIComponent);
export const safeDecodeURIComponent = tryCatchK(decodeURIComponent);
export const safeEncodeURIComponent = fromThrowable(encodeURIComponent);
export const safeDecodeURIComponent = fromThrowable(decodeURIComponent);