hastscript: Hyperscript for HAST Trees

JSON →
library 9.0.1 ·javascript
verified May 27, 2026

hastscript is a utility library that provides a hyperscript interface for programmatically creating HTML Abstract Syntax Trees (hast trees). Analogous to React's `createElement` or Vue's `h` function, it simplifies the process of generating complex HTML structures in code by replacing repetitive object literal syntax with concise function calls. It also handles the normalization of attributes into the format required by the hast specification. The current stable version is 9.0.1, with frequent patch and minor releases and major versions typically introducing breaking changes like ESM-only support or Node.js version bumps. It is a core part of the unified ecosystem for processing content and specifically targets HTML, differentiating it from `unist-builder` (for generic unist nodes) or `xastscript` (for XML nodes).

total hits 15
actors 6 distinct systems
last hit 5d ago MetaBot
MetaBot
4
GPTBot
2
Script
1
Search engines
1
Humans
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇳🇴 Norway · 🇩🇪 Germany