Total Complexity | 4 |
Complexity/F | 1 |
Lines of Code | 11 |
Function Count | 4 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | const { statSync, readdirSync } = require('fs') |
||
2 | const { join } = require('path') |
||
3 | |||
4 | const isDirectory = ruleDir => statSync(ruleDir).isDirectory() |
||
5 | |||
6 | module.exports = { |
||
7 | getAllRuleName: ruleDir => |
||
8 | readdirSync(ruleDir).filter(name => isDirectory(join(ruleDir, name))), |
||
9 | |||
10 | load: path => require(path) |
||
11 | } |
||
12 |