{"id":22409900,"url":"https://github.com/codingbeautydev/try-catch-fn","last_synced_at":"2025-03-27T02:24:41.996Z","repository":{"id":206687873,"uuid":"717448249","full_name":"codingbeautydev/try-catch-fn","owner":"codingbeautydev","description":"Intuitive functional JavaScript try-catch","archived":false,"fork":false,"pushed_at":"2023-11-12T03:39:22.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-03T04:47:20.545Z","etag":null,"topics":["functional-programming","javascript","npm","try-catch","typescript"],"latest_commit_sha":null,"homepage":"https://www.codingbeautydev.com/blog/javascript-functional-try-catch","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codingbeautydev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-11T14:13:46.000Z","updated_at":"2024-11-10T23:32:20.000Z","dependencies_parsed_at":"2023-12-01T20:48:01.494Z","dependency_job_id":null,"html_url":"https://github.com/codingbeautydev/try-catch-fn","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"3b3be290335f7dbbccd56588c537647d662a6a37"},"previous_names":["codingbeautydev/try-catch-fn"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingbeautydev%2Ftry-catch-fn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingbeautydev%2Ftry-catch-fn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingbeautydev%2Ftry-catch-fn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingbeautydev%2Ftry-catch-fn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codingbeautydev","download_url":"https://codeload.github.com/codingbeautydev/try-catch-fn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245768081,"owners_count":20668959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["functional-programming","javascript","npm","try-catch","typescript"],"created_at":"2024-12-05T12:10:20.321Z","updated_at":"2025-03-27T02:24:41.976Z","avatar_url":"https://github.com/codingbeautydev.png","language":"TypeScript","readme":"# try-catch-fn\n\nFunctional try-catch implementation.\n\nMore info here: [This is how functional try-catch transforms your JavaScript code](https://www.codingbeautydev.com/blog/javascript-functional-try-catch).\n\n## Usage\n\n```js\nimport { tryCatch } from 'try-catch-fn';\n\nconst status = tryCatch({\n  tryFn: () =\u003e {\n    throw new Error('network error');\n  },\n  catchFn: (err) =\u003e 'error',\n});\n\nconsole.log(status); // error\n```\n\nPass single function argument to simply \"silence\" any exception it throws.\n\n```js\nimport { tryCatch } from 'try-catch-fn';\n\nconst status = tryCatch(() =\u003e {\n  throw new Error('error');\n});\n\nconsole.log(status); // null\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingbeautydev%2Ftry-catch-fn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodingbeautydev%2Ftry-catch-fn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingbeautydev%2Ftry-catch-fn/lists"}