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

Function toRequestPath

src/ui-server/api/source.ts:94–96  ·  view source on GitHub ↗
(requested: string)

Source from the content-addressed store, hash-verified

92 * chokepoint's absolute-path rule with nothing to catch.
93 */
94export function toRequestPath(requested: string): string {
95 return requested.replace(/\\/g, '/').replace(/^\.\//, '');
96}
97
98/**
99 * Validate a viewer-supplied path, THEN look it up in the index.

Callers 4

loadFileFunction · 0.90
windowForFunction · 0.90
findIndexedFileFunction · 0.85
resolveRequestedFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected