{"library":"hast-util-parse-selector","type":"library","category":null,"description":"`hast-util-parse-selector` is a focused utility within the `unified` ecosystem designed to create HAST (Hypertext Abstract Syntax Tree) element nodes from simple CSS selector strings. Currently at stable version 4.0.0, this package follows semantic versioning, with major releases typically aligning with dropping support for unmaintained Node.js versions. It processes basic selectors that can include a tag name, multiple class names, and a single ID, transforming them into a `hast` element object with corresponding `tagName` and `properties` (including `id` and `className` arrays). While powerful for its specific use case, it explicitly states its niche nature, recommending more comprehensive alternatives like `hastscript` or `hast-util-from-selector` for handling complex CSS selectors. Its primary differentiator is its simplicity and directness in parsing straightforward selectors into HAST nodes, making it suitable for scenarios where a full-blown selector engine is overkill.","language":"javascript","status":"active","version":"4.0.0","tags":["javascript","unist","hast","hast-util","util","utility","html","css","selector","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install hast-util-parse-selector","imports":["import { parseSelector } from 'hast-util-parse-selector'","import { parseSelector } from 'https://esm.sh/hast-util-parse-selector@4'","<script type=\"module\"> import { parseSelector } from 'https://esm.sh/hast-util-parse-selector@4?bundle' </script>"]},{"cmd":"yarn add hast-util-parse-selector","imports":[]},{"cmd":"pnpm add hast-util-parse-selector","imports":[]}],"homepage":null,"github":"https://github.com/syntax-tree/hast-util-parse-selector","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/hast-util-parse-selector","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/hast-util-parse-selector/compatibility"}}