Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

heimdalljs-graph

Package Overview
Dependencies
Maintainers
6
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heimdalljs-graph

`heimdalljs-graph` is intended to be the primary entry point for doing visualizations with data gathered by [Heimdall](https://github.com/heimdalljs/heimdalljs-lib).

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
124K
increased by2.74%
Maintainers
6
Weekly downloads
 
Created

What is heimdalljs-graph?

The heimdalljs-graph npm package is a tool for creating and manipulating graphs, particularly useful for performance monitoring and profiling in JavaScript applications. It allows users to create nodes, edges, and traverse the graph to analyze performance data.

What are heimdalljs-graph's main functionalities?

Creating a Graph

This feature allows you to create a new graph instance using the heimdalljs-graph package.

const { Graph } = require('heimdalljs-graph');
const graph = new Graph();

Adding Nodes

This feature allows you to add nodes to the graph. Nodes can represent various points of interest in your application.

const { Graph, Node } = require('heimdalljs-graph');
const graph = new Graph();
const node = new Node('node1');
graph.addNode(node);

Adding Edges

This feature allows you to add edges between nodes in the graph, representing relationships or dependencies between different parts of your application.

const { Graph, Node } = require('heimdalljs-graph');
const graph = new Graph();
const node1 = new Node('node1');
const node2 = new Node('node2');
graph.addNode(node1);
graph.addNode(node2);
graph.addEdge(node1, node2);

Traversing the Graph

This feature allows you to traverse the graph and perform operations on each node. In this example, it logs the ID of each node.

const { Graph, Node } = require('heimdalljs-graph');
const graph = new Graph();
const node1 = new Node('node1');
const node2 = new Node('node2');
graph.addNode(node1);
graph.addNode(node2);
graph.addEdge(node1, node2);
graph.traverse((node) => {
  console.log(node.id);
});

Other packages similar to heimdalljs-graph

FAQs

Package last updated on 16 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc