@dprint/bun
v0.0.3
Published
Wasm buffer for dprint-plugin-bun.
Readme
@dprint/bun
npm distribution of dprint-plugin-bun which is an adapter plugin for the formatter of Bun that formats JavaScript, TypeScript, JSON, CSS, SCSS, Less, GraphQL, YAML, Markdown, MDX, HTML, Vue, Handlebars, and TOML.
Use this with @dprint/formatter or just use @dprint/formatter and download the dprint-plugin-bun Wasm file.
Example
import { getBuffer } from "@dprint/bun";
import { createFromBuffer } from "@dprint/formatter";
const formatter = createFromBuffer(getBuffer());
console.log(
formatter.formatText("test.js", "console.log( 5 )"),
);