Total Complexity | 4 |
Complexity/F | 1.33 |
Lines of Code | 13 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import addHooks from './helpers/add-hooks'; |
||
2 | |||
3 | const errorMute = ({ condition = () => true } = {}) => |
||
4 | addHooks({ |
||
5 | errorHook: (e, p, m, c, a) => { |
||
6 | if (condition(e, p, m, c, a)) { |
||
7 | return e; |
||
8 | } |
||
9 | return undefined; |
||
10 | }, |
||
11 | }); |
||
12 | |||
13 | export default errorMute; |
||
14 |