MCPcopy Create free account
hub / github.com/Script-Hub-Org/Script-Hub / collectUsedArgumentKeys

Function collectUsedArgumentKeys

Rewrite-Parser.beta.js:2191–2203  ·  view source on GitHub ↗
(jsBox, hnBox = [])

Source from the content-addressed store, hash-verified

2189}
2190
2191function 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
2205function filterLoonArguments(args, jsBox, hnBox = []) {
2206 const usedKeys = collectUsedArgumentKeys(jsBox, hnBox)

Callers 1

filterLoonArgumentsFunction · 0.85

Calls 2

getTemplateKeysFunction · 0.85
getHnToggleKeyFunction · 0.85

Tested by

no test coverage detected