MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / expandPath

Function expandPath

cli/src/hooks/__tests__/use-directory-browser.test.ts:23–28  ·  view source on GitHub ↗
(inputPath: string)

Source from the content-addressed store, hash-verified

21
22// Extract the pure expandPath logic for testing
23const expandPath = (inputPath: string): string => {
24 if (inputPath.startsWith('~')) {
25 return path.join(os.homedir(), inputPath.slice(1))
26 }
27 return inputPath
28}
29
30// Extract the path validation logic for testing
31const isValidDirectoryPath = (inputPath: string): boolean => {

Callers 4

isValidDirectoryPathFunction · 0.70
usePathTabCompletionFunction · 0.50
useDirectoryBrowserFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected