htmltag
v0.7.0
Published
HTML template tag compiler
Maintainers
Readme
htmltag
An HTML-like template literal tag.
Install
npm install htmltagAPI
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.
