deno_std
deno_std copied to clipboard
suggestion: `@std/html/minify`
The function would simply minify HTML.
function minify(html: string): string {
// ...
}
Would that be simple as removing new lines and comments?
I don't think such a function would be very useful. In HTML, comments and most whitespace are significant (they affect the resulting DOM tree) and cannot be removed, so there is not much to be gained from minification.