(state, lib)
| 249 | } |
| 250 | |
| 251 | function inScope(state, lib) { |
| 252 | if (!state.scope) return true; // no scope => allow all |
| 253 | if (!lib) return false; // unknown module, scope active => drop |
| 254 | for (const s of state.scope) if (lib.includes(s)) return true; |
| 255 | return false; |
| 256 | } |
| 257 | |
| 258 | function eventsConfig() { |
| 259 | const t = CONFIG.trace; |