prettyprint

prettyprint beyond `JSON.stringify(obj, null, 2)` -- Multiline strings and colors

MIT License

Stars
1

prettyprint

This project shows how we can prettyprint beyond JSON.stringify(obj, null, 2) in Node.js

  • With colors
  • Multiline strings

As for the core code, you are free to copy the code from /src/index.ts.

Local installation

npm i @patarapol/prettyprint --dev
import { pp } from '@patarapolw/prettyprint'
pp(OBJECT)

CLI installation

Run it directly with npx

npx github:patarapolw/prettyprint OBJECT_AS_JS_EVAL

Or, install as global

npm i -g @patarapolw/prettyprint
pp OBJECT_AS_JS_EVAL