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

xxdom

v0.1.1

Published

Criss-cross incremental DOM renderer

Readme

xxdom.js

Criss-cross incremental DOM renderer

Jump start

You can play with the code online on jsfiddle.net.

Load xx.min.js and you are ready for rendering dynamic content with well known {{expression}} syntax. The expression in-between {{}} is pure JavaScript.

<script src="https://4k2.de/xxdomjs/dist/xx.min.js"></script>

Hello {{ world + '!' }} <br>
Today is: {{ (new Date).toDateString() }}.

<script>
	var world="world";
</script>

You can "xx-scope" an HTML element. Additionally to the global JavaScript scope, every expression placed in one of the children have also access to this xx-scope. This works very much like local variables in js functions.

<div xx-scope="{ x:'local X'}">
	Access local var x = {{x}}<br>
	Access global var world = {{world}}
</div>

xx-text

You can xx-text the result of an expression to the elements el.innerText.

Hello <span xx-text="world"></span><span xx-text="'!'"></span>

xx-for

Loop over an iterable collection of something and access the items in there on "xx-scope".

<ul>
	<li xx-for="item of things.reverse()">
		The {{item.name}} is
		<span xx-style="{color: (item.color)}" xx-text="item.color"></span>.
	</li>
</ul>
<script>
var things = [
	{ name: 'banana', color: 'blue' },
	{ name: 'fox', color: 'brown'},
	{ name: 'ball', color: 'red' },
];
</script>

xx-if

Yes, we have also an if:

<div xx-scope="{ isCool: true }">
	Criss-Cross <span xx-if="isCool">is cool!</span>
</div>

xx-style, xx-class

xx-style uses the key-value pairs of a js object as "style property" and "value". xx-class use the keys as the "classname" and its value is an boolean expression for using or not using this "classname".

<div xx-scope="{ isSelected: true, acolor: 'blue' }">
	<div xx-style="{width: '300px', color: acolor}" xx-class="{ selected: isSelected }">
		Criss-Cross
	</div>
</div>

xx-prop

xx-prop bind to element properties. xx-prop expects an js-object. The key names of this js-object are the element property names to assign to.

<input xx-prop="{value: aValue}">

will do on every value change:

elInput.value = aValue;

xx-attr

xx-attr bind to element attributes. xx-attr expects an js-object. The key names of this js-object are the element attribute names to assign to.

<input xx-attr="{hint: aHint}">

will do on every value change:

elInput.setAttribute('hint', aHint);

xx-component

Define a new component with <template xx-component="{name}"> and use it with its name <{name}></{name}>:

<abc></abc>
<abc></abc>

<template xx-component="abc">
	<div>The quick brown fox jumps over the lazy dog.</div>
</template>

Re-render

The HTML document will be rendered with Criss-Cross after the "DOMContentLoaded" event. If the data/your model changes, you can re-render the DOM by calling xx.render() or short just xx(). Only changed values will trigger a change on the HTML element. On xx-for loops, the item identity operator ('===') is used to detect additions, deletions, replacements and kept items. If only the item content changes, its HTML element only gets an update.

<div> It is: {{ new Date }}</div>
<script>setInterval(xx, 1000);</script>

Installation

Use git:

git clone https://github.com/jensh/xxdomjs.git xxdom

Or npm:

npm install xxdom

Online examples

Here is a link to all above examples in action. The other examples from this repo.

Have fun!

We are interested in your thoughts!

Twitter: @jens4321