MCPcopy Create free account
hub / github.com/cifertech/DisplayKit / buildIconUrl

Function buildIconUrl

app.js:2650–2659  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

2648}
2649
2650function buildIconUrl(file) {
2651 // Important: encode spaces and other characters safely, without breaking subpaths
2652 const raw = String(file || "").replace(/\\/g, "/").replace(/^\/+/, "");
2653 const encoded = raw
2654 .split("/")
2655 .filter(Boolean)
2656 .map((seg) => encodeURIComponent(seg))
2657 .join("/");
2658 return `icons/${encoded}`;
2659}
2660
2661function inferTagsFromName(name) {
2662 return String(name || "")

Callers 2

loadFileIconsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected