MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / matching

Function matching

telemetry-worker/src/index.ts:44–46  ·  view source on GitHub ↗
(re: RegExp, maxLen: number)

Source from the content-addressed store, hash-verified

42
43const matching =
44 (re: RegExp, maxLen: number): Sanitize =>
45 (v) =>
46 typeof v === 'string' && v.length > 0 && v.length <= maxLen && re.test(v) ? v : undefined;
47
48const token = (maxLen: number): Sanitize => matching(TOKEN_RE, maxLen);
49const label = (maxLen: number): Sanitize => matching(LABEL_RE, maxLen);

Callers 2

tokenFunction · 0.85
labelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected