ultrahtml@1.0.0
is here!
š„³ Parse XML-like documents (HTML + Components)
ā©ļø Simple content transformations
š JSX Runtime
š Built-in querySelector
implementation
š§½ Sanitizer API
Did we really need another HTML parser? Probably not! But ultrahtml
has some interesting features that I havenāt seen elsewhereā¦
It simplifies AST transformations and queries with an extensible transform
interface and a built-in querySelector
implementation.
It can handle HTML, but itās loose enough to handle other HTML-like formats such as .astro
, .vue
, or .svelte
. On principle, it doesnāt throw on syntax it doesnāt recognize.
It treats <Components />
as valid nodes.
Itās pretty tiny! The main entrypoint comes in under 2KB, which is a reasonable size for client-side usage.
It comes with an implementation of the Sanitizer
API.
It features with a custom jsx-runtime
if you want to build a fancy static site generator or have other wild ideas.
Iāve been working on ultrahtml
for a while, and Iām really pleased with how v1.0.0
has come together.
Itās tiny, itās fast, and itās a great way to transform/sanitize/query any markup.