Skip to content

Sec-ant/minify-html-wasm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minify-html-wasm

A wasm wrapper of the rust crate minify-html.

Install

npm i minify-html-wasm

Usage

import init, { minify } from "minify-html-wasm";

const encoder = new TextEncoder();
const decoder = new TextDecoder();

await init("https://fastly.jsdelivr.net/npm/minify-html-wasm@0.1.1/dist/web/index_bg.wasm");

const minified = decoder.decode(
  minify(encoder.encode("<p>  Hello, world!  </p>"), {
    keep_spaces_between_attributes: true,
    keep_comments: true,
  })
);

About

Extremely fast and smart HTML + JS + CSS minifier, available for Rust, Deno, Java, Node.js, Python, Ruby, and WASM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 80.0%
  • Shell 20.0%