trycatchify

0.0.3 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i trycatchify

Weekly Downloads

0

Version

0.0.3

License

ISC

Unpacked Size

1.86 kB

Total Files

5

Last publish

Collaborators

  • sahilrajput03