MCPcopy Create free account
hub / github.com/scriptscat/scriptcat / addRules

Method addRules

src/pkg/utils/match.ts:13–18  ·  view source on GitHub ↗
(uuid: T, rules: URLRuleEntry[])

Source from the content-addressed store, hash-verified

11 }
12
13 public addRules(uuid: T, rules: URLRuleEntry[]) {
14 this.cacheMap.clear();
15 let map = this.rulesMap.get(uuid);
16 if (!map) this.rulesMap.set(uuid, (map = []));
17 map.push(...rules);
18 }
19
20 public urlMatch(url: string): T[] {
21 const cacheMap = this.cacheMap;

Callers 9

makeUrlMatcherFunction · 0.95
addIncludeMethod · 0.95
addMatchMethod · 0.95
addExcludeMethod · 0.95
blackListSelfCheckFunction · 0.95
match.test.tsFile · 0.80
waitInitMethod · 0.80
loadBlacklistMethod · 0.80
scriptMatchEntryMethod · 0.80

Calls 4

pushMethod · 0.80
clearMethod · 0.65
getMethod · 0.65
setMethod · 0.65

Tested by 1

makeUrlMatcherFunction · 0.76