ultrahtml
A 1.75kB library for enhancing html
. ultrahtml
has zero dependencies and is compatible with any JavaScript runtime.
Features
- Tiny, XML-friendly parser
- Built-in
transform
utility for easy output manipulation - Automatic but configurable sanitization, adhering to the HTML Sanitizer API
- Handy
html
template utility
import { transform, html } from 'ultrahtml';
const output = await transform(`<h1>Hello world!</h1>`, {
components: {
h1: (props, children) => html`<h1 class="ultra">${children}</h1>`
}
})
console.log(output)
Acknowledgements