Beautify JSON with colors and indentation and print it on terminal
npm install beautify-json
Why choose beautify-json?
Minimal footprint. The only dependency that I used is
chalk for colors.
The underlying approach is to use
JSON.stringify. I have also added a condition to treat regular expressions as strings, else
JSON.stringify will serialize them as empty objects.