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

Function endsWith

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

Source from the content-addressed store, hash-verified

1772 const rel = mod.replace(/\./g, '/');
1773 const lastSeg = mod.split('.').pop()!;
1774 const endsWith = (p: string, want: string): boolean => p === want || p.endsWith('/' + want);
1775 const moduleFile = context
1776 .getNodesByName(`${lastSeg}.py`)
1777 .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