package
Regular expression for matching HTML comments
npm install html-comment-regexGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
2.9 kB
Includes dependencies.
Regular expression for matching HTML comments
$ npm install --save html-comment-regexvar htmlCommentRegex = require('html-comment-regex');
htmlCommentRegex.test('<!DOCTYPE html><!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--><html lang="en"><head><meta charset="UTF-8"><title>Document</title></head><body></body></html>');
//=> true
htmlCommentRegex.test('<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Document</title></head><body></body></html>');
//=> falseMIT © Steve Mao