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-designthesuperlogger@rspress/core@rspress/theme-defaultgenerator-bootstrap-boilerplate-templatejest-glamor-reactjest-serializer-html-stringinstall-isjanus.framework.jnsjanusndxrjanusndxr-demokenote-mailer-helperintitulelog-segmentmd2xliffldexplorer-componentmeeting-block-dddd@yermangderrff/mail-serviceannotation-component@google-cloud/translate@4cadia/janus-indexer-core@corpsmap/corpsmap@crds_npm/rollup-plugin-content-blockskitsunebotlistchain_diggertubyte-coreun-cssto-dtoutilitariowebpage-captureuncssuncss-jsdom@lodgify/ui@raz1el/uncss@randy.tarampi/jsx@sagebots/mermaid@refactorpro/pixi-virtual-joystick@rexfng/tfa@pie-api-gcp/storage@piyushmishra/uncss@pepperi-addons/cpi-nodemgexplorermggauharopen311-messagesnxus-mailerpage-link-checkerrogseidr-reactnearfsnodebb-plugin-composer-quillnodebb-plugin-composer-quill-venomnon-functionals-reactphilterqiiurich-text-trans-vuesindredashsindresorhus.jsreact-saasifycan-zone-jsdomcarlinochromane-utilschoo-choocrazytech-botlistbotrix-rewritebrandifyjsdiscordlistsgenerate-feedgeenen-mail@sherpajs/counsel@strelka/redactor@swapcard/react-sdk@ta11y/core@ta11y/extractemail-builder-coreemail-builder-core-mineslint-plugin-solidevervault-expressfh-uncssfocus-loader@m6web/i18n-lint@lykmapipo/postman@destinationstransfers/eslint-config@destinationstransfers/eslint-plugin@fooddyshop/backend@devorso/dcountdown@mavenagi/knowledge-converter@novaatwarren/uncss@hora/http-response@janusproject/janus.framework.jns@jaw52/transform-jsx-for-vite
3.1.0

2 years ago

3.0.0

4 years ago

2.0.0

6 years ago

1.1.0

9 years ago

1.0.0

11 years ago

0.2.2

11 years ago

0.2.1

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago