// momentum

tracking since W47

// why it's here

  • Active: last commit today
  • Built almost entirely by one person
  • Health 100/100 with only 55 stars
  • Around since 2021 and still shipping
  • Accepts sponsorship (github)

// how to help

// readme

๐ŸŒฑ zeed-dom

A lightweight offline DOM for Node.js, Bun and browsers: HTML parser, CSS selectors, JSX and serializers to HTML, XML, Markdown, plain text and safe HTML.

Parses real-world pages several times faster than linkedom, happy-dom and jsdom, stays linear on hostile input, and has only two small dependencies. Made for server-side rendering, static site generation, post-processing HTML, and cleaning up user content.

  • โšก๏ธ Fast: parsing and serialization several times faster than the alternatives, see Performance
  • ๐Ÿ” CSS selectors: querySelector, querySelectorAll, matches and the .handle() helper
  • ๐Ÿงฉ JSX: build HTML strings or a DOM tree with JSX/TSX, no React needed
  • ๐Ÿ“ Serializers: HTML, XML, Markdown, plain text, pretty printed HTML
  • ๐Ÿ”’ Safe HTML: reduce untrusted HTML to allowed tags, attributes and URLs
  • ๐Ÿ›ก Robust: no recursion and linear time, so no input can block the event loop or overflow the stack
  • ๐Ÿฆพ TypeScript: full typings, ESM and CommonJS
Read the full README on GitHub โ†—