fast-graph
Advanced tools
Comparing version 0.0.4-beta to 0.0.5-beta
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
131
7277
3
0
2