Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 782 Bytes

README.md

File metadata and controls

36 lines (23 loc) · 782 Bytes

Test

Install

npm

npm install @wasm-fmt/dart_fmt

jsr.io

npx jsr add @fmt/dart-fmt

Usage

import init, { format } from "@wasm-fmt/dart_fmt";

await init();

const input = `void main() { print('Hello, World!'); }`;

const formatted = format(input, "main.dart");
console.log(formatted);

For Vite users:

import init, { format } from "@wasm-fmt/dart_fmt/vite";

// ...