Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
html
Advanced tools
Readme
A node port of beautify-html.js by Nochum Sossonko which is based on jsbeautifier by Einar Lielmanis
npm install html
echo "<h2><strong><a href="http://awesome.com">AwesomeCom</a></strong><span>is awesome</span></h2>" | html
returns:
<h2>
<strong>
<a href=http://awesome.com>AwesomeCom</a>
</strong>
<span>
is awesome
</span>
</h2>
html foo.html
will write the prettified version to stdout
.
html *.html
will update in place all matching html files with their prettified versions.
I find myself constantly using the 'Copy as HTML' feature of the Chrome Inspector:
The downside is that that usually the HTML that gets copied is pretty ugly:
On OS X you can use pbpaste
and pbcopy
to stream your clipboard in and out of unix pipes. With the ugly HTML still in your clipboard run this command:
pbpaste | html | pbcopy
Now when you paste your clipboard into an editor you will get nice, pretty printed HTML:
grab the newest beautify-html.js
from js-beautifier and drop it into lib/
as html.js
. then add the following code to the bottom of html.js
:
module.exports = { prettyPrint: style_html }
BSD LICENSE
FAQs
HTML pretty printer CLI utility (based on jsbeautifier)
The npm package html receives a total of 107,334 weekly downloads. As such, html popularity was classified as popular.
We found that html demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.