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

Function extract

__tests__/csharp-method-groups.test.ts:97–107  ·  view source on GitHub ↗
(backend: 'kernel' | 'wasm', source: string)

Source from the content-addressed store, hash-verified

95 });
96
97 function extract(backend: 'kernel' | 'wasm', source: string): ExtractionResult {
98 if (backend === 'wasm') {
99 process.env.CODEGRAPH_KERNEL = '0';
100 return extractFromSource('Consumer.cs', source, 'csharp');
101 }
102 delete process.env.CODEGRAPH_KERNEL;
103 process.env.CODEGRAPH_KERNEL_LANGS = 'all';
104 const result = tryKernelExtract('Consumer.cs', source, 'csharp');
105 expect(result, 'kernel extraction').not.toBeNull();
106 return result!;
107 }
108
109 const backends = kernelAvailable ? (['kernel', 'wasm'] as const) : (['wasm'] as const);
110

Callers 1

Calls 2

extractFromSourceFunction · 0.90
tryKernelExtractFunction · 0.90

Tested by

no test coverage detected