InstallationChoose the installation type:Pure ES ModuleNon-pure ESMAs an HTML script, from CDNQuick TakeExamplesExtract the first empty conditional commentFind all empty conditional commentsIgnore conditional comments that contain markupCollect empty conditional comments but skip populated onesMatch the revealed form of an empty conditional commentRemove empty conditional commentsAPI — emptyCondCommentRegex() The main function emptyCondCommentRegex() is imported like this: It’s a function which returns a RegExp object, /.../g, which you can use everywhere, for example, in RegExp.prototype.exec() or String.prototype.match(). API — version You can import version:ChangelogOpen Changelog
regex-empty-conditional-comments3.2.1
Regular expression for matching HTML empty conditional comments
Installation
Quick Take
Examples
API —
emptyCondCommentRegex()The main function
emptyCondCommentRegex()is imported like this:It’s a function which returns a RegExp object,
/.../g, which you can use everywhere, for example, inRegExp.prototype.exec()orString.prototype.match().API —
versionYou can import
version:Changelog
Open Changelog