npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

dominum

v0.2.0

Published

Minimalist and extensible DOM

Readme

npm Dependencies devDependencies

testing badge coverage badge

Known Vulnerabilities Total Alerts Code Quality: Javascript

License

issuehunt-to-marktext

dominum

Portmanteau of DOM and minimum

A modular representation of the DOM for use in Node.

There is already the excellent jsdom library, but for some targeted use cases, it is a heavier solution than needed.

Currently is mostly limited to creating Node types and with some means to modify them. Future additons may be added in other modules to keep the package light.

Installation

npm i -P dominum

Use cases

  1. Building templates server-side. These typically only require DOM creation methods without need for traversal, or after-the-fact manipulaion. Templating libraries which rely on the DOM, but which only use a subset of DOM APIs can use such modular DOM to build strings (e.g., with w3c-xmlserializer).

Goals

  1. Support a minimum of methods and properties for being able to create all Node types and modify them.
  2. Allow all created Node types have the methods and properties needed to preserve their children/state so they can be serialized.
  3. Support exporting all classes with proper inheritance hierarchy so can extend as needed.
  4. Use formal mix-in names where possible, but also allow better composability by splitting up mix-ins or making classes mix in custom mix-ins.

Non-goals

  1. Be fully faithful to the DOM in every neglibile way of no use to regular DOM building libraries, e.g., erring directly-invoked constructors or prototype properties. Use jsdom for more fully accurate behavior (and more complete APIs).
  2. Support all DOM APIs.

Usage

ESM

The classes are available as such:

import {
  DOMException,
  Node, ParentNode, ChildNode,

  NamedNodeMap, NodeList,
  setNodeListWritingPermission, setNamedNodeMapWritingPermission,

  Element, HTMLElement,
  Attr,
  DocumentFragment,
  ProcessingInstruction,
  CharacterData, Comment,
  Text, CDATASection,
  DocumentType,
  Document, HTMLDocument, XMLDocument,

  // Custom
  createHTMLDocument
} from 'dominum';

You can also import the specific module files:

import {Document} from 'dominum/src/Document';

Node.js

const {createHTMLDocument} = require('dominum');

Browser

Dominum.createHTMLDocument();

To-dos

  1. Add browser tests