MCPcopy Create free account
hub / github.com/backnotprop/plannotator / sameDirectory

Function sameDirectory

packages/shared/code-nav.ts:148–153  ·  view source on GitHub ↗
(a: string, b: string)

Source from the content-addressed store, hash-verified

146}
147
148function sameDirectory(a: string, b: string): boolean {
149 const dirA = a.lastIndexOf("/");
150 const dirB = b.lastIndexOf("/");
151 if (dirA === -1 && dirB === -1) return true;
152 return a.slice(0, dirA) === b.slice(0, dirB);
153}
154
155function isTestFile(filePath: string): boolean {
156 return /(?:test|spec|__tests__|_test\.|\.test\.|\.spec\.)/i.test(filePath);

Callers 1

scoreFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected