minify-html-fast
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

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>',
);

/minify-html-fast/

    Package Sidebar

    Install

    npm i minify-html-fast

    Weekly Downloads

    14

    Version

    0.3.1

    License

    none

    Unpacked Size

    827 kB

    Total Files

    6

    Last publish

    Collaborators

    • kenansulayman