MCPcopy Create free account
hub / github.com/vercel/vercel / getWasmDir

Function getWasmDir

packages/python-analysis/src/wasm/load.ts:21–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19// Lazily resolve WASM path to avoid module load-time errors when bundled
20let wasmDir: string | null = null;
21function getWasmDir(): string {
22 if (wasmDir === null) {
23 const require = createRequire(import.meta.url);
24 const wasmModulePath = require.resolve(WASM_MODULE_PATH);
25 wasmDir = dirname(wasmModulePath);
26 }
27 return wasmDir;
28}
29
30async function getCoreModule(path: string): Promise<WebAssembly.Module> {
31 const wasmPath = join(getWasmDir(), path);

Callers 1

getCoreModuleFunction · 0.85

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected