UNPKG
fuck-around-and-find-out
Version:
latest (1.0.1)
1.0.1
1.0.0
Instead of trying and catching, go ahead and fuck around if you wanna find out.
fuck-around-and-find-out
/
index.ts
9 lines
(8 loc)
•
185 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
function
fuckAround
(
action: () =>
void
, errorAction: (error: any) =>
void
):
void
{
try
{
action
(); }
catch
(error) {
errorAction
(error); } };
export
= fuckAround;