MCPcopy Index your code
hub / github.com/anomalyco/opencode / sanitize

Function sanitize

packages/opencode/src/mcp/catalog.ts:117–117  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

115}
116
117export const sanitize = (value: string) => value.replace(/[^a-zA-Z0-9_-]/g, "_")
118
119export const toolName = (clientName: string, name: string) => sanitize(clientName) + "_" + sanitize(name)
120

Callers 2

fetchFunction · 0.70
toolNameFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected