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

gluenode

v1.0.3

Published

A DOM-like data structure

Downloads

3

Readme

Glue Node npm

A DOM-like data structure

Get Started

npm install gluenode --save

Example

Node relationship diagram

Node relationship diagram

import { createNode } from 'gluenode';

const windy = createNode({
  name: 'Windy',
  age: 20,
});
windy.get('age'); // Output: 20
windy.get('name'); // Output: "Windy"

const diluc = createNode({
  name: 'Diluc',
  age: 28,
});

const klee = createNode({
  name: 'Klee',
  age: 8,
});

const barbara = createNode({
  name: 'Barbara',
  age: 12,
});

const bennett = createNode({
  name: 'Bennett',
  age: 13,
});

const jean = createNode({
  name: 'Jean',
  age: 23,
});

windy.appendChild(diluc)
  .appendChild(klee)
  .appendChild(barbara);

barbara.appendChild(bennett)
  .appendChild(jean);

diluc.previousSibling; // Output: null
diluc.nextSibling; // Output: klee(GlueNode<{ name: string; age: number; }>)
klee.parentNode; // Output: windy(GlueNode<{ name: string; age: number; }>)

Array.from(barbara.children); // Output: [bennett, jean]
barbara.firstChild; // Output: bennett
barbara.lastChild; // Output: jean

API

Constructor

  • new (original: T): GlueNode<T>

  • GlueNode.create(original: T): GlueNode<T>

Properties

  • origin Get original object
  • parentNode Get parent node
  • previousSibling Get previous sibling
  • nextSibling Get next sibling
  • firstChild Get first child
  • lastChild Get last child
  • firstSibling Get first sibling
  • lastSibling Get last sibling
  • rootNode Get root node
  • sourceChain Get chain
Array.from(glueNode.sourceChain) // [this, father, grandfather, ..., root]
// or
glueNode.sourceChain.toArray()
  • children Get children { [Symbol.iterator] }
// transform glueNode.children to Array
Array.from(glueNode.children)
// or
glueNode.children.toArray()
  • siblings Get all siblings
Array.from(glueNode.siblings) // [firstSibling, ... , previousSibling, this, nextSibling, ..., lastSibling]
// or
glueNode.siblings.toArray()

Methods

  • get<K extends keyof T>(key: K): T[K]
  • set<K extends keyof T>(key: K, value: T[K]): this
  • replaceChild(newNode: GlueNode<T>, oldNode: GlueNode<T>): this
  • insertBefore(newNode: GlueNode<T>, oldNode: GlueNode<T>): this
  • prependChild(newNode: GlueNode<T>): this
  • appendChild(newNode: GlueNode<T>): this
  • removeChild(node: GlueNode<T>): this
  • remove(): this
  • find(predicate: (node: GlueNode<T>) => boolean): GlueNode<T> | null
  • findChild(predicate: (node: GlueNode<T>) => boolean): GlueNode<T> | null
  • findSibling(predicate: (node: GlueNode<T>) => boolean): GlueNode<T> | null
  • toJSON(): T & { children: T[] }