{"library":"hast-util-is-element","type":"library","category":null,"description":"This package, `hast-util-is-element`, is a fundamental utility within the HAST (Hypertext Abstract Syntax Tree) ecosystem, primarily designed to check if a given HAST node represents an HTML element. It offers flexible testing capabilities, allowing developers to verify not only if a node is an element but also if it matches specific tag names, an array of tag names, or even complex criteria through a predicate function. The library is currently stable at version 3.0.0, which introduced significant changes, including a migration to ESM-only distribution and a requirement for Node.js 16 or newer. Its release cadence is generally tied to updates within the broader syntax-tree ecosystem, including HAST type definition improvements and Node.js version alignment. A key differentiator is its specialized focus on HAST nodes, providing a more targeted and potentially performant alternative compared to the more generic `unist-util-is` for general Unist nodes. For advanced matching based on CSS selectors, `hast-util-select` offers more robust capabilities, positioning `hast-util-is-element` as a lightweight yet powerful tool for basic and custom element checks.","language":"javascript","status":"active","version":"3.0.0","tags":["javascript","unist","hast","hast-util","util","utility","html","is","element","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install hast-util-is-element","imports":["import { isElement } from 'hast-util-is-element'","import { convertElement } from 'hast-util-is-element'","import type { Check, Test, TestFunction } from 'hast-util-is-element'"]},{"cmd":"yarn add hast-util-is-element","imports":[]},{"cmd":"pnpm add hast-util-is-element","imports":[]}],"homepage":null,"github":"https://github.com/syntax-tree/hast-util-is-element","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/hast-util-is-element","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-is-element/compatibility"}}