( fileUrlString: string, opts?: WebAssembly.Imports, )
| 63 | const instantiateFromUrlCode = instantiateFromUrl.toString() |
| 64 | |
| 65 | const instantiateFromFile = async ( |
| 66 | fileUrlString: string, |
| 67 | opts?: WebAssembly.Imports, |
| 68 | ) => { |
| 69 | const { readFile } = await import('node:fs/promises') |
| 70 | const fileUrl = new URL(fileUrlString, /** #__KEEP__ */ import.meta.url) |
| 71 | const buffer = await readFile(fileUrl) |
| 72 | return WebAssembly.instantiate(buffer, opts) |
| 73 | } |
| 74 | |
| 75 | const instantiateFromFileCode = instantiateFromFile.toString() |
| 76 |
nothing calls this directly
no test coverage detected