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

Function namesOf

__tests__/extraction.test.ts:4671–4674  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

4669 // "& getRef() const" instead of "getRef", polluting search and callers. Very
4670 // common in Unreal Engine headers (`const FGameplayTagContainer& GetActiveTags() const`).
4671 const namesOf = (code: string) =>
4672 extractFromSource('r.cpp', code).nodes
4673 .filter((n) => n.kind === 'method' || n.kind === 'function')
4674 .map((n) => n.name);
4675
4676 it('names an inline reference-returning method by its identifier, not the declarator', () => {
4677 const names = namesOf('class C {\npublic:\n const int& getRef() const { return x; }\n int& mutRef() { return x; }\n int x;\n};');

Callers 1

extraction.test.tsFile · 0.70

Calls 2

extractFromSourceFunction · 0.90
mapMethod · 0.80

Tested by

no test coverage detected