@wasm-fmt/yamlfmt
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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"]
    }
}
If you cannot change the vite config, you can use another import entry
import init, { format } from "@wasm-fmt/yamlfmt/vite";

// ...

Credits

Thanks to:

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @wasm-fmt/yamlfmt

      Weekly Downloads

      60

      Version

      0.0.2

      License

      MIT

      Unpacked Size

      309 kB

      Total Files

      9

      Last publish

      Collaborators

      • magic-akari