@dprint/json
v0.19.4
Published
Wasm module for dprint-plugin-json.
Downloads
3,974
Readme
@dprint/json
npm distribution of dprint-plugin-json.
Use this with @dprint/formatter or just use @dprint/formatter and download the dprint-plugin-json WASM file.
Example
import { createFromBuffer } from "@dprint/formatter";
import { getPath } from "@dprint/json";
import * as fs from "fs";
const buffer = fs.readFileSync(getPath());
const formatter = createFromBuffer(buffer);
console.log(formatter.formatText("test.json", "{test: 5}"));