dom-json-tree
Version:
Visualize the JSON object to the DOM.
73 lines (55 loc) • 1.34 kB
Markdown
[](Version)
Visualize the JSON object to the DOM.
```js
// import module
import DomJsonTree from 'dom-json-tree';
let djt = new DomJsonTree(json, document.body);
djt.render();
```
```js
let djt = new DomJsonTree(json, document.body, {
colors: {
key: "#008080",
type: "#546778",
typeNumber: "#000080",
typeString: "#dd1144",
typeBoolean: "#000080"
}
});
```
- https://codesandbox.io/s/82z7w16lw0

```sh
npm i
```
```sh
npm run watch
```
Open "test/index.html" in a browser
- [Superfine](https://github.com/jorgebucaran/superfine) - View
```sh
npm run build
npm run test
npm version major|minor|patch
npm publish
git push origin master
git push origin --tags
```