Check if a string is HTML
npm install is-html> Check if a string is HTML
You should not use this for any kind of validation, sanitation, or XSS checks.
``sh`
npm install is-html
`js
import isHtml from 'is-html';
isHtml('
I am HTML
');isHtml('
isHtml('
//=> false
isHtml('>+++++++>++++++++++>+++>+<<<<-');
//=> false
``
Note: It does not detect deprecated HTML tags.