@dprint/json
TypeScript icon, indicating that this package has built-in type declarations

0.20.0 • Public • Published

@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}"));

Package Sidebar

Install

npm i @dprint/json

Weekly Downloads

1,749

Version

0.20.0

License

MIT

Unpacked Size

2.37 MB

Total Files

5

Last publish

Collaborators

  • dsherret