Total Complexity | 2 |
Complexity/F | 2 |
Lines of Code | 9 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | module.exports = ($, options) => { |
||
2 | const rule = options && options.rules && options.rules.h1 |
||
3 | const threadhold = (rule && rule.threadhold) || 1 |
||
4 | const count = $('h1').length |
||
5 | |||
6 | return count > threadhold |
||
7 | ? `This HTML has more than ${threadhold} <h1> tag` |
||
8 | : null |
||
9 | } |
||
10 |