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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sedeh/node-object-model

v0.0.6

Published

Have you ever wanted to have a way of viewing a network and traverse through it in g graphical way?

Downloads

1

Readme

Welcome to node-object-model

Have you ever wanted to have a way of viewing a network and traverse through it in g graphical way?

Node Object Model (NOM) is perfect for presenting Network topology or representing data in the form of nodes of different sizes embedding node-specific data that can be retrieved through each node.

Live Demo | NPM | Comments/Requests

Dependencies

MODULE: 
		NodeObjectModule

DEPENDENCIES: 
    "font-awesome": "^4.7.0",

Interfaces

Node interface provides a basic block to create a topology of inter-connections. A node ID is essentially its name or title. A node is represented with an icon. The icon value will be a CSS class name that renders the icon. A node is also represented by a description which can be a long text/html content that can be displayed when a node is selected. A node can be a facade of a topology of inner nodes through its children. Within a node, all children could be inter connected through list of IDs in its connections list. A node could have any kind of information pertinent to its characteristics and as such is not pre-defined through its info object. Wnen representing a node in a container, top and left values will determine its physical pixel perfect location within the cntainer.

export interface Node {
	id: string;
	icon: string;
	draggable?: boolean;
	editable?: boolean;
	description: string;
	top: number;
	left: number;
	width: number;
	height: number;
	children: Node[];
	connections: Connection[];
	info?: any;
	offset?: any;
}
export interface Connection {
	id: string;
	class: string;
	info?: any;
}
export interface ConnectionDetail {
	id: string;
	offset: number;
	from: string;
	to: string;
	info: any;
	hit: (event: any, item: any) => boolean;
	left: number;
	top:  number;
	width:  number;
	height: number;
	class: string[]
}

Sample code

<node-object-model 
    [root]="root"
    [clear]="root === undefined"
    [enableInspection]="enableInspection" 
    [enableDetailedInspection]="enableDetailedInspection"
    [popupInspection]="popupInspection"
    [activeOnHover]="activeOnHover"
    (onSelection)="report($event)"
    [editable]="editable" >
</node-object-model>  	

| Version |Description | |-----------|---------------------------------------------------------------------------------------------------------------------------------------------| |0.0.2/3/4/5|small documentational fixes. | |0.0.1 |Initial release with angular 15. |

Sample of code in Action:

alt text