graphology
Advanced tools
Comparing version 0.20.0 to 0.21.0
{ | ||
"name": "graphology", | ||
"version": "0.20.0", | ||
"version": "0.21.0", | ||
"description": "A robust and multipurpose Graph object for JavaScript.", | ||
@@ -61,22 +61,22 @@ "main": "dist/graphology.cjs.js", | ||
"devDependencies": { | ||
"@babel/cli": "7.14.5", | ||
"@babel/core": "7.14.6", | ||
"@babel/plugin-transform-classes": "7.14.5", | ||
"@babel/cli": "7.14.8", | ||
"@babel/core": "7.15.0", | ||
"@babel/plugin-transform-classes": "7.14.9", | ||
"@babel/plugin-transform-destructuring": "7.14.7", | ||
"@babel/plugin-transform-spread": "7.14.6", | ||
"@babel/preset-env": "7.14.7", | ||
"@babel/register": "7.14.5", | ||
"@rollup/plugin-commonjs": "^19.0.0", | ||
"@rollup/plugin-node-resolve": "^13.0.0", | ||
"@babel/preset-env": "7.15.0", | ||
"@babel/register": "7.15.3", | ||
"@rollup/plugin-commonjs": "^20.0.0", | ||
"@rollup/plugin-node-resolve": "^13.0.4", | ||
"@yomguithereal/eslint-config": "^4.0.0", | ||
"eslint": "^7.29.0", | ||
"graphology-types": "0.19.2", | ||
"mocha": "^9.0.1", | ||
"eslint": "^7.32.0", | ||
"graphology-types": "0.19.3", | ||
"mocha": "^9.1.1", | ||
"pandemonium": "^2.0.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.52.2", | ||
"rollup": "^2.56.3", | ||
"rollup-plugin-babel": "^4.4.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-visualizer": "^5.5.0", | ||
"typescript": "^4.3.4" | ||
"rollup-plugin-visualizer": "^5.5.2", | ||
"typescript": "^4.4.2" | ||
}, | ||
@@ -83,0 +83,0 @@ "babel": { |
@@ -258,3 +258,3 @@ "use strict"; | ||
var edges = []; | ||
graph[forEachUntilName](function (key, attributes, source, target, sA, tA, u, g) { | ||
var broke = graph[forEachUntilName](function (key, attributes, source, target, sA, tA, u, g) { | ||
edges.push(key); | ||
@@ -281,7 +281,15 @@ | ||
_assert["default"].strictEqual(broke, true); | ||
_assert["default"].strictEqual(edges.length, 1); | ||
broke = graph[forEachUntilName](function () { | ||
return false; | ||
}); | ||
_assert["default"].strictEqual(broke, false); | ||
}, | ||
'it should be possible to use breakable callback iterators over a node\'s relevant edges.': function itShouldBePossibleToUseBreakableCallbackIteratorsOverANodeSRelevantEdges() { | ||
var edges = []; | ||
graph[forEachUntilName](data.node.key, function (key, attributes, source, target, sA, tA, u, g) { | ||
var broke = graph[forEachUntilName](data.node.key, function (key, attributes, source, target, sA, tA, u, g) { | ||
edges.push(key); | ||
@@ -308,7 +316,15 @@ | ||
_assert["default"].strictEqual(broke, true); | ||
_assert["default"].strictEqual(edges.length, 1); | ||
broke = graph[forEachUntilName](data.node.key, function () { | ||
return false; | ||
}); | ||
_assert["default"].strictEqual(broke, false); | ||
}, | ||
'it should be possible to use breakable callback iterators over all the relevant edges between source & target.': function itShouldBePossibleToUseBreakableCallbackIteratorsOverAllTheRelevantEdgesBetweenSourceTarget() { | ||
var edges = []; | ||
graph[forEachUntilName](data.path.source, data.path.target, function (key, attributes, source, target, sA, tA, u, g) { | ||
var broke = graph[forEachUntilName](data.path.source, data.path.target, function (key, attributes, source, target, sA, tA, u, g) { | ||
edges.push(key); | ||
@@ -335,3 +351,11 @@ | ||
_assert["default"].strictEqual(broke, graph[name](data.path.source, data.path.target).length ? true : false); | ||
_assert["default"].strictEqual(edges.length, graph[name](data.path.source, data.path.target).length ? 1 : 0); | ||
broke = graph[forEachUntilName](data.path.source, data.path.target, function () { | ||
return false; | ||
}); | ||
_assert["default"].strictEqual(broke, false); | ||
} | ||
@@ -338,0 +362,0 @@ }), _defineProperty(_ref2, '#.' + iteratorName, { |
@@ -105,3 +105,3 @@ "use strict"; | ||
var adjacency = []; | ||
graph.forEachUntil(function (s, t, sa, ta, e, ea, u, g) { | ||
var broke = graph.forEachUntil(function (s, t, sa, ta, e, ea, u, g) { | ||
adjacency.push([u, s, t]); | ||
@@ -122,3 +122,11 @@ | ||
_assert["default"].strictEqual(broke, true); | ||
_assert["default"].deepStrictEqual(adjacency, [[false, '1', '2'], [true, '1', '2'], [false, '2', '3']]); | ||
broke = graph.forEachUntil(function () { | ||
return false; | ||
}); | ||
_assert["default"].strictEqual(broke, false); | ||
}, | ||
@@ -125,0 +133,0 @@ 'it should be possible to create an iterator over the graph\'s adjacency.': function itShouldBePossibleToCreateAnIteratorOverTheGraphSAdjacency() { |
@@ -163,3 +163,3 @@ "use strict"; | ||
var neighbors = []; | ||
graph[forEachUntilName](data.node.key, function (target, attrs) { | ||
var broke = graph[forEachUntilName](data.node.key, function (target, attrs) { | ||
neighbors.push(target); | ||
@@ -174,3 +174,11 @@ | ||
_assert["default"].strictEqual(broke, true); | ||
_assert["default"].deepStrictEqual(neighbors, data.node.neighbors.slice(0, 1)); | ||
broke = graph[forEachUntilName](data.node.key, function () { | ||
return false; | ||
}); | ||
_assert["default"].strictEqual(broke, false); | ||
} | ||
@@ -177,0 +185,0 @@ }), _defineProperty(_ref3, '#.' + iteratorName, { |
@@ -80,3 +80,3 @@ "use strict"; | ||
var count = 0; | ||
graph.forEachNodeUntil(function (key, attributes) { | ||
var broke = graph.forEachNodeUntil(function (key, attributes) { | ||
_assert["default"].strictEqual(key, 'John'); | ||
@@ -92,3 +92,11 @@ | ||
_assert["default"].strictEqual(broke, true); | ||
_assert["default"].strictEqual(count, 1); | ||
broke = graph.forEachNodeUntil(function () { | ||
return false; | ||
}); | ||
_assert["default"].strictEqual(broke, false); | ||
} | ||
@@ -95,0 +103,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
18474
2082045
29