nv-json-beautify
v1.0.0
Published
nv-json-beautify ======================= - a slow JSON.stringify - make the key neatly
Downloads
72
Readme
nv-json-beautify
- a slow JSON.stringify
- make the key neatly
install
- npm install nv-json-beautify
usage
const { to_str, to_file, to_stream} = require("nv-json-beautify");
to_str : ( j,max_depth=Infinity,indent=" ") -> <String>
to_stream : (ws$,j,max_depth=Infinity,indent=" ") -> <writestream-of-your-input:ws$>
to_file : async(fn ,j,max_depth=Infinity,indent=" ") -> Promise<Boolean>
example
> j
{
name: 'nv-json-beautify',
version: '1.0.0',
description: 'nv-json-beautify ======================= - a slow JSON.stringify - make the key neatly',
main: 'index.js',
scripts: { test: 'echo "Error: no test specified" && exit 1' },
author: '',
license: 'ISC'
}
>
>
> console.log(x.to_str(j))
{
"name" : "nv-json-beautify" ,
"version" : "1.0.0" ,
"description" : "nv-json-beautify ======================= - a slow JSON.stringify - make the key neatly" ,
"main" : "index.js" ,
"scripts" : {
"test" : "echo \"Error: no test specified\" && exit 1" ,
} ,
"author" : "" ,
"license" : "ISC" ,
}
METHODS
APIS
LICENSE
- ISC