toposource
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "toposource", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Directed graphs analyzer for parallel traversals", | ||
@@ -5,0 +5,0 @@ "main": "./target/cjs/index.js", |
@@ -65,13 +65,12 @@ "use strict"; | ||
const prev = /* @__PURE__ */ new Map(); | ||
for (const [from, to] of edges) { | ||
if (next.has(from)) { | ||
next.get(from).push(to); | ||
const pushHop = (deps, a, b) => { | ||
if (deps.has(a)) { | ||
deps.get(a).push(b); | ||
} else { | ||
next.set(from, [to]); | ||
deps.set(a, [b]); | ||
} | ||
if (prev.has(to)) { | ||
prev.get(to).push(from); | ||
} else { | ||
prev.set(to, [from]); | ||
} | ||
}; | ||
for (const [from, to] of edges) { | ||
pushHop(next, from, to); | ||
pushHop(prev, to, from); | ||
} | ||
@@ -78,0 +77,0 @@ return { next, prev }; |
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
5304
9006
152