pax_global_header00006660000000000000000000000064133572325310014516gustar00rootroot0000000000000052 comment=62ef1d5f46bd03e36ea0c8f2f4d2c91b60ff39d0 html-comment-regex-1.1.2/000077500000000000000000000000001335723253100152335ustar00rootroot00000000000000html-comment-regex-1.1.2/.editorconfig000066400000000000000000000002741335723253100177130ustar00rootroot00000000000000root = true [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.md] trim_trailing_whitespace = false html-comment-regex-1.1.2/.gitattributes000066400000000000000000000000141335723253100201210ustar00rootroot00000000000000* text=auto html-comment-regex-1.1.2/.gitignore000066400000000000000000000000351335723253100172210ustar00rootroot00000000000000/node_modules/ npm-debug.log html-comment-regex-1.1.2/.jscsrc000066400000000000000000000001351335723253100165220ustar00rootroot00000000000000{ "preset": "google", "maximumLineLength": null, "excludeFiles": ["node_modules/**"] } html-comment-regex-1.1.2/.jshintrc000066400000000000000000000003431335723253100170600ustar00rootroot00000000000000{ "boss": true, "curly": true, "eqeqeq": true, "eqnull": true, "immed": true, "latedef": true, "mocha" : true, "newcap": true, "noarg": true, "node": true, "sub": true, "undef": true, "unused": true } html-comment-regex-1.1.2/.travis.yml000066400000000000000000000000641335723253100173440ustar00rootroot00000000000000sudo: false language: node_js node_js: - 8 - 10 html-comment-regex-1.1.2/LICENSE000066400000000000000000000020311335723253100162340ustar00rootroot00000000000000Copyright 2018 Steve Mao Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. html-comment-regex-1.1.2/README.md000066400000000000000000000017161335723253100165170ustar00rootroot00000000000000# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] > Regular expression for matching HTML comments ## Install ```sh $ npm install --save html-comment-regex ``` ## Usage ```js var htmlCommentRegex = require('html-comment-regex'); htmlCommentRegex.test('Document'); //=> true htmlCommentRegex.test('Document'); //=> false ``` ## License MIT © [Steve Mao](https://github.com/stevemao) [npm-image]: https://badge.fury.io/js/html-comment-regex.svg [npm-url]: https://npmjs.org/package/html-comment-regex [travis-image]: https://travis-ci.org/stevemao/html-comment-regex.svg?branch=master [travis-url]: https://travis-ci.org/stevemao/html-comment-regex html-comment-regex-1.1.2/index.js000066400000000000000000000000651335723253100167010ustar00rootroot00000000000000'use strict'; module.exports = //g; html-comment-regex-1.1.2/package.json000066400000000000000000000016021335723253100175200ustar00rootroot00000000000000{ "name": "html-comment-regex", "version": "1.1.2", "description": "Regular expression for matching HTML comments", "homepage": "https://github.com/stevemao/html-comment-regex", "author": { "name": "Steve Mao", "email": "maochenyan@gmail.com", "url": "https://github.com/stevemao" }, "repository": "stevemao/html-comment-regex", "license": "MIT", "files": [ "index.js" ], "keywords": [ "html-comment-regex", "text", "string", "regex", "regexp", "re", "match", "test", "find", "pattern", "comment", "comments", "html", "HTML", "HyperText Markup Language" ], "dependencies": {}, "devDependencies": { "jscs": "^1.11.3", "jshint": "^2.6.3", "mocha": "*" }, "scripts": { "lint": "jshint *.js --exclude node_modules && jscs *.js", "test": "npm run-script lint && mocha" } } html-comment-regex-1.1.2/test.js000066400000000000000000000016711335723253100165550ustar00rootroot00000000000000'use strict'; var assert = require('assert'); var htmlCommentRegex = require('./'); var html = ' Document'; it('html should match the regex', function() { var result = htmlCommentRegex.exec(html); assert.deepEqual(result[0], ''); assert.deepEqual(result[1], '[if lt IE 7]> '); assert.deepEqual(result[1], ' normal comment 1 '); result = htmlCommentRegex.exec(html); assert.deepEqual(result[0], ''); assert.deepEqual(result[1], 'normal comment 2'); });