0.0.3 • Published 8 months ago

@wasm-fmt/yamlfmt v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Test

Install

npm

npm install @wasm-fmt/yamlfmt

jsr.io

npx jsr add @fmt/yamlfmt

Usage

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

await init();

const input = "- a\n- b\n";

const formatted = format(input, "sample.yaml");
console.log(formatted);

For Vite users:

Add "@wasm-fmt/yamlfmt" to optimizeDeps.exclude in your vite config:

{
    "optimizeDeps": {
        "exclude": ["@wasm-fmt/yamlfmt"]
    }
}
import init, { format } from "@wasm-fmt/yamlfmt/vite";

// ...

Credits

Thanks to:

0.0.3

8 months ago

0.0.2

1 year ago

0.0.1

1 year ago