
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
generic-digraph
Advanced tools
This is a generic directional graph implementation. It makes use of ES6 iterators for graph traversal.
const Digraph = require('generic-digraph')
// to start with the graph is just a single vertex
var vertex = new Digraph()
// now lets add an edge named 'friend' to the vertex with the value 'alice'
vertex.set('friend', 'alice')
vertex.set(['friend', 'brother'], 'bob')
// now the graph looks like:
// [vertex]---friend--->[alice]---brother-->[bob]
//path names and vertex values can be anything
vertex.set([new Buffer('friend'), 5, true, {}, new Date()], Array())
// edges are stored in a Map
vertex.edges // Map{}
// to get an array of all of the vertices
var vertices = [...vertex]
// you can also iterate a path
vertices = [...vertex.iteratePath(['friend', 'brother'])]
// getting a vertex works like setting
var friendsBotherVertex = vertex.set(['friend', 'brother'])
friendsBotherVertex.getValue() // "bob"
// delete an edge
vertex.del('friend')
// now the vertex is empty
vertex.isEmpty()
More Examples
./examples/
when decsending the graph, accumulate!
when asecending the graph, aggergate!
do you wish to not decsend futher?
then using continue, do consider
accumlate, continue, aggergate, repeat
accumlate, continue, aggergate, repeat
This was module was built so that it could be easly extended.
FAQs
a generic directed graph implementation
We found that generic-digraph 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.