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

Function extract

__tests__/foundation-enum-macros.test.ts:65–75  ·  view source on GitHub ↗
(backend: 'kernel' | 'wasm', file: string, source: string, language: Language)

Source from the content-addressed store, hash-verified

63 });
64
65 function extract(backend: 'kernel' | 'wasm', file: string, source: string, language: Language): ExtractionResult {
66 if (backend === 'wasm') {
67 process.env.CODEGRAPH_KERNEL = '0';
68 return extractFromSource(file, source, language);
69 }
70 delete process.env.CODEGRAPH_KERNEL;
71 process.env.CODEGRAPH_KERNEL_LANGS = 'all';
72 const result = tryKernelExtract(file, source, language);
73 expect(result, `kernel extraction of ${file}`).not.toBeNull();
74 return result!;
75 }
76
77 const backends = kernelAvailable ? (['kernel', 'wasm'] as const) : (['wasm'] as const);
78

Callers 1

Calls 2

extractFromSourceFunction · 0.90
tryKernelExtractFunction · 0.90

Tested by

no test coverage detected