Miss any of our Open RFC calls?Watch the recordings here! »

This package has been deprecated

Author message:

Doesn't work right

html-beautify

1.0.4 • Public • Published

alt tag

How it work?

Inserts spaces and break lines into html string. It looks like this:

<!-- Before -->
<div><p>Hello <b>world</b>!</p><p>How are you?</p></div>
 
<!-- After -->
<div>
  <p>Hello <b>world</b>!</p>
  <p>How are you?</p>
</div>

How to use?

import htmlBeautify from 'html-beautify'
htmlBeautify("<div><p>Hello <b>world</b>!</p></div>")
// => "<div>\n  <p>Hello <b>world</b>!\n  </p>\n</div>"

Also you can pass string with spaces and break lines, it will be remove it and add them again.

Install

npm i html-beautify

DownloadsWeekly Downloads

221

Version

1.0.4

License

ISC

Last publish

Collaborators

  • avatar