HAST Utility: Is Conditional Comment

JSON →
library 3.0.1 ·javascript
verified May 27, 2026

This package, `hast-util-is-conditional-comment`, is a specialized utility within the unified (specifically rehype) ecosystem designed to determine if a given `hast` (Hypertext Abstract Syntax Tree) node represents an HTML conditional comment. Conditional comments are a legacy feature primarily used by older versions of Internet Explorer (discontinued after IE 9) and are generally recommended for removal in modern web development. The current stable version is 3.0.1. As part of the `unified` collective, it adheres to a release cadence tied to major `unified` ecosystem updates, ensuring compatibility with other `hast` and `unist` utilities. Key differentiators include its tight integration with the `hast` AST format, its ESM-only distribution, and its strict compatibility with maintained Node.js versions (currently Node.js 16+). It does not perform transformations but provides a focused predicate function for identifying this specific, non-standard HTML comment type.

total hits 12
actors 5 distinct systems
last hit 5d ago MetaBot
MetaBot
4
GPTBot
2
Script
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇳🇴 Norway · 🇩🇪 Germany · 🇫🇷 France