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

0.1.1 • Public • Published

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://cdn.jsdelivr.net/npm/minify-html-wasm/web/wasm");

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

Package Sidebar

Install

npm i minify-html-wasm

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

1.75 MB

Total Files

11

Last publish

Collaborators

  • sec-ant