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

Function makeUrlMatcher

src/pkg/utils/match.test.ts:409–416  ·  view source on GitHub ↗
(uuid: string, matchesList: string[], excludeMatchesList: string[])

Source from the content-addressed store, hash-verified

407});
408
409const makeUrlMatcher = (uuid: string, matchesList: string[], excludeMatchesList: string[]) => {
410 const urlMatcher = new UrlMatch<string>();
411 urlMatcher.addRules(
412 uuid,
413 extractUrlPatterns([...matchesList.map((e) => `@include ${e}`), ...excludeMatchesList.map((e) => `@exclude ${e}`)])
414 );
415 return { urlMatcher };
416};
417
418describe.concurrent("UrlMatch-exclusion", () => {
419 it.concurrent("exclusion-1", () => {

Callers 1

match.test.tsFile · 0.85

Calls 2

addRulesMethod · 0.95
extractUrlPatternsFunction · 0.90

Tested by

no test coverage detected