riot/dom-nodes — explained in plain English
Analysis updated 2026-07-25 · repo last pushed 2026-01-24
Build a templating engine that automatically self-closes void tags like img and br.
Create a web framework that distinguishes custom elements from standard HTML tags.
Validate HTML input by checking if tag names and attributes are standard.
Generate correct HTML output by checking if an attribute is boolean.
| riot/dom-nodes | amirmahdavi2023/d1-admin | anil-matcha/open-poe-ai | |
|---|---|---|---|
| Stars | 4 | 4 | 4 |
| Language | JavaScript | JavaScript | JavaScript |
| Last pushed | 2026-01-24 | — | 2026-06-25 |
| Maintenance | Quiet | — | Active |
| Setup difficulty | easy | easy | moderate |
| Complexity | 2/5 | 2/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
No special setup needed, just install via npm and import the functions.
dom-nodes is a small JavaScript library that helps code answer simple questions about HTML and SVG tags. Questions like: is "img" a self-closing tag? Is "circle" an SVG element? Is "selected" a boolean attribute? Instead of a developer writing these checks from scratch or maintaining their own lists, this package provides ready-made functions that return true or false. The library bundles complete lists of all standard HTML tags, SVG tags, void elements (tags that don't need a closing slash, like "img" or "br"), boolean attributes (like "checked" or "disabled"), and elements that accept a value attribute. It exposes simple functions like isHtml, isSvg, isVoid, isCustom, hasValueAttribute, and isBoolAttribute. You pass in a tag name as a string, and the function tells you what category it falls into. The checks are case-insensitive, so "IMG", "img", and "Img" all work the same way. Someone building a web framework, a templating engine, or a custom UI library would use this. For example, if you are writing code that takes a tag name and needs to generate the right HTML output, you need to know whether to self-close the tag or not. Or if you are building a component system and someone writes "my-component", you need to distinguish that custom element from a standard tag like "div". These are the kinds of decisions this library helps automate. One notable design choice is that the project copies its tag lists directly into its own source code rather than depending on other npm packages at runtime. It credits two existing projects as the source of those lists but avoids pulling them in as dependencies. That keeps the package self-contained and lightweight for what is fundamentally just string matching against known lists.
A small JavaScript library that provides ready-made functions to check if a tag is HTML, SVG, self-closing, or a boolean attribute, so you don't have to maintain those lists yourself.
Mainly JavaScript. The stack also includes JavaScript.
Quiet — no commits in 6-12 months (last push 2026-01-24).
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.