MCPcopy Create free account
hub / github.com/arctic-cli/interface / sanitize

Function sanitize

packages/web/app/api/track/usage/route.ts:156–161  ·  view source on GitHub ↗
(value: string | undefined)

Source from the content-addressed store, hash-verified

154}
155
156function sanitize(value: string | undefined): string | undefined {
157 if (!value) return undefined
158 // only allow alphanumeric, dash, underscore, slash, dot
159 const sanitized = value.replace(/[^a-zA-Z0-9\-_/.]/g, "").slice(0, 100)
160 return sanitized || undefined
161}

Callers 1

POSTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected