3.1.0 • Published 1 year ago

is-html v3.1.0

Weekly downloads
311,326
License
MIT
Repository
github
Last release
1 year 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@crds_npm/rollup-plugin-content-blocks@corpsmap/corpsmap@rspress/core@rspress/theme-defaultgenerator-bootstrap-boilerplate-templatejest-glamor-reactjest-serializer-html-stringinstall-isjanus.framework.jnsjanusndxrjanusndxr-demokenote-mailer-helperkitsunebotlistchain_diggertubyte-coreun-cssto-dtoutilitario@4cadia/janus-indexer-core@destinationstransfers/eslint-config@destinationstransfers/eslint-plugin@devorso/dcountdownwebpage-captureuncssuncss-jsdom@fooddyshop/backend@hora/http-response@google-cloud/translate@lodgify/ui@lykmapipo/postman@m6web/i18n-lint@janusproject/janus.framework.jns@jaw52/transform-jsx-for-vite@raz1el/uncss@randy.tarampi/jsx@sagebots/mermaid@refactorpro/pixi-virtual-joystick@rexfng/tfa@pie-api-gcp/storage@novaatwarren/uncss@piyushmishra/uncss@pepperi-addons/cpi-nodemgexplorermggauharopen311-messagesnxus-mailerpage-link-checkerrogseidr-reactnearfsnodebb-plugin-composer-quillnodebb-plugin-composer-quill-venomnon-functionals-reactphilterqiiurich-text-trans-vuesindredashsindresorhus.jsreact-saasifyintitulelog-segmentmd2xliffldexplorer-componentmeeting-block-dddd@ta11y/core@ta11y/extract@yermangderrff/mail-service@strelka/redactor@swapcard/react-sdkannotation-componentcan-zone-jsdomcarlinochromane-utilschoo-choocrazytech-botlistbotrix-rewritebrandifyjsdiscordlistsemail-builder-coreemail-builder-core-mineslint-plugin-solidevervault-expressfh-uncssfocus-loadergenerate-feedgeenen-mail@sherpajs/counsel
3.1.0

1 year ago

3.0.0

4 years ago

2.0.0

6 years ago

1.1.0

8 years ago

1.0.0

11 years ago

0.2.2

11 years ago

0.2.1

11 years ago

0.1.1

12 years ago

0.1.0

12 years ago