MCPcopy Create free account
hub / github.com/Noumena-Network/code / loadNativeBinding

Function loadNativeBinding

src/shims/markdownRendererNapi.ts:13–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11 | undefined
12
13function loadNativeBinding() {
14 if (cachedBinding !== undefined) {
15 return cachedBinding
16 }
17
18 try {
19 cachedBinding = requireFn(markdownRendererPath) as {
20 renderFencedCode?: (code: string, options?: unknown) => string[] | null
21 }
22 } catch {
23 cachedBinding = null
24 }
25
26 return cachedBinding
27}
28
29export function renderFencedCode(code: string, options?: unknown): string[] | null {
30 const binding = loadNativeBinding()

Callers 1

renderFencedCodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected