Total Complexity | 7 |
Complexity/F | 3.5 |
Lines of Code | 6 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | export const fire = (name, events, scope, ...args) => { |
||
2 | args = args.map(a => a && a.toJS ? a.toJS() : a); |
||
3 | return events && name && typeof events[name] === 'function' |
||
4 | ? events[name].apply(scope, args) |
||
5 | : undefined; |
||
6 | }; |
||
7 | |||
8 |