mirror of
https://github.com/ershisan99/DevToysWeb.git
synced 2025-12-17 04:59:23 +00:00
refactor: use Options instead of Errors
This commit is contained in:
3
lib/json.ts
Normal file
3
lib/json.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { tryCatchK } from "fp-ts/lib/Option";
|
||||
|
||||
export const safeJsonParse = tryCatchK(JSON.parse);
|
||||
Reference in New Issue
Block a user