Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Feb 19, 2024 via pnpm

dependency-graph 0.11.0

Simple dependency graph.
Package summary
Share
0
issues
1
license
1
MIT
Package created
18 May 2013
Version published
5 Mar 2021
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
dependency-graph@0.11.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of dependency-graph 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does dependency-graph do?

Dependency-Graph is an effective JavaScript (JS) tool offering a simple way to manage and organise dependencies, which are relations between different nodes or tasks. It's particularly useful when dealing with a collection of tasks that rely upon the completion of other tasks. By mapping these dependencies, you can efficiently determine the best order to perform tasks without encountering unfulfilled prerequisites.

How do you use dependency-graph?

To use Dependency-Graph, follow these steps. Firstly, you should install the npm package using the following code:

npm install dependency-graph

Once it's installed, require it in your JS file, like this:

var DepGraph = require('dependency-graph').DepGraph;

After requiring the package, you can create a new dependency graph:

var graph = new DepGraph();

Then, you can add nodes and dependencies:

graph.addNode('a');
graph.addNode('b');
graph.addDependency('a', 'b');  // 'a' depends on 'b'

You may retrieve the dependencies of a node using the dependenciesOf method:

graph.dependenciesOf('a');  // Returns: ['b']

Additionally, the overallOrder function is available to determine the overarching processing order within the dependency graph:

graph.overallOrder();  // Returns: ['b', 'a']

For more complex operations, like silencing errors in case of dependency cycles, a circular graph can be set:

var circularGraph = new DepGraph({ circular: true });
circularGraph.addDependency('a', 'b');
circularGraph.addDependency('b', 'a');  // Circular: 'a' depends on 'b', 'b' depends on 'a'

These are basic operations to manipulate dependency graphs, but other actions, like removing nodes and dependencies, cloning the graph, and setting or getting node data, are also available.

Where are the dependency-graph docs?

You can find the documentation for Dependency-Graph within the README file of the git repository (git://github.com/jriecken/dependency-graph.git). This README provides a top-level overview of the package functionality list, explaining how to accomplish tasks such as adding nodes, removing nodes, setting and getting a node's data, determining the graph's size, and more.