MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / basename

Function basename

web/js/chat.js:665–669  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

663}
664
665function basename(filePath) {
666 const normalized = String(filePath).replace(/\\/g, "/");
667 const parts = normalized.split("/").filter(Boolean);
668 return parts[parts.length - 1] || String(filePath);
669}
670
671function buildFileDownloadUrl(filePath) {
672 return `${state.API_BASE}/api/files?path=${encodeURIComponent(filePath)}`;

Callers 1

appendFileCardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected