Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sahilrajput03/trycatchify
https://github.com/sahilrajput03/trycatchify
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sahilrajput03/trycatchify
- Owner: sahilrajput03
- Created: 2021-02-24T15:21:43.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-25T10:50:36.000Z (almost 4 years ago)
- Last Synced: 2024-12-02T19:17:35.794Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Trycathchify
Personal abstraction for fast debugging and DX.
```js
const {trycatchify} = require("trycatchify");// :: TEST CASE 1 WITH SIMPLE USAGE.
trycatchify(() => {
func();
});
// :: TEST CASE 2 WITH 2ND PARAM AS CATCH CALLBACK HANDLER.
trycatchify(
() => {
func();
},
() => {
console.log("Error occured :( ");
console.log("This block is in action now!!");
}
);
```Thanks.
~ Sahil Rajput