0.0.3 • Published 3 years ago

trycatchify v0.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Trycathchify

Personal abstraction for fast debugging and DX.

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