prettyprintjs (npm): Serializes a javascript object to a printable string. String is formatted to be used in either pure text environments, like a console log or in HTML or to create a JSON output.
Keywords: Javascript|Object|pretty|print