An HTML formatter and minifier with a focus on simplicity and zero dependencies. Version 1.0.1 is the current stable release with no fixed release cadence. It provides both pretty-printing and minification for HTML strings, differentiating itself by its minimal footprint (no dependencies) and TypeScript support. Ideal for formatting or compressing HTML in Node.js or browser environments.
npm install htmlfyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates pretty-printing and minifying HTML with htmlfy.
Use minify for consistent output or manually add newlines if needed.
Ensure script and style content is properly handled or avoid minifying such sections.
Consider alternatives like prettier for advanced formatting.
Use import { htmlfy } from 'htmlfy'Run npm install htmlfy and ensure the import path is correct.
Ensure the input to pretty() is a string.
No dependency data recorded yet.