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

@danpaul/data-node-manager

v0.1.0

Published

A data node management system for linked content

Readme

Data Node Manager

A TypeScript library for managing linked data nodes with file system persistence. This library provides a flexible system for creating, managing, and linking data nodes with both local and reference-based content.

Installation

npm install data-node-manager

Features

  • Create and manage linked data nodes
  • File system persistence
  • Support for local and reference data types
  • Hierarchical node structure with next/child relationships
  • TypeScript support with full type definitions

Usage

Basic Node Operations

import {
  DataNodeManager,
  DataNodeValueLocal,
  FileDataStore,
} from "data-node-manager";
// Initialize the manager
const store = new FileDataStore("./data");
const manager = new DataNodeManager({
  baseUrl: "https://example.com",
  store,
});
// Create a node
const node = await manager.create({
  data: new DataNodeValueLocal("Hello, world!"),
  createdAt: new Date(),
  baseUrl: "https://example.com",
  uuid: "123",
});
// Read a node
const retrieved = await manager.read("123");
// Update a node
node.data = new DataNodeValueLocal("Updated content");
await manager.update(node);
// Delete a node
await manager.delete("123");

Working with Node Relationships

// Add a node as next
const parent = await manager.create({
  data: new DataNodeValueLocal("Parent"),
  createdAt: new Date(),
  baseUrl: "https://example.com",
  uuid: "parent",
});
const child = await manager.add(
  {
    data: new DataNodeValueLocal("Child"),
    createdAt: new Date(),
    baseUrl: "https://example.com",
    uuid: "child",
  },
  parent.uuid
);
// Add a node as child
const subChild = await manager.add(
  {
    data: new DataNodeValueLocal("SubChild"),
    createdAt: new Date(),
    baseUrl: "https://example.com",
    uuid: "subchild",
  },
  child.uuid,
  true // true for adding as child
);

API Reference

DataNodeManager

The main class for managing data nodes.

Constructor

constructor(options: { baseUrl: string; store: DataStore })

Methods

  • create(options: DataNodeOptions): Promise<DataNode> Creates a new node with the given options.

  • read(uuid: string): Promise<DataNode> Reads a node by its UUID.

  • update(node: DataNode): Promise<void> Updates an existing node.

  • delete(uuid: string): Promise<void> Deletes a node by its UUID.

  • add(options: DataNodeOptions, parentUuid: string, asChild?: boolean): Promise<DataNode> Adds a new node as next or child of the parent node.

  • moveUp(uuid: string, parentUuid: string): Promise<void> Moves a node up in the hierarchy.

  • indent(uuid: string, parentUuid: string): Promise<void> Indents a node under a parent.

  • unIndent(uuid: string, parentUuid: string): Promise<void> Unindents a node from its parent.

DataNode

Represents a single data node in the system.

Properties

  • data: DataNodeValue
  • createdAt: Date
  • baseUrl: string
  • uuid: string
  • next?: string | null
  • child?: string | null

DataNodeValue

The value stored in a node, can be either:

  • DataNodeValueLocal<T>: For storing local data
  • DataNodeValueReference: For storing references to other resources

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see the LICENSE file for details.