@wasm-fmt/gofmt 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib.js +2 -2
- package/package.json +1 -1
package/lib.js
CHANGED
|
@@ -17,8 +17,8 @@ export async function format(input, wasm_url) {
|
|
|
17
17
|
const fs = await import("node:fs");
|
|
18
18
|
const bytes = fs.readFileSync(wasm_url);
|
|
19
19
|
mod = new WebAssembly.Module(bytes);
|
|
20
|
-
} else if ("
|
|
21
|
-
mod = await WebAssembly.compileStreaming(fetch(wasm_url)
|
|
20
|
+
} else if ("instantiateStreaming" in WebAssembly) {
|
|
21
|
+
mod = await WebAssembly.compileStreaming(fetch(wasm_url));
|
|
22
22
|
} else {
|
|
23
23
|
const response = await fetch(wasm_url);
|
|
24
24
|
const bytes = await response.arrayBuffer();
|