MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / pathToKey

Function pathToKey

frontend/preview/preview.tsx:35–37  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

33// Derive a human-readable key from the file path, e.g.:
34// "./previews/modal-about.preview.tsx" → "modal-about"
35function pathToKey(path: string): string {
36 return path.replace(/^\.\/previews\//, "").replace(/\.preview\.tsx$/, "");
37}
38
39// Build a map of key → lazy React component.
40// Each preview file is expected to have a default export that is the preview component.

Callers 1

preview.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected