MCPcopy Create free account
hub / github.com/VPSDance/ai-proxy-rules / pickRuleKeys

Function pickRuleKeys

scripts/rules.ts:66–74  ·  view source on GitHub ↗
(rules: RuleSet, keys: RuleKey[])

Source from the content-addressed store, hash-verified

64}
65
66export function pickRuleKeys(rules: RuleSet, keys: RuleKey[]): RuleSet {
67 const picked = emptyRuleSet();
68
69 for (const key of keys) {
70 picked[key] = [...rules[key]] as never;
71 }
72
73 return normalizeRuleSet(picked);
74}
75
76export function removeCoveredDomains(ruleSets: RuleSet[]): RuleSet[] {
77 const suffixes = mergeRuleSets(ruleSets).domainSuffix;

Callers 1

buildProviderDataFunction · 0.85

Calls 2

emptyRuleSetFunction · 0.85
normalizeRuleSetFunction · 0.85

Tested by

no test coverage detected