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

Function stemOf

src/resolution/cpp-includers.ts:58–61  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

56const isCFamily = (language: string): boolean => language === 'c' || language === 'cpp';
57const fileName = (filePath: string): string => filePath.slice(Math.max(filePath.lastIndexOf('/'), filePath.lastIndexOf('\\')) + 1);
58const stemOf = (name: string): string => {
59 const dot = name.lastIndexOf('.');
60 return dot > 0 ? name.slice(0, dot) : name;
61};
62const dirOf = (filePath: string): string => filePath.slice(0, filePath.lastIndexOf('/') + 1);
63
64const toInclude = (n: Pick<Node, 'id' | 'name' | 'filePath' | 'language' | 'startLine' | 'startColumn'>): Include =>

Callers 2

includesByStemFunction · 0.70
cppIncludedHeadersBesideFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected