@wasm-fmt/lua_fmt
v0.0.4
Published
A WASM based Lua Formatter
Downloads
32
Readme
Install
npm install @wasm-fmt/lua_fmt
npx jsr add @fmt/lua-fmt
Usage
import init, { format } from "@wasm-fmt/lua_fmt";
await init();
const input = `print "Hello World"`;
const formatted = format(input, "main.lua");
console.log(formatted);
For Vite users:
import init, { format } from "@wasm-fmt/lua_fmt/vite";
// ...
Credits
Thanks to:
- The StyLua project created by @JohnnyMorganz