{"library":"html5parser","type":"library","category":null,"description":"html5parser is a highly performant and compact JavaScript library designed for parsing HTML5 documents. Currently at version 2.0.2, it provides functionalities to tokenize and parse HTML strings into a structured Abstract Syntax Tree (AST). It distinguishes itself through its speed, tiny bundle size (under 5kb), and cross-platform compatibility, running effectively in both modern browsers and Node.js environments. A key design principle is its strict adherence to the HTML5 specification; any content not compliant with HTML5 will be ignored. The library offers both low-level tokenization (`tokenize`) and higher-level AST generation (`parse`), along with utilities like `walk` for traversing the AST and `safeHtml` for sanitization. It ships with TypeScript types, promoting better developer experience and type safety. The release cadence appears to be driven by dependency updates and bug fixes, with `2.0.2` specifically noting dependency updates, suggesting a focus on stability and maintenance.","language":"javascript","status":"active","version":"2.0.2","tags":["javascript","html5","parser","ast","attributes","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install html5parser","imports":["import { parse } from 'html5parser';","import { walk } from 'html5parser';","import { SyntaxKind } from 'html5parser';","import { tokenize } from 'html5parser';","import { safeHtml } from 'html5parser';"]},{"cmd":"yarn add html5parser","imports":[]},{"cmd":"pnpm add html5parser","imports":[]}],"homepage":null,"github":"https://github.com/acrazing/html5parser","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/html5parser","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/html5parser/compatibility"}}