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

Function matching

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

Source from the content-addressed store, hash-verified

61
62const matching =
63 (re: RegExp, maxLen: number): Sanitize =>
64 (v) =>
65 typeof v === 'string' && v.length > 0 && v.length <= maxLen && re.test(v) ? v : undefined;
66
67const token = (maxLen: number): Sanitize => matching(TOKEN_RE, maxLen);
68const label = (maxLen: number): Sanitize => matching(LABEL_RE, maxLen);

Callers 2

tokenFunction · 0.70
labelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected