const HTMLMinifier = require("html-minifier");
const minify = HTMLMinifier.minify;
const minifiedHtml = minify(
'<h1 class="primary" id="main">Title</h1>',
{ removeAttributeQuotes: true }
);
console.log(minifiedHtml);
// '<h1 class=primary id=main>Title</h1>'