A minimal HTML prettifier that formats HTML strings with proper indentation. Current stable version is 0.1.9, last updated in 2018, with no recent releases or maintenance activity. It uses a single `render()` function to beautify ugly HTML. Compared to alternatives like `prettier` or `js-beautify`, this package is far less feature-rich and has not been updated in years. It only supports CommonJS and does not ship TypeScript types. Not recommended for new projects.
npm install html-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates formatting a simple HTML string using the render() function.
Use an actively maintained formatter like prettier or js-beautify.
Consider a parser-based formatter (e.g., prettier) for robust results.
Use require() or switch to an ESM-compatible formatter.
Use a configurable formatter like prettier.
Run 'npm install html-formatter'
Use 'const formatter = require('html-formatter')' then 'formatter.render(html)'Use 'require' instead of 'import'.
No dependency data recorded yet.