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

domingo

v4.0.0

Published

A DOM centric rendering engine

Readme

DOMingo

A small (2KB minified and 830byte gziped), DOM centric templating library. DOMingo is particularly well suited for for rendering <template> content into a shadowRoot for Web Components. Bindings can be added to either the textContent of an element or in the value of an attribute. When rendering, DOMingo will only update the parts of the DOM that have changed. This provides a number of benefits apart from performance. One major benefit is how well this works with Web Components and Mutation Observers. DOMingo's approach means that when a new render is performed, neither an attributeChangedCallback nor a mutation event is not triggered on nodes who's value have not changed. With rendering methods that treat templates as strings before dumping them into the DOM for rendering, the entire contents of the render target is destroyed before being replaced. This could break event listeners or node references attached to specific elements with the render target. This is unnecessary with DOMingo.

##API

###Compile stage ####DOMingo(target [, { delimiters = ['{{', '}}'] }]) DOMingo provides a DOMingo function which accepts a single DOM node or fragment that is acts as the target for rendering, and an optional options argument. The DOMingo function acts as a "compile" stage for the target and allows DOMingo to intelligently update only the nodes that change when a new render occurs. The DOMingo function returns another function used in the render stage that is used to update the target's contents.

templateFragment

The target is a DOM node or fragment that contains the text bindings. This is most commonly obtained by retrieving the contents of a <template> element, but any element node or fragment can be used.

<template>...</template>
...
target = document.querySelector('template').contents;

options

The options object is an optional argument that currently understands one property: delimiters, which is a two-array of open and close delimiters for data binding. The default values are '{{' and '}}' respectively. There should be no need to include an options object unless you want to override the data binding delimiters.

var options = {
        openDelim: '<%=',
        closeDelim: '%>'
    };

DOMingo(target, options);

###Render stage ####render(data) The DOMingo function returns a function that is used to render the changes into the target. This function accepts just one argument, the data to be applied to the template.

var render = DOMingo(target);
render(data);

##Putting it all together

Assuming an HTML document similar to below:

<template>
    <figure>
        <style>
            [data-forcast-for] {

            }
        </style>
        <div data-forcast-for="{{forecast.label}}"></div>
        <figcaption>
            Today's forecast is {{forecast.label}} with a {{forecast.rain-chance}}% chance of rain. The high will be {{forecast.temperatures.high}}{{forecast.temperatures.units}} and a low of {{forecast.temperatures.low}}.
        </figcaption>
    </figure>
</template>

<wc-weather></wc-weather>

DOMingo could be used like this:

import DOMingo from 'DOMingo';

let target = document.querySelector('template').content,
    customEl = document.querySelector('custom-element'),
    shadow = customEl.createShadowRoot(),
    data = {
        forecast: {
            label: 'partly cloudy',
            'rain-chance': 50,
            temperatures: {
                high: 75,
                low: 58,
                units: 'F'
            }
        }
    },
    render = DOMingo(target);

customEl.shadowRoot.appendChild(target);

render(data);