MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / basename

Function basename

src/editor/taskLinkDisplayText.ts:31–35  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

29}
30
31function basename(value: string): string {
32 const normalized = normalizePathLikeLabel(value);
33 const parts = normalized.split("/").filter(Boolean);
34 return parts[parts.length - 1] ?? normalized;
35}
36
37export function extractTaskLinkSubpath(linkPath: string | undefined): string | undefined {
38 if (!linkPath) return undefined;

Callers 1

Calls 1

normalizePathLikeLabelFunction · 0.85

Tested by

no test coverage detected