MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / matchesPathPattern

Function matchesPathPattern

apps/cloud/src/edge/marketing.ts:67–68  ·  view source on GitHub ↗
(pathname: string, pattern: string)

Source from the content-addressed store, hash-verified

65/** A path pattern is an exact path, or `/x/*`, which matches every path
66 * that starts with `/x/` (and not `/x` itself). */
67const matchesPathPattern = (pathname: string, pattern: string): boolean =>
68 pattern.endsWith("/*") ? pathname.startsWith(pattern.slice(0, -1)) : pathname === pattern;
69
70/** Path patterns v2 answers on `executor.sh`. `/git/*` never matches
71 * `/gitlab/...`. v2's outbound OAuth client metadata document stays off this

Callers 3

isV2PathFunction · 0.85
isV2MarketingPathFunction · 0.85
isV2TelemetryPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected