htmlparser2-20kb

Fast & forgiving HTML/XML parser bundled for the browser, < 20 KB, no dependencies

Usage no npm install needed!

<script type="module">
  import htmlparser220kb from 'https://cdn.skypack.dev/htmlparser2-20kb';
</script>

README

htmlparser2-20kb

npm npm bundle size (minified) npm bundle size (minified + gzip)

Fast & forgiving HTML/XML parser bundled for the browser, < 20 KB, no dependencies

Includes:

Excludes:

  • The decodeEntities option
  • Support for async usage with streams
  • FeedHandler
  • Some functions from domutils
  • Automatic fix-up of mixed-case tag and attribute names. Set the lowerCaseTags and lowerCaseAttributeNames options of the parser to false to retain the casing.

Compare:

https://bundlephobia.com/result?p=htmlparser2