]>
Commit | Line | Data |
---|---|---|
1 | 'use strict'; | |
2 | ||
3 | const RuleGenerator = require('./rule_generator'); | |
4 | ||
5 | module.exports = { | |
6 | async run({ | |
7 | ruleCount | |
8 | }) { | |
9 | ||
10 | const rules = []; | |
11 | for (let i = 0; i < ruleCount; ++i) { | |
12 | rules.push(await RuleGenerator.generate()); | |
13 | } | |
14 | ||
15 | return rules.sort(() => Math.random() - 0.5); | |
16 | } | |
17 | } |