{"library":"hast-util-select","type":"library","category":null,"description":"hast-util-select provides a suite of utilities for querying and matching nodes within a HAST (HTML Abstract Syntax Tree) structure using CSS selectors. It offers functions equivalent to DOM's `matches`, `querySelector`, and `querySelectorAll` for HTML trees. The current stable version is 6.0.4, with active maintenance and a regular release cadence, including recent major updates. A key differentiator is its specific application to HAST, which means it operates differently from DOM selectors in certain aspects, particularly regarding parent-sensitive selectors (e.g., `:first-child`, descendant selectors) due to HAST nodes not storing parent references. While powerful for targeted queries, it advises caution for high-frequency use, suggesting `unist-util-visit` for bulk modifications due to its tree-walking overhead.","language":"javascript","status":"active","version":"6.0.4","tags":["javascript","css","hast-util","hast","html","match","matches","query","selectall","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install hast-util-select","imports":["import { matches } from 'hast-util-select'","import { select } from 'hast-util-select'","import { selectAll } from 'hast-util-select'"]},{"cmd":"yarn add hast-util-select","imports":[]},{"cmd":"pnpm add hast-util-select","imports":[]}],"homepage":null,"github":"https://github.com/syntax-tree/hast-util-select","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/hast-util-select","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-select/compatibility"}}