html-comment-regex

1.1.2 • Public • Published

NPM version Build Status

Regular expression for matching HTML comments

Install

$ npm install --save html-comment-regex

Usage

var 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>');
//=> false

License

MIT © Steve Mao

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.2
    1,176,132
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.2
    1,176,132
  • 1.1.1
    114,580
  • 1.1.0
    35
  • 1.0.0
    1
  • 0.0.0
    1

Package Sidebar

Install

npm i html-comment-regex

Weekly Downloads

1,290,749

Version

1.1.2

License

MIT

Unpacked Size

2.97 kB

Total Files

4

Last publish

Collaborators

  • stevemao