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);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue