htmltag
v0.7.0
Published
HTML template tag compiler
Downloads
42
Maintainers
Readme
htmltag
An HTML-like template literal tag.
Install
npm install htmltag
API
html(callsite, ...values)
A template tag function that returns TemplateResult
objects.
import { html } from 'htmltag';
const planet = 'Earth';
const templateResult = html`<div>Hello ${planet}</div>`;
console.log(templateResult);
Class: TemplateResult
TemplateResult
objects contain both the static and dynamic parts of a template.
templateResult.template
A tree representing the result of parsing the template.
templateResult.values
An array of values supplied to the template literal instance.