mirror of
https://github.com/ershisan99/DevToysWeb.git
synced 2025-12-16 20:49:23 +00:00
refactor: use Options instead of Errors
This commit is contained in:
4
lib/uri.ts
Normal file
4
lib/uri.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { tryCatchK } from "fp-ts/lib/Option";
|
||||
|
||||
export const safeEncodeURIComponent = tryCatchK(encodeURIComponent);
|
||||
export const safeDecodeURIComponent = tryCatchK(decodeURIComponent);
|
||||
Reference in New Issue
Block a user