1.1.0 • Published 7 years ago

stylized-json v1.1.0

Weekly downloads
124
License
MIT
Repository
-
Last release
7 years ago

I needed a npm package version of this snippet so I created it. Although please note that I'm not the author of the script itself.
The goal of this package is to display a JS object like: npm.io

###Installation:
npm install stylized-json

Don't forget to include the css file if needed like:
<link rel="stylesheet" href="node_modules/stylized-json/index.css">

##Usage:

import stylizedJson from 'stylized-json';

let myObj = {test: {fr_FR: "test", en_US: "test"}},
    myObjToHtml = stylizedJson.prettyPrint(myObj);
    
document.body.innerHTML += myObjToHtml;