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

Function extract

__tests__/param-default-calls.test.ts:168–178  ·  view source on GitHub ↗
(backend: 'kernel' | 'wasm', file: string, source: string, language: Language)

Source from the content-addressed store, hash-verified

166 });
167
168 function extract(backend: 'kernel' | 'wasm', file: string, source: string, language: Language): ExtractionResult {
169 if (backend === 'wasm') {
170 process.env.CODEGRAPH_KERNEL = '0';
171 return extractFromSource(file, source, language);
172 }
173 delete process.env.CODEGRAPH_KERNEL;
174 process.env.CODEGRAPH_KERNEL_LANGS = 'all';
175 const result = tryKernelExtract(file, source, language);
176 expect(result, `kernel extraction of ${file}`).not.toBeNull();
177 return result!;
178 }
179
180 /** `caller kind callee` for every call and `new` the file records, by its caller's qualified name. */
181 function callsOf(result: ExtractionResult): string[] {

Callers 1

Calls 2

extractFromSourceFunction · 0.90
tryKernelExtractFunction · 0.90

Tested by

no test coverage detected