{"_id":"is-html","_rev":"3932500","name":"is-html","description":"Check if a string is HTML","dist-tags":{"latest":"3.1.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2025-09-01T01:29:31.000Z","created":"2013-12-13T15:51:17.102Z","3.1.0":"2024-03-12T14:37:48.520Z","3.0.0":"2021-09-01T23:10:23.654Z","2.0.0":"2019-05-28T09:46:56.215Z","1.1.0":"2017-02-13T09:16:08.963Z","1.0.0":"2014-08-14T18:01:55.550Z","0.2.2":"2014-04-29T19:16:04.860Z","0.2.1":"2014-04-16T20:38:07.552Z","0.1.1":"2013-12-13T20:04:34.667Z","0.1.0":"2013-12-13T15:51:17.102Z"},"users":{"itonyyo":true,"rocket0191":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-html.git"},"versions":{"3.1.0":{"name":"is-html","version":"3.1.0","description":"Check if a string is HTML","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-html.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","types":"./index.d.ts","sideEffects":false,"engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava"},"keywords":["html","detect","check","is","tags","elements","string"],"dependencies":{"html-tags":"^3.1.0"},"devDependencies":{"ava":"^3.15.0","xo":"^0.44.0"},"gitHead":"8111a9ccd8defc5f841106163302827adddb6899","bugs":{"url":"https://github.com/sindresorhus/is-html/issues"},"homepage":"https://github.com/sindresorhus/is-html#readme","_id":"is-html@3.1.0","_nodeVersion":"20.11.1","_npmVersion":"9.2.0","dist":{"shasum":"ba89d7cb4521b46d9653105b659c1467e141f0d5","size":1790,"noattachment":false,"key":"/is-html/-/is-html-3.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-html/download/is-html-3.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-html_3.1.0_1710254268336_0.6658110166629119"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-03-12T14:37:48.520Z","publish_time":1710254268520,"_source_registry_name":"default","_cnpm_publish_time":1710254268520},"3.0.0":{"name":"is-html","version":"3.0.0","description":"Check if a string is HTML","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-html.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava"},"keywords":["html","detect","check","is","tags","elements","string"],"dependencies":{"html-tags":"^3.1.0"},"devDependencies":{"ava":"^3.15.0","xo":"^0.44.0"},"gitHead":"d59f89337711f4e3cc57b65774c7781159a6a53f","bugs":{"url":"https://github.com/sindresorhus/is-html/issues"},"homepage":"https://github.com/sindresorhus/is-html#readme","_id":"is-html@3.0.0","_nodeVersion":"14.17.5","_npmVersion":"7.20.3","dist":{"shasum":"a2fef286da052db8f4c7941ac5eb2137eb840cf6","size":1638,"noattachment":false,"key":"/is-html/-/is-html-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-html/download/is-html-3.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-html_3.0.0_1630537823462_0.23298440456736658"},"_hasShrinkwrap":false,"publish_time":1630537823654,"_cnpm_publish_time":1630537823654},"2.0.0":{"name":"is-html","version":"2.0.0","description":"Check if a string is HTML","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-html.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava"},"keywords":["html","detect","check","is","tags","elements","string"],"dependencies":{"html-tags":"^3.0.0"},"devDependencies":{"ava":"^1.4.1","xo":"^0.24.0"},"gitHead":"7ae39edd57cadf41e24715323791c421bc3c0ea2","bugs":{"url":"https://github.com/sindresorhus/is-html/issues"},"homepage":"https://github.com/sindresorhus/is-html#readme","_id":"is-html@2.0.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"b3ab2e27ccb7a12235448f51f115a6690f435fc8","size":1520,"noattachment":false,"key":"/is-html/-/is-html-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-html/download/is-html-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-html_2.0.0_1559036816112_0.6609425442502621"},"_hasShrinkwrap":false,"publish_time":1559036816215,"_cnpm_publish_time":1559036816215},"1.1.0":{"name":"is-html","version":"1.1.0","description":"Check if a string is HTML","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-html.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["html","detect","check","is","tags","elements","string"],"dependencies":{"html-tags":"^1.0.0"},"devDependencies":{"mocha":"*"},"gitHead":"e337c18ecfd19c16b6d067e60748137bfba27bc7","bugs":{"url":"https://github.com/sindresorhus/is-html/issues"},"homepage":"https://github.com/sindresorhus/is-html#readme","_id":"is-html@1.1.0","_shasum":"e04f1c18d39485111396f9a0273eab51af218464","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.6.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"e04f1c18d39485111396f9a0273eab51af218464","size":1592,"noattachment":false,"key":"/is-html/-/is-html-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-html/download/is-html-1.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/is-html-1.1.0.tgz_1486977368680_0.46791565394960344"},"directories":{},"publish_time":1486977368963,"_cnpm_publish_time":1486977368963,"_hasShrinkwrap":false},"1.0.0":{"name":"is-html","version":"1.0.0","description":"Check if a string is HTML","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/is-html"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["html","detect","check","is","tags","elements","string"],"dependencies":{"html-tags":"^1.0.0"},"devDependencies":{"mocha":"*"},"gitHead":"20f944fc2802bb366cc9747fa3dfa925f4457528","bugs":{"url":"https://github.com/sindresorhus/is-html/issues"},"homepage":"https://github.com/sindresorhus/is-html","_id":"is-html@1.0.0","_shasum":"9cbbbfebd9ee11dc206683f3ecaf4df5b1633a1b","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"9cbbbfebd9ee11dc206683f3ecaf4df5b1633a1b","size":897,"noattachment":false,"key":"/is-html/-/is-html-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-html/download/is-html-1.0.0.tgz"},"directories":{},"publish_time":1408039315550,"_cnpm_publish_time":1408039315550,"_hasShrinkwrap":false},"0.2.2":{"name":"is-html","version":"0.2.2","description":"Check if a string is HTML","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/is-html"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha","browser":"browserify -s $npm_package_name -o browser.js ."},"files":["index.js"],"keywords":["html","detect","check","is","tags","elements","string"],"dependencies":{"html-tags":"^0.3.0"},"devDependencies":{"mocha":"*","browserify":"^3.0.0"},"bugs":{"url":"https://github.com/sindresorhus/is-html/issues"},"homepage":"https://github.com/sindresorhus/is-html","_id":"is-html@0.2.2","dist":{"shasum":"0b98189468fd43f32158d06ba32b3dfd4a5b6798","size":982,"noattachment":false,"key":"/is-html/-/is-html-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-html/download/is-html-0.2.2.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1398798964860,"_cnpm_publish_time":1398798964860,"_hasShrinkwrap":false},"0.2.1":{"name":"is-html","version":"0.2.1","description":"Check if a string is HTML","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/is-html"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha","browser":"browserify -s $npm_package_name -o browser.js ."},"files":["index.js"],"keywords":["html","detect","check","is","tags","elements","string"],"dependencies":{"html-tags":"^0.3.0"},"devDependencies":{"mocha":"*","browserify":"^3.0.0"},"bugs":{"url":"https://github.com/sindresorhus/is-html/issues"},"homepage":"https://github.com/sindresorhus/is-html","_id":"is-html@0.2.1","dist":{"shasum":"234b4bde76f115715744d5c11920c4b89e11fd95","size":981,"noattachment":false,"key":"/is-html/-/is-html-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-html/download/is-html-0.2.1.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1397680687552,"_cnpm_publish_time":1397680687552,"_hasShrinkwrap":false},"0.1.1":{"name":"is-html","version":"0.1.1","description":"Check if a string is HTML","license":"MIT","main":"is-html.js","repository":{"type":"git","url":"git://github.com/sindresorhus/is-html"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.8.0"},"scripts":{"test":"mocha"},"files":["is-html.js"],"keywords":["html","detect","check","is","tags","elements","string"],"dependencies":{"html-tags":"~0.1.0"},"devDependencies":{"mocha":"~1.x"},"readmeFilename":"readme.md","bugs":{"url":"https://github.com/sindresorhus/is-html/issues"},"homepage":"https://github.com/sindresorhus/is-html","_id":"is-html@0.1.1","dist":{"shasum":"bcff6686cad044d7757a7bba288a923c5bde7b15","size":1169,"noattachment":false,"key":"/is-html/-/is-html-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-html/download/is-html-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1386965074667,"_cnpm_publish_time":1386965074667,"_hasShrinkwrap":false},"0.1.0":{"name":"is-html","version":"0.1.0","description":"Check if a string is HTML","license":"MIT","main":"is-html.js","repository":{"type":"git","url":"git://github.com/sindresorhus/is-html"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.8.0"},"scripts":{"test":"mocha"},"files":["is-html.js"],"keywords":["html","detect","check","is","tags","elements","string"],"dependencies":{"html-tags":"~0.1.0"},"devDependencies":{"mocha":"~1.x"},"readmeFilename":"readme.md","bugs":{"url":"https://github.com/sindresorhus/is-html/issues"},"homepage":"https://github.com/sindresorhus/is-html","_id":"is-html@0.1.0","dist":{"shasum":"523c0134715f91d23cc75c8142d65fd73a854266","size":1169,"noattachment":false,"key":"/is-html/-/is-html-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-html/download/is-html-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1386949877102,"_cnpm_publish_time":1386949877102,"_hasShrinkwrap":false}},"readme":"# is-html\n\n> Check if a string is HTML\n\nYou should not use this for any kind of validation, sanitation, or XSS checks.\n\n## Install\n\n```sh\nnpm install is-html\n```\n\n## Usage\n\n```js\nimport isHtml from 'is-html';\n\nisHtml('<p>I am HTML</p>');\n//=> true\n\nisHtml('<!doctype><html><body><h1>I ❤ unicorns</h1></body></html>');\n//=> true\n\nisHtml('<cake>I am XML</cake>');\n//=> false\n\nisHtml('>+++++++>++++++++++>+++>+<<<<-');\n//=> false\n```\n\nNote: It does not detect deprecated HTML tags.\n","_attachments":{},"homepage":"https://github.com/sindresorhus/is-html#readme","bugs":{"url":"https://github.com/sindresorhus/is-html/issues"},"license":"MIT"}