Compile WebAssembly .wasm files to a commonjs module.
const wasm2js =const fs =const wasmBuffer = fsconst js =
wasm2js example.wasm -o example.js
npm install wasm2js
.wasm binary and wraps it inside a commonJS module that can be required
in Node.js and the browser.
wasmBufBuffer a buffer of the .wasm code
Returns String the commonJS module code that wraps the wasm
90% of this code was extracted from @mafintosh's wat2js.