dom-serializer
npmv3.1.1TypeScriptrender domhandler DOM nodes to a string
Safe to adopt
Yes — dom-serializer scores well across adoption, maintenance, weight, supply chain, and licensing. 94.3M downloads per week and 2 known dependents. Last published 130 days ago. 3 releases in the last 2 years.
- AAdoption: grade A, Excellent.
94.3M downloads per week and 2 known dependents.
- BMaintenance: grade B, Good.
Last published 130 days ago. 3 releases in the last 2 years.
- AWeight: grade A, Excellent.
Pulls in 3 transitive packages, about 404 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding dom-serializer to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
Every license you inherit by installing dom-serializer, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=20.19.0
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the dom-serializer README.
import render from "dom-serializer";
// OR
const render = require("dom-serializer").default;dom-serializer vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| dom-serializerthis page | 94.3M | 2 | MIT | 4 months ago |
| cheerio | 24.1M | 5 | MIT | 1 day ago |
| @nodable/entities | 0 | 2 | MIT | 1 day ago |
| is-unsafe | 0 | 1 | MIT | 1 day ago |
| fast-xml-parser | 0 | 4 | MIT | 1 day ago |
| html-escaper | 79.8M | 1 | MIT | 1 day ago |
Dependencies
Declared by dom-serializer v3.1.1. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (10)
Used by
Popular packages that depend on dom-serializer.
Relationship graph
Dependencies (left) and dependents (right) of dom-serializer.
Frequently installed together
An AST-based pattern checker for JavaScript.
Next generation testing framework powered by Vite
TypeScript definitions for node
Handler for htmlparser2 that turns pages into a dom
An HTTP/1.1 client, written from scratch for Node.js
Prettier is an opinionated code formatter
TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files
htmlparser2 tree adapter for parse5.
Utilities for working with htmlparser2's dom
Implementation of the HTML encoding sniffer algo, with stream support
all the types of nodes in htmlparser2's dom
🔎 A simple, tiny and lightweight benchmarking library!
Release history
3 releases in the last two years, typically about 83 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 3.1.1latest | 4 months ago | 37 KB | MIT |
| 3.1.0 | 4 months ago | 37 KB | MIT |
| 3.0.0 | 5 months ago | 17 KB | MIT |
| 2.0.0 | 4 years ago | 28 KB | MIT |
| 1.4.1 | 4 years ago | 28 KB | MIT |
| 1.4.0 | 4 years ago | 28 KB | MIT |
| 1.3.2 | 5 years ago | 18 KB | MIT |
| 1.3.1 | 5 years ago | 17 KB | MIT |
| 1.3.0 | 5 years ago | 14 KB | MIT |
| 1.2.0 | 5 years ago | 23 KB | MIT |
| 1.1.0 | 6 years ago | 23 KB | MIT |
| 1.0.1 | 6 years ago | 22 KB | MIT |
| 1.0.0 | 6 years ago | 22 KB | MIT |
| 0.2.2 | 6 years ago | 9.3 KB | MIT |
| 0.2.1 | 7 years ago | 9.3 KB | MIT |
Overview
dom-serializer is an npm package that render domhandler DOM nodes to a string. It is extremely widely used, with about 94.3M downloads per week and 2 known dependents in the graph. The latest version is 3.1.1, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need render domhandler DOM nodes to a string and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (94.3M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use dom-serializer?
Yes — dom-serializer scores well across adoption, maintenance, weight, supply chain, and licensing. 94.3M downloads per week and 2 known dependents. Last published 130 days ago. 3 releases in the last 2 years.
How do I install dom-serializer?
Run `npm install dom-serializer` to add dom-serializer to your npm project.
How many dependencies does dom-serializer have?
dom-serializer declares 13 direct dependencies and pulls in 3 packages in total once its runtime tree is resolved totalling about 404 KB on disk.
What license is dom-serializer released under?
dom-serializer is distributed under the MIT license.
How popular is dom-serializer?
dom-serializer has approximately 94,304,390 downloads per week and 2 known dependent packages.
Is dom-serializer still maintained?
The most recent release of dom-serializer (v3.1.1) was published 4 months ago.
Does dom-serializer run install scripts?
No. dom-serializer does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.