(file)
| 2637 | } |
| 2638 | |
| 2639 | function normalizeIconNameFromFile(file) { |
| 2640 | const raw = String(file || "").replace(/\\/g, "/"); |
| 2641 | const baseName = raw.split("/").pop() || raw; |
| 2642 | const base = String(baseName || "") |
| 2643 | .replace(/\.[a-z0-9]+$/i, "") |
| 2644 | .replace(/[_\-]+/g, " ") |
| 2645 | .replace(/\s+/g, " ") |
| 2646 | .trim(); |
| 2647 | return base || "icon"; |
| 2648 | } |
| 2649 | |
| 2650 | function buildIconUrl(file) { |
| 2651 | // Important: encode spaces and other characters safely, without breaking subpaths |
no outgoing calls
no test coverage detected