Skip to content

Commit f90f9e8

Browse files
committed
updating readme
1 parent 5e4e94b commit f90f9e8

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

readme.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
# Try-catch-finally-hooks
22

3-
Try-catch-finally-hooks is a simple AOP-ish toolset that lets to wrap sync and async functions and class methods with hooks, that let:
3+
![NPM Version](https://img.shields.io/npm/v/try-catch-finally-hooks)
44

5-
- override:
6-
- input parameters
7-
- result
8-
- this arg
5+
This is a simple AOP-ish toolset that lets to wrap sync and async functions and class methods with hooks which let you:
6+
7+
- override onTry:
8+
- function's input parameters
9+
- function's this arg
910
- function itself (hook can conditionally do some extra wrapping)
10-
- handle and override error
11+
- handle and override error (onCatch, onFinally)
12+
- function's result
13+
- function's error to (re-)throw
1114

1215
It supports using as decorator, function wrapper or scope of anonymous function
16+
17+
See [specs](./specs) for examples

0 commit comments

Comments
 (0)