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

@parcel/graph

Package Overview
Dependencies
Maintainers
1
Versions
553
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/graph

Blazing fast, zero configuration web application bundler

  • 3.2.1-canary.3249
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
459K
increased by1.7%
Maintainers
1
Weekly downloads
 
Created

What is @parcel/graph?

@parcel/graph is a utility package for creating and managing graphs, which are data structures consisting of nodes and edges. It is particularly useful for dependency management, task scheduling, and other scenarios where relationships between entities need to be represented and traversed.

What are @parcel/graph's main functionalities?

Creating a Graph

This feature allows you to create a new graph instance. The graph can then be populated with nodes and edges.

const { Graph } = require('@parcel/graph');
const graph = new Graph();
console.log(graph);

Adding Nodes

This feature allows you to add nodes to the graph. Nodes are the entities or points in the graph.

const { Graph } = require('@parcel/graph');
const graph = new Graph();
graph.addNode('A');
graph.addNode('B');
console.log(graph.nodes);

Adding Edges

This feature allows you to add edges between nodes in the graph. Edges represent the relationships or connections between nodes.

const { Graph } = require('@parcel/graph');
const graph = new Graph();
graph.addNode('A');
graph.addNode('B');
graph.addEdge('A', 'B');
console.log(graph.edges);

Traversing the Graph

This feature allows you to traverse the graph starting from a specific node. Traversal can be used to explore the graph and find paths or dependencies.

const { Graph } = require('@parcel/graph');
const graph = new Graph();
graph.addNode('A');
graph.addNode('B');
graph.addEdge('A', 'B');
const traversal = graph.traverse('A');
console.log(traversal);

Other packages similar to @parcel/graph

FAQs

Package last updated on 03 Jun 2024

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