
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
directed-graph
Advanced tools
node package for weighted directed graphs
###Installation
npm install directed-graph --save
##Quickstart
var Graph = require('directed-graph');
// Either initialize and fill an empty graph
var graphA = new Graph();
graphA.addVertex('A');
graphA.addVertex('B');
graphA.addVertex('C');
graphA.addEdge('A', 'B');
graphA.addEdge('A', 'C');
graphA.addEdge('B', 'A');
graphA.addEdge('B', 'C');
graphA.addEdge('C', 'A');
graphA.addEdge('C', 'B');
// Or predefine a new graph
var graphB = new Graph({
'A': ['B', 'C'],
'B': ['A', 'C'],
'C': ['A', 'B'],
});
// Both graphA and graphB function the same
graphA.setWeight('A', 'B', 10);
graphA.setWeight('B', 'A', 10);
graphA.addVertex('D');
graphA.addEdge('A', 'D');
console.log(graphA.pathExists('B', 'D'));
##Running Tests
Make sure to have mocha installed: npm install -g mocha
In project root directory, run: mocha test
FAQs
node package for weighted directed graphs
The npm package directed-graph receives a total of 19 weekly downloads. As such, directed-graph popularity was classified as not popular.
We found that directed-graph demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.