3.1.0 • Published 17 days ago

is-html v3.1.0

Weekly downloads
311,326
License
MIT
Repository
github
Last release
17 days ago

is-html

Check if a string is HTML

You should not use this for any kind of validation, sanitation, or XSS checks.

Install

npm install is-html

Usage

import isHtml from '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

Note: It does not detect deprecated HTML tags.

agent-interfacehowmany-img@kaercher/contentful@iobroker-community-adapters/iobroker.device-watchertransaction-servicevisitjs@infinitebrahmanuniverse/nolb-is-h@tubyte/core@everything-registry/sub-chunk-1933mggauharnearfsnon-functionals-reactmeeting-block-ddddmd2xlifflog-segment@yermangderrff/mail-service@4cadia/janus-indexer-corebotrix-rewrite@destinationstransfers/eslint-config@destinationstransfers/eslint-pluginbrandifyjscan-zone-jsdomcarlinokitsunebotlistnpm-all-packagesnodebb-plugin-composer-quillnodebb-plugin-composer-quill-venomnxus-mailerqiiuopen311-messagespage-link-checkerreact-saasifyphilterseidr-reactun-cssuncssuncss-jsdomtg-designwebpage-captureutilitariotubyte-corethesuperloggerto-dtosticky-scroll-catchrogrich-text-trans-vuesindresorhus.jssindredashchain_digger@corpsmap/corpsmapchoo-choo@crds_npm/rollup-plugin-content-blocksemail-builder-coreemail-builder-core-mincrazytech-botlist@fooddyshop/backend@hora/http-responseannotation-componentdiscordlists@devorso/dcountdown@google-cloud/translate@janusproject/janus.framework.jnsevervault-expressfh-uncss@jaw52/transform-jsx-for-vitegeenen-mail@m6web/i18n-lintgenerate-feedgenerator-bootstrap-boilerplate-template@lykmapipo/postman@novaatwarren/uncss@lodgify/uifocus-loader@pepperi-addons/cpi-nodeeslint-plugin-solid@pie-api-gcp/storage@randy.tarampi/jsx@raz1el/uncss@strelka/redactor@piyushmishra/uncss@rexfng/tfainstall-is@swapcard/react-sdk@refactorpro/pixi-virtual-joystick@sherpajs/counseljest-glamor-reactjest-serializer-html-string@sagebots/mermaidintitule@rspress/core@rspress/theme-defaultjanus.framework.jnsjanusndxrjanusndxr-demokenote-mailer-helper@ta11y/core@ta11y/extractldexplorer-component
3.1.0

17 days ago

3.0.0

3 years ago

2.0.0

5 years ago

1.1.0

7 years ago

1.0.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago