@wasm-fmt/sql_fmt
v0.0.2
Published
A WASM Based SQL Formatter
Downloads
239
Readme
Install
npm install @wasm-fmt/sql_fmt
npx jsr add @fmt/sql-fmt
Usage
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";
// ...