Socket
Socket
Sign inDemoInstall

graphology-traversal

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphology-traversal - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

7

bfs.js

@@ -39,2 +39,4 @@ /**

var queue = new BFSQueue(graph);
var forEachNeighbor =

@@ -48,3 +50,3 @@ graph['forEach' + capitalize(options.mode || 'outbound') + 'Neighbor'].bind(

if (startingNode === null) {
forEachNode = graph.forEachNode.bind(graph);
forEachNode = queue.forEachNodeYetUnseen.bind(queue);
} else {

@@ -57,3 +59,2 @@ forEachNode = function (fn) {

var queue = new BFSQueue(graph.order);
var record, stop;

@@ -69,4 +70,2 @@

forEachNode(function (node, attr) {
if (queue.has(node)) return;
queue.pushWith(node, new TraversalRecord(node, attr, 0));

@@ -73,0 +72,0 @@

@@ -39,2 +39,4 @@ /**

var stack = new DFSStack(graph);
var forEachNeighbor =

@@ -48,3 +50,3 @@ graph['forEach' + capitalize(options.mode || 'outbound') + 'Neighbor'].bind(

if (startingNode === null) {
forEachNode = graph.forEachNode.bind(graph);
forEachNode = stack.forEachNodeYetUnseen.bind(stack);
} else {

@@ -57,3 +59,2 @@ forEachNode = function (fn) {

var stack = new DFSStack(graph.order);
var record, stop;

@@ -69,4 +70,2 @@

forEachNode(function (node, attr) {
if (stack.has(node)) return;
stack.pushWith(node, new TraversalRecord(node, attr, 0));

@@ -73,0 +72,0 @@

{
"name": "graphology-traversal",
"version": "0.3.0",
"version": "0.3.1",
"description": "Traversal functions for graphology.",

@@ -44,5 +44,5 @@ "main": "index.js",

"dependencies": {
"graphology-indices": "^0.16.4",
"graphology-indices": "^0.17.0",
"graphology-utils": "^2.0.0"
}
}

@@ -58,3 +58,3 @@ # Graphology Traversal

// Stopping at depth 3
bfsFromNode(graph, function (node, attr, depth) {
bfsFromNode(graph, 'node1', function (node, attr, depth) {
return depth >= 3;

@@ -112,3 +112,3 @@ });

// Stopping at depth 3
dfsFromNode(graph, function (node, attr, depth) {
dfsFromNode(graph, 'node1', function (node, attr, depth) {
return depth >= 3;

@@ -115,0 +115,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