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

fast-graph

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-graph - npm Package Compare versions

Comparing version 0.0.4-beta to 0.0.5-beta

2

package.json
{
"name": "fast-graph",
"version": "0.0.4-beta",
"version": "0.0.5-beta",
"description": "A fast implementation of graph data structure",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -102,2 +102,16 @@ # fast-graph

});
// Use DFS to visit all nodes in the graph
myGraph.dfs(node => {
console.log(`Visiting Node ${node.id} with value ${node.value}`);
return SearchAlgorithmNodeBehavior.continue;
});
// Use DFS to find a node
myGraph.dfs(node => {
console.log(`Visiting Node ${node.id} with value ${node.value}`);
return node.id === "id_your_looking_for"
? SearchAlgorithmNodeBehavior.break
: SearchAlgorithmNodeBehavior.continue;
});
```

@@ -104,0 +118,0 @@

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