jprettify
v1.0.2
Published
<h1 align="center">jPrettify</h1>
Downloads
7
Maintainers
Readme
A 0.5kb library to pretty print json objects for users
Nice things
- 0.5kb
- 0 dependencies
The gist of it
const jPrettify = require("jprettify").default;
import jPrettify from "jprettify";
const result = jPrettify({
a: {
b: "c",
d: [1, 2],
},
});
console.log(result);
// a:
// b:
// - c
// d:
// - 1
// - 2
API
export default function jPrettify(input: Input, spaces = 2): string;
// spaces: the amount of whitespace to add to every layer