$ wasm-tools parse itoa.wat -o itoa.wasm
import { readFileSync } from "node:fs";
const wasmBuffer = readFileSync("itoa.wasm");
const importObj = {}
const wasmModule = await WebAssembly.instantiate(wasmBuffer, importObj, { builtins: ['js-string'] });
const { test } = wasmModule.instance.exports;
console.log(test(0));
console.log(test(1));
console.log(test(-100));
console.log(test(-1395235));
console.log(test(999235));
$ node --experimental-wasm-imported-strings itoa.mjs
0
1
-100
-1395235
999235