hast-util-is-conditional-comment

hast utility to check if a node is a conditional comment

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
hast-util-is-conditional-comment
2.0.0a year ago6 years agoMinified + gzip package size for hast-util-is-conditional-comment in KB

Readme

hast-util-is-conditional-comment
!Buildbuild-badgebuild !Coveragecoverage-badgecoverage !Downloadsdownloads-badgedownloads !Sizesize-badgesize !Sponsorssponsors-badgecollective !Backersbackers-badgecollective !Chatchat-badgechat
Check if a node is a conditional comment.

Install

This package is ESM onlyesm: Node 12+ is needed to use it and it must be importeded instead of requiredd.
npm install hast-util-is-conditional-comment
This package exports the following identifiers:
`isConditionalComment`.
There is no default export.

## Use

```js
import {u} from 'unist-builder'
import {isConditionalComment} from 'hast-util-is-conditional-comment'

isConditionalComment(u('comment', '[if IE]>...<![endif]')) //=> true
isConditionalComment(u('comment', '<![endif]')) //=> true
isConditionalComment(u('comment', 'foo')) //=> false

API

isConditionalComment(node)

Return true if node is a comment node matching one of the know IE conditional comments.

Contribute

See contributing.mdcontributing in rehypejs/.githubhealth for ways to get started. See support.mdsupport for ways to get help.
This project has a code of conductcoc. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MITlicense © Titus Wormerauthor