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

Function stripFileProtocol

packages/app/src/context/file/path.ts:1–4  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

1export function stripFileProtocol(input: string) {
2 if (!input.startsWith("file://")) return input
3 return input.slice("file://".length)
4}
5
6export function stripQueryAndHash(input: string) {
7 const hashIndex = input.indexOf("#")

Callers 1

normalizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected