npm install @wasm-fmt/sql_fmt
npx jsr add @fmt/sql-fmt
import init, { format } from "@wasm-fmt/sql_fmt";
await init();
const input = `SELECT count(*),Column1 FROM Table1;`;
const formatted = format(input, "query.sql");
console.log(formatted);
For Vite users:
import init, { format } from "@wasm-fmt/sql_fmt/vite";
// ...