Repository
Current version released
4 years ago
Versions
deno_html
Useful template literal tags for create html strings in ES2015+.
Usage
import { html } from "https://deno.land/x/html/mod.ts";
let languages = ['Rust', 'JavaScript', 'TypeScript'];
const str = html`
<div class="list">
<ul>
${languages.map(x => `<li>${x}</li>`)}
</ul>
</div>
`;
console.log(str);
Outputs:
<div class="list">
<ul>
<li>Rust</li>
<li>JavaScript</li>
<li>TypeScript</li>
</ul>
</div>
Why not template literal?
License
deno_html is released under the MIT License. See the bundled LICENSE file for details.