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

Function directoryOf

ui/src/lib/entry-model.ts:99–102  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

97
98/** `src/bin/codegraph.ts` -> `src/bin`; a root file -> `project root`. */
99export function directoryOf(path: string): string {
100 const cut = path.lastIndexOf('/');
101 return cut < 0 ? 'project root' : path.slice(0, cut);
102}
103
104/**
105 * Fold rows into groups, first-seen order.

Callers 2

buildEntryPanelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected