File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 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
1215It supports using as decorator, function wrapper or scope of anonymous function
16+
17+ See [ specs] ( ./specs ) for examples
You can’t perform that action at this time.
0 commit comments