(jsBox, hnBox = [])
| 2189 | } |
| 2190 | |
| 2191 | function collectUsedArgumentKeys(jsBox, hnBox = []) { |
| 2192 | const keys = new Set() |
| 2193 | for (let i = 0; i < jsBox.length; i++) { |
| 2194 | ;['jsarg', 'jsenable', 'cronexp'].forEach(field => { |
| 2195 | getTemplateKeys(jsBox[i][field] || '').forEach(key => keys.add(key)) |
| 2196 | }) |
| 2197 | } |
| 2198 | for (let i = 0; i < hnBox.length; i++) { |
| 2199 | const key = getHnToggleKey(hnBox[i]) |
| 2200 | key && keys.add(key) |
| 2201 | } |
| 2202 | return keys |
| 2203 | } |
| 2204 | |
| 2205 | function filterLoonArguments(args, jsBox, hnBox = []) { |
| 2206 | const usedKeys = collectUsedArgumentKeys(jsBox, hnBox) |
no test coverage detected