MCPcopy Create free account
hub / github.com/Aslemammad/venode / urlToFilenameWithoutHash

Function urlToFilenameWithoutHash

venode/src/file.ts:66–71  ·  view source on GitHub ↗
({pathname, host, hostname, port}: URL)

Source from the content-addressed store, hash-verified

64const invalidChars ='\\:?*"><|'
65
66export function urlToFilenameWithoutHash({pathname, host, hostname, port}: URL) {
67 for (const char of invalidChars) {
68 pathname = pathname.replace(char, "_");
69 }
70 return path.join('/', (port ? `${hostname}_PORT${port}` : host), pathname)
71}

Callers 2

file.test.tsFile · 0.90
resolveIdFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected