MCPcopy
hub / github.com/colbymchenry/codegraph / endsWith

Function endsWith

src/resolution/import-resolver.ts:1526–1526  ·  view source on GitHub ↗
(p: string, want: string)

Source from the content-addressed store, hash-verified

1524 const rel = mod.replace(/\./g, '/');
1525 const lastSeg = mod.split('.').pop()!;
1526 const endsWith = (p: string, want: string): boolean => p === want || p.endsWith('/' + want);
1527 const moduleFile = context
1528 .getNodesByName(`${lastSeg}.py`)
1529 .find((n) => n.kind === 'file' && n.filePath !== excludeFilePath && endsWith(n.filePath, `${rel}.py`));

Callers 1

findPythonModuleFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected