3.1.0 • Published 2 years ago

is-html v3.1.0

Weekly downloads
311,326
License
MIT
Repository
github
Last release
2 years 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-1933sticky-scroll-catchtg-designthesuperloggergenerator-bootstrap-boilerplate-templatejest-glamor-reactjest-serializer-html-stringinstall-isjanus.framework.jnsjanusndxrjanusndxr-demokenote-mailer-helperintitulelog-segmentmd2xliffldexplorer-componentmeeting-block-dddd@yermangderrff/mail-serviceannotation-componentgenerate-feedgeenen-mailemail-builder-coreemail-builder-core-mineslint-plugin-solidevervault-expressfh-uncssfocus-loadercan-zone-jsdomcarlinochromane-utilschoo-choocrazytech-botlistbotrix-rewritebrandifyjsdiscordlistskitsunebotlistchain_diggertubyte-coreun-cssto-dtoutilitariowebpage-captureuncssuncss-jsdommgexplorermggauharopen311-messagesnxus-mailerpage-link-checkerrogseidr-reactnearfsnodebb-plugin-composer-quillnodebb-plugin-composer-quill-venomnon-functionals-reactphilterqiiurich-text-trans-vuesindredashsindresorhus.jsreact-saasify@strelka/redactor@swapcard/react-sdk@ta11y/core@ta11y/extract@novaatwarren/uncss@lodgify/ui@piyushmishra/uncss@pie-api-gcp/storage@pepperi-addons/cpi-node@4cadia/janus-indexer-core@corpsmap/corpsmap@crds_npm/rollup-plugin-content-blocks@devorso/dcountdown@destinationstransfers/eslint-config@destinationstransfers/eslint-plugin@fooddyshop/backend@sherpajs/counsel@google-cloud/translate@refactorpro/pixi-virtual-joystick@hora/http-response@rexfng/tfa@sagebots/mermaid@mavenagi/knowledge-converter@m6web/i18n-lint@lykmapipo/postman@randy.tarampi/jsx@raz1el/uncss@janusproject/janus.framework.jns@jaw52/transform-jsx-for-vite
3.1.0

2 years ago

3.0.0

4 years ago

2.0.0

7 years ago

1.1.0

9 years ago

1.0.0

11 years ago

0.2.2

12 years ago

0.2.1

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago