Back to Explore

syntax-tree/hast-util-is-element

GitHub
1 watchersOpen source

Last release: 7/31/2023

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 repository appears to be maintained, with a recent update in 2023, but there is no evidence of activity since the July 31, 2023 push.
  • Update cadence looks sporadic, with updates at 2023-07-31, 2023-01-06, and then much earlier on 2021-12-02 (a gap of about 20 months before the 2023 January update).

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • 3.0.0

    7/31/2023

    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.

    Breaking
  • 2.1.3

    1/6/2023

    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

    12/2/2021

    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

    7/24/2021

    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

    5/10/2021

    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.

    Features
  • 2.0.1

    4/25/2021

    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

    4/25/2021

    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.

    Breaking
  • 1.1.0

    8/21/2020

    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.

    BreakingFeatures
  • 1.0.4

    2/27/2020

    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.

    Security
  • 1.0.3

    5/26/2019

    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.