hast-util-is-element is a small utility for checking whether a HAST node is a (certain) element. It helps avoid repeated code by providing functions like isElement (optionally with a tag-name or other test) and convertElement for generating reusable checks.
Project status
- The source appears quiet or in maintenance mode, with the last upstream push on 2023-07-31 and the most recent packaged updates dating from 2023-07-31 (3.0.0), well over 2 years ago as of 2026-09-10.
- Update cadence is low to effectively dormant, with notable changes in 2021 and then a gap until mid-2023, followed by no further evidence of updates through today.
AI summary generated
Recent updates
3.0.0
hast-util-is-element v3.0.0 modernizes the package for Node.js 16+, switches to package exports, and refactors the TypeScript typing model so users do not need explicit generic type parameters. The implementation also moves to a new internal lib/ module while keeping the public runtime exports to isElement and convertElement.
Breaking2.1.3
Release 2.1.3 is presented as “Add improved docs” with no stated code or API changes. However, the diff shows multiple changes beyond documentation, including TypeScript build configuration changes, regenerated typing-test changes, and CI/test toolchain updates.
2.1.2
Release 2.1.2 focuses on correcting TypeScript type assertions for hast-util-is-element. The code diff shows changes only to JSDoc-based typings and the accompanying type test file, with no apparent runtime behavior changes.
2.1.1
Release 2.1.1 is a small TypeScript-focused update. It adds `strict` mode to `tsconfig.json` and adjusts published type definitions to permit `null` for certain callback parameters.
2.1.0
Release 2.1.0 updates the library version and adds a new JSDoc TypeScript type alias named `Test`. The code diff shows this new `Test` type is then used to update the `test` parameter typing in `isElement` and `convertElement` overloads.
Features2.0.1
Release 2.0.1 is a type-related change only, as reflected by the release note entry “Fix types.” The code diff shows JSDoc type signature adjustments across the exported utilities, with return types shifting away from type guard style annotations.
2.0.0
Release 2.0.0 migrates the package to ESM and adds extensive JSDoc-driven type information (including generated declaration tests). The implementation also changes the public API surface from a CommonJS default export with `isElement.convert` to ESM named exports.
Breaking1.1.0
Release 1.1.0 adds a new `convert` helper and extends `isElement` to support function-based tests. The implementation also introduces additional parameters (`index`, `parent`, `context`) that are passed through to the compiled test and adds new validation and throwing behavior for those parameters.
BreakingFeatures1.0.4
Release 1.0.4 updates package metadata and documentation, including adding a `funding` field and a new security section in the README. The actual codebase diff is effectively non-functional, with changes limited to package.json/readme.md and development tooling configuration.
Security1.0.3
Release 1.0.3, per the release notes, is a prose refactor. The actual code change in index.js appears to be comment-only, but the release also updates CI and development toolchain versions, and significantly edits the README.