HAST Utility to Create Nodes from CSS Selectors

JSON →
library 3.0.1 ·javascript
verified May 27, 2026

hast-util-from-selector is a utility package within the unified ecosystem designed to parse CSS selectors and generate corresponding HAST (Hypertext Abstract Syntax Tree) element nodes. It is currently at version 3.0.1, supporting Node.js 16 and later, and adheres to an ESM-only distribution model. The project follows a release cadence tied to Node.js LTS versions, with major versions introducing breaking changes aligned with Node.js support lifecycles or significant internal architectural shifts, such as the move to ESM in v2 and Node.js 16 requirement in v3. This package distinguishes itself from `hast-util-parse-selector` by offering more powerful and complex selector parsing capabilities, akin to `hastscript` but specifically focused on creating HAST elements from selector strings rather than a full hyperscript API. It's an active project, receiving regular updates for dependencies and type refinements.

total hits 35
actors 7 distinct systems
last hit 1d ago Amazonbot
Amazonbot
4
MetaBot
4
GPTBot
2
Script
1
Search engines
1

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