minify-html-fast
v0.3.1
Published
Making [minify-html](https://crates.io/crates/minify-html) available to npm via WebAssembly. By far the fastest html minifer. Eat dust. Written in Rust.
Downloads
15
Readme
minify-html-fast
Making minify-html available to npm via WebAssembly. By far the fastest html minifer. Eat dust. Written in Rust.
Usage
$ yarn add minify-html-fast
const pkg = require('./pkg');
const input = '<!--x--><div>xx<!--x--></div>'
const output = pkg.minify(
input,
{
do_not_minify_doctype: true,
ensure_spec_compliant_unquoted_attribute_values: true,
keep_closing_tags: true,
keep_html_and_head_opening_tags: true,
keep_spaces_between_attributes: true,
keep_comments: false,
minify_css: true,
minify_js: true,
remove_bangs: true,
remove_processing_instructions: true,
},
);
console.log(
output === '<div>xx</div>',
);