flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
16
BACK_BACK/node_modules/is-html/index.js
generated
vendored
Executable file
16
BACK_BACK/node_modules/is-html/index.js
generated
vendored
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
'use strict';
|
||||
var htmlTags = require('html-tags');
|
||||
|
||||
var basic = /\s?<!doctype html>|(<html\b[^>]*>|<body\b[^>]*>|<x-[^>]+>)+/i;
|
||||
|
||||
var full = new RegExp(htmlTags.map(function (el) {
|
||||
return '<' + el + '\\b[^>]*>';
|
||||
}).join('|'), 'i');
|
||||
|
||||
module.exports = function (str) {
|
||||
if (basic.test(str)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return full.test(str);
|
||||
};
|
||||
21
BACK_BACK/node_modules/is-html/license
generated
vendored
Executable file
21
BACK_BACK/node_modules/is-html/license
generated
vendored
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
36
BACK_BACK/node_modules/is-html/package.json
generated
vendored
Executable file
36
BACK_BACK/node_modules/is-html/package.json
generated
vendored
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"name": "is-html",
|
||||
"version": "1.1.0",
|
||||
"description": "Check if a string is HTML",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/is-html",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"html",
|
||||
"detect",
|
||||
"check",
|
||||
"is",
|
||||
"tags",
|
||||
"elements",
|
||||
"string"
|
||||
],
|
||||
"dependencies": {
|
||||
"html-tags": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
}
|
||||
}
|
||||
34
BACK_BACK/node_modules/is-html/readme.md
generated
vendored
Executable file
34
BACK_BACK/node_modules/is-html/readme.md
generated
vendored
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
# is-html [](https://travis-ci.org/sindresorhus/is-html)
|
||||
|
||||
> Check if a string is HTML
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save is-html
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const isHtml = require('is-html');
|
||||
|
||||
isHtml('<p>I am HTML</p>');
|
||||
//=> true
|
||||
|
||||
isHtml('<!doctype><html><body><h1>I ❤ unicorns</h1></body></html>');
|
||||
//=> true
|
||||
|
||||
isHtml('<cake>I am XML</cake>');
|
||||
//=> false
|
||||
|
||||
isHtml('>+++++++>++++++++++>+++>+<<<<-');
|
||||
//=> false
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
Loading…
Add table
Add a link
Reference in a new issue