Skip to content

coreh-deprecated/pretty-html

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pretty-html

html logging that's easy on the eyes.

HTML View:

html view

Text 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

Packages

No packages published

Languages

  • JavaScript 93.6%
  • CSS 3.9%
  • Makefile 2.5%