Back to Explore

syntax-tree/hast-util-whitespace

GitHub
1 watchersOpen source

Last release: 7/31/2023

hast-util-whitespace is a small utility for hast (HTML AST) that checks whether a given node or string is inter-element whitespace according to HTML rules. It’s useful when you need to detect text nodes that contain only allowed whitespace characters like spaces, tabs, and line breaks.

Project status

  • Active maintenance: The last recorded upstream push is 2023-07-31, and the most recent listed update is 3.0.0 on the same date, suggesting the source is not showing recent activity beyond that point (based on the provided evidence).
  • Update cadence: Observed updates are 2.0.1 (2023-01-06), 3.0.0 (2023-07-31), then a prior 2.0.0 (2021-04-26), indicating an irregular cadence with a longer gap before 2021 to 2023.

AI summary generated Today

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

Recent updates

  • 3.0.0

    7/31/2023

    Release 3.0.0 is a major update that drops support for older Node.js versions, restructures the package to use an `exports` entry, and tightens the `whitespace` API to only handle valid Hast text nodes or strings. The code changes also refactor the implementation into `lib/index.js` and update tooling and build configuration.

    Breaking
  • 2.0.1

    1/6/2023

    Release 2.0.1 is described as a documentation-only update. However, the actual diff includes multiple build, test, and CI/tooling changes in addition to documentation and minor JSDoc updates around the `whitespace` function.

  • 2.0.0

    4/26/2021

    v2.0.0 converts the package to ESM and adds JSDoc based types (with TypeScript-generated declaration support). The core whitespace-checking logic remains small and similar, but the published module interface changes.

    Breaking