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

Function topLevelFolder

src/mcp/tools.ts:1928–1931  ·  view source on GitHub ↗

A path's first folder, or '' for a file at the project root.

(filePath: string)

Source from the content-addressed store, hash-verified

1926 */
1927/** A path's first folder, or '' for a file at the project root. */
1928function topLevelFolder(filePath: string): string {
1929 const slash = filePath.indexOf('/');
1930 return slash > 0 ? filePath.slice(0, slash) : '';
1931}
1932
1933/**
1934 * The order in which codegraph_node's multi-definition answer fills its

Callers 2

definitionCapOrderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected