is-html:检查字符串是否为HTML

时间:2024-06-14 14:16:50
【文件属性】:

文件名称:is-html:检查字符串是否为HTML

文件大小:4KB

文件格式:ZIP

更新时间:2024-06-14 14:16:50

JavaScript

is-html 检查字符串是否为HTML 您不应将其用于任何形式的验证,卫生检查或XSS检查。 安装 $ npm install is-html 用法 const isHtml = require ( 'is-html' ) ; isHtml ( '

I am HTML

' ) ; //=> true isHtml ( '<!doctype><html><body>

I :red_heart: unicorns

</body></html>' ) ; //=> true isHtml ( 'I am XML' ) ; //=> false isHtml ( '>+++++++>++++++++++>+++>+<<<<-' ) ; //=> false 注意:它不检测已弃用HTML标签。


【文件预览】:
is-html-main
----.gitattributes(19B)
----.github()
--------workflows()
----test.js(815B)
----license(1KB)
----.npmrc(19B)
----.editorconfig(175B)
----.gitignore(23B)
----index.js(282B)
----readme.md(486B)
----package.json(564B)

网友评论