This commit is contained in:
chrosey
2017-09-13 07:52:34 +02:00
parent a1f16c37f4
commit 2340b0226b
24621 changed files with 2912161 additions and 149 deletions
+34
View File
@@ -0,0 +1,34 @@
# [![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('<!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](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
+2
View File
@@ -0,0 +1,2 @@
'use strict';
module.exports = /<!--([\s\S]*?)-->/g;
+109
View File
@@ -0,0 +1,109 @@
{
"_args": [
[
{
"raw": "html-comment-regex@^1.1.0",
"scope": null,
"escapedName": "html-comment-regex",
"name": "html-comment-regex",
"rawSpec": "^1.1.0",
"spec": ">=1.1.0 <2.0.0",
"type": "range"
},
"c:\\xampp\\htdocs\\laravel\\node_modules\\is-svg"
]
],
"_from": "html-comment-regex@>=1.1.0 <2.0.0",
"_id": "html-comment-regex@1.1.1",
"_inCache": true,
"_location": "/html-comment-regex",
"_nodeVersion": "4.4.4",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
"tmp": "tmp/html-comment-regex-1.1.1.tgz_1468323643310_0.8147242439445108"
},
"_npmUser": {
"name": "stevemao",
"email": "maochenyan@gmail.com"
},
"_npmVersion": "2.15.1",
"_phantomChildren": {},
"_requested": {
"raw": "html-comment-regex@^1.1.0",
"scope": null,
"escapedName": "html-comment-regex",
"name": "html-comment-regex",
"rawSpec": "^1.1.0",
"spec": ">=1.1.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/is-svg"
],
"_resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.1.tgz",
"_shasum": "668b93776eaae55ebde8f3ad464b307a4963625e",
"_shrinkwrap": null,
"_spec": "html-comment-regex@^1.1.0",
"_where": "c:\\xampp\\htdocs\\laravel\\node_modules\\is-svg",
"author": {
"name": "Steve Mao",
"email": "maochenyan@gmail.com",
"url": "https://github.com/stevemao"
},
"bugs": {
"url": "https://github.com/stevemao/html-comment-regex/issues"
},
"dependencies": {},
"description": "Regular expression for matching HTML comments",
"devDependencies": {
"jscs": "^1.11.3",
"jshint": "^2.6.3",
"mocha": "*"
},
"directories": {},
"dist": {
"shasum": "668b93776eaae55ebde8f3ad464b307a4963625e",
"tarball": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.1.tgz"
},
"files": [
"index.js"
],
"gitHead": "8829fa5dcecdabb8680cdd8cf36fe73b297fffdf",
"homepage": "https://github.com/stevemao/html-comment-regex",
"keywords": [
"html-comment-regex",
"text",
"string",
"regex",
"regexp",
"re",
"match",
"test",
"find",
"pattern",
"comment",
"comments",
"html",
"HTML",
"HyperText Markup Language"
],
"license": "MIT",
"maintainers": [
{
"name": "stevemao",
"email": "steve.mao@healthinteract.com.au"
}
],
"name": "html-comment-regex",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/stevemao/html-comment-regex.git"
},
"scripts": {
"lint": "jshint *.js --exclude node_modules && jscs *.js",
"test": "npm run-script lint && mocha"
},
"version": "1.1.1"
}