Gathering detailed insights and metrics for htmltidy-options
Gathering detailed insights and metrics for htmltidy-options
npm install htmltidy-options
Typescript
Module System
Min. Node Version
NPM Version
73
Supply Chain
94.4
Quality
74.8
Maintenance
100
Vulnerability
100
License
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
1,791
Last Day
2
Last Week
3
Last Month
11
Last Year
53
Minified
Minified + Gzipped
Latest Version
1.0.0
Package Id
htmltidy-options@1.0.0
Size
3.45 kB
NPM Version
1.2.2
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
0%
3
Compared to previous week
Last month
1,000%
11
Compared to previous month
Last year
-43%
53
Compared to previous year
No dependencies detected.
#htmltidy-options
Configuration options for htmltidy
npm install htmltidy-options
This module exports a single object whose properties are named configuration objects suitable for use with htmltidy. There are configuration objects for cleaning up pretty much any HTML, XHTML, or XML documents you come across.
var htmltidyOptions = require('htmltidy-options');
console.log(Object.keys(htmltidyOptions));
var tidy = require('htmltidy').tidy;
var htmltidyOptions = require('htmltidy-options');
tidy('<table><tr><td>badly formatted html</tr>', htmltidyOptions['Kastor tidy - HTML page UTF-8'], function(err, html) {
console.log(html);
});
The page options will take markup fragments and convert them into pretty printed XHTML or HTML pages. The files should be in UTF-8 encoding or the output can get really weird.
The fragment options will take markup fragments and output pretty printed XHTML or HTML fragments. This has the side effect of stripping out styles though. There are several options available for different input file encodings.
The clean options will turn on tidy's clean option and use some sane defaults for quoting certain characters and scrubbing sloppy junk.
The XML reindent option takes an XML file in UTF-8 encoding and pretty prints it.
These options are useful to some people so I've included them here even though I only use them as examples when creating custom configuration settings. I'm saying they work but, they never quite did what I wanted.
If you have any questions or want to help improve this module you can write me at matthewkastor@gmail.com or contact me through my Google + profile at https://plus.google.com/100898583798552211130
No vulnerabilities found.
No security vulnerabilities found.