Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 14 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import compose from 'compose-function'; |
||
2 | |||
3 | import reserveName from './reserve-name'; |
||
4 | |||
5 | /* |
||
6 | enhanced compose function to attach reserveName enhancer to each decorator |
||
7 | so that action function name can be passed through the chain |
||
8 | */ |
||
9 | const reserveNameCompose = (...args) => { |
||
10 | const enhancedArgs = args.map(arg => reserveName(arg)); |
||
11 | return compose(...enhancedArgs); |
||
12 | }; |
||
13 | |||
14 | export default reserveNameCompose; |
||
15 |