MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / moduleTail

Function moduleTail

src/db/reference-tail.ts:103–106  ·  view source on GitHub ↗
(modulePath: string)

Source from the content-addressed store, hash-verified

101 * when the path's last segment is only dots.
102 */
103export function moduleTail(modulePath: string): string {
104 const stem = pathStem(modulePath);
105 return stem ? MODULE_KEY + stem : '';
106}
107
108/** A path's last segment up to its first dot — `./pages/Team` → 'Team', `a/b.dart` → 'b' — or '' when that is only dots. */
109function pathStem(path: string): string {

Calls 1

pathStemFunction · 0.85

Tested by

no test coverage detected