MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / sanitizeHostForPath

Function sanitizeHostForPath

apps/cli/src/daemon-state.ts:78–79  ·  view source on GitHub ↗
(hostname: string)

Source from the content-addressed store, hash-verified

76 process.env.EXECUTOR_DATA_DIR ?? path.join(homedir(), ".executor");
77
78const sanitizeHostForPath = (hostname: string): string =>
79 hostname.replaceAll(/[^a-z0-9.-]+/gi, "_");
80const scopeKeyForPath = (scopeId: string): string =>
81 createHash("sha256").update(scopeId).digest("hex").slice(0, 24);
82

Callers 2

daemonRecordPathFunction · 0.85
daemonPointerPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected