Skip to content

wasm-fmt/sql_fmt

Repository files navigation

Test

Install

npm

npm install @wasm-fmt/sql_fmt

jsr.io

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";

// ...