🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

simple-json-formatter

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-json-formatter - npm Package Compare versions

Comparing version
1.0.0
to
1.0.1
+40
README.md
Format JSON string with indent.
## Typescript Example
```
import * as JSONFormatter from "json-formatter";
let a = {
b: 42,
c: "d",
e: [
"f",
"g"
],
h: {
i: "j",
k: null
}
}
let json = JSON.stringify(a);
console.log(json);
let formattedJson = JSONFormatter.format(json, "\t");
console.log(formattedJson);
```
Output:
```
{"b":42,"c":"d","e":["f","g"],"h":{"i":"j","k":null}}
{
"b": 42,
"c": "d",
"e": [
"f",
"g"
],
"h": {
"i": "j",
"k": null
}
}
```
+1
-1
{
"name": "simple-json-formatter",
"version": "1.0.0",
"version": "1.0.1",
"description": "A JSON formatter",

@@ -5,0 +5,0 @@ "main": "index.js",