A simple, lightweight HTML prettifier with TypeScript definitions. Version 1.0.7 is the latest stable release. It takes HTML markup and indents it based on configurable character and count options. Differentiators: minimalistic, no dependencies, provides Vue-style template support (v-for, v-html). Alternative to more complex formatters like prettier.
npm install html-prettifyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing the default function and formatting a simple HTML string with space indentation.
Use import instead of require(). If you must use CommonJS, consider dynamic import() or use an older version (<=0.0.x).
Always use exactly 'space' or 'tab' for the char option.
Check output if you rely on specific attribute spacing; consider using a Vue-specific formatter if needed.
Use import or set type: 'module' in package.json if using Node.js, or use dynamic import().
Use default import: import prettify from 'html-prettify'.
No dependency data recorded yet.