</>PackageGraphPackageGraph

dom-serializer

npmv3.1.1TypeScript

render 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.

3
Direct dependencies

Runtime packages this one declares itself.

3
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

404 KB
Install size

Unpacked size of this package plus its entire runtime tree.

1
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

BSD-2-Clause

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.

PackageWeekly downloadsDependentsLicenseLast release
dom-serializerthis page94.3M2MIT4 months ago
cheerio24.1M5MIT1 day ago
@nodable/entities02MIT1 day ago
is-unsafe01MIT1 day ago
fast-xml-parser04MIT1 day ago
html-escaper79.8M1MIT1 day ago

Dependencies

Declared by dom-serializer v3.1.1. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (10)

@biomejs/biome ^2.4.14@eslint/compat ^2.0.5@feedic/eslint-config ^0.4.1@types/node ^25.6.0cheerio ^1.2.0eslint ^10.3.0eslint-config-biome ^2.1.3typescript ^6.0.2typescript-eslint ^8.59.1vitest ^4.1.5

Used by

Popular packages that depend on dom-serializer.

Relationship graph

Dependencies (left) and dependents (right) of dom-serializer.

Frequently installed together

Release history

3 releases in the last two years, typically about 83 days apart.

Recent versions of dom-serializer
VersionPublishedSizeLicense
3.1.1latest4 months ago37 KBMIT
3.1.04 months ago37 KBMIT
3.0.05 months ago17 KBMIT
2.0.04 years ago28 KBMIT
1.4.14 years ago28 KBMIT
1.4.04 years ago28 KBMIT
1.3.25 years ago18 KBMIT
1.3.15 years ago17 KBMIT
1.3.05 years ago14 KBMIT
1.2.05 years ago23 KBMIT
1.1.06 years ago23 KBMIT
1.0.16 years ago22 KBMIT
1.0.06 years ago22 KBMIT
0.2.26 years ago9.3 KBMIT
0.2.17 years ago9.3 KBMIT

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

Keywords

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.