matthewmueller / Pretty Html
HTML logging that's easy on the eyes.
Stars: ✭ 17
Programming Languages
javascript
184084 projects - #8 most used programming language
pretty-html
html logging that's easy on the eyes.
HTML View:
Text View:
Installation
Install with component(1):
$ component install matthewmueller/pretty-html
Or with node:
$ npm install pretty-html
Example
// html format
out.innerHTML = pretty(document.body).html();
// text format
console.log(pretty(document.body).text());
API
pretty(dom)
Add the DOM node you want to format.
pretty.html()
Return a formatted html string of the element, showing all text and element nodes. The output's style is completely customizable. Take a look at pretty.css
to see some of the options.
pretty.text()
Return a formatted text string of the element, showing all text and element nodes.
License
MIT
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].