Skip to main content
Home

Built and signed on GitHub Actions

A WASM Based SQL Formatter

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
58%
Published
7 months ago (0.1.0)

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

// ...
Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@fmt/sql-fmt

Import symbol

import * as sql_fmt from "@fmt/sql-fmt";
or

Import directly with a jsr specifier

import * as sql_fmt from "jsr:@fmt/sql-fmt";

Add Package

pnpm i jsr:@fmt/sql-fmt
or (using pnpm 10.8 or older)
pnpm dlx jsr add @fmt/sql-fmt

Import symbol

import * as sql_fmt from "@fmt/sql-fmt";

Add Package

yarn add jsr:@fmt/sql-fmt
or (using Yarn 4.8 or older)
yarn dlx jsr add @fmt/sql-fmt

Import symbol

import * as sql_fmt from "@fmt/sql-fmt";

Add Package

vlt install jsr:@fmt/sql-fmt

Import symbol

import * as sql_fmt from "@fmt/sql-fmt";

Add Package

npx jsr add @fmt/sql-fmt

Import symbol

import * as sql_fmt from "@fmt/sql-fmt";

Add Package

bunx jsr add @fmt/sql-fmt

Import symbol

import * as sql_fmt from "@fmt/sql-fmt";