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 🙏

© 2026 – Pkg Stats / Ryan Hefner

qdom-dsl

v1.0.7

Published

QDOM - DOM Manipulation with SQL-like syntax

Downloads

6

Readme

QDOM - DOM Manipulation with SQL-like syntax

QDOM is a lightweight Domain-Specific Language (DSL) for manipulating the DOM declaratively, inspired by SQL-like syntax.

With QDOM, you can write simple and expressive statements like:

INSERT '<div>Hello</div>' INTO '#app';
UPDATE '#title' SET text = 'Updated Title';
DELETE '*' FROM '.items';

✅ No JavaScript knowledge needed — QDOM parses and executes your commands automatically.

🔥 Features

  • ⚡ Lightweight (only ~53 KB)
  • 🎯 Pure client-side execution
  • ✨ SQL-like syntax for DOM manipulation
  • 🧩 Easy integration into any project via a <script> tag
  • 🔒 Protection against XSS when inserting HTML

🚀 Installation

Import QDOM into the HTML file

You can include the minified version directly in your project with a <script> tag:

<script src="https://cdn.jsdelivr.net/npm/qdom-dsl/dist/qdom.min.js"></script>

How to Use

  1. Add your QDOM statements in a script tag with type="text/qdom" (you can also specify a src file to add the statements separately):
INSERT '<p>Welcome to QDOM!</p>' INTO '#content';
UPDATE '#title' SET text = 'New Title';
UPDATE '#header' SET html = '<div>Hello!</div>';

Note: UPDATE allows for text property which sets the innerText property to the given value, and for html property which sets the innerHTML property to the given value. The rest of the properties are taken for granted and don't present any special rules (color, fontSize, etc.).

  1. QDOM will automatically parse and execute the commands when the page loads.

⚙️ Supported Commands

| Command | Description | | :------------------------------------------------------ | :---------------------------------------- | | INSERT '<html>' INTO 'selector'; | Insert HTML into a DOM element | | UPDATE 'selector' SET property = value; | Update properties of a DOM element | | DELETE '*' FROM 'selector'; | Remove all children from an element | | DROP 'selector'; | Completely remove an element from the DOM | | SELECT COUNT(*) FROM 'selector'; | Count elements from a selected element | | CREATE TRIGGER event ON 'selector' EXECUTE statement; | Define triggers on DOM events | | EXECUTE TRIGGER event ON 'selector'; | Manually execute a trigger |

SELECT only allows applying aggregation functions, not directly selecting elements as that can be done with CSS selectors. SELECT supports COUNT, SUM, AVG, MIN and MAX operations. Both SELECT and DELETE support * selector alongside with normal CSS selectors.

You can also have a SELECT as content instead of HTML values for INSERT. The same also goes for the value of any property in the UPDATE statement. So, you can have something like this for example:

INSERT (SELECT COUNT(*) FROM '.list') INTO '#total';
UPDATE '#cart' SET text = (SELECT SUM('.item') FROM '.list');

QDOM also adds interactivity on the page by implementing triggers (which use event listeners). It also allows for custom events, not just the ones provided by the browser by default (such as click) without changing the syntax at all. An example for adding and manually executing a click event on an element is the following:

CREATE TRIGGER click ON '#btn' EXECUTE DELETE 'div' FROM '#container';
EXECUTE TRIGGER click ON '#btn';`;

📚 Development

To build the minified version:

npm run build

QDOM uses: