toposource
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "toposource", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Directed graphs analyzer for parallel traversals", | ||
@@ -34,3 +34,3 @@ "main": "./target/cjs/index.js", | ||
"target/cjs", | ||
"target/mjs", | ||
"target/esm", | ||
"target/dts", | ||
@@ -37,0 +37,0 @@ "README.md", |
@@ -44,2 +44,19 @@ "use strict"; | ||
}; | ||
var getHops = (edges) => { | ||
const next = /* @__PURE__ */ new Map(); | ||
const prev = /* @__PURE__ */ new Map(); | ||
const pushHop = (deps, a, b) => { | ||
if (deps.has(a)) { | ||
deps.get(a).push(b); | ||
} else { | ||
deps.set(a, [b]); | ||
} | ||
}; | ||
for (const [from, to] of edges) { | ||
pushHop(next, from, to); | ||
pushHop(prev, to, from); | ||
} | ||
return { next, prev }; | ||
}; | ||
var getSources = (edges) => [...new Set(edges.map(([from]) => from))].filter((node) => edges.every(([, to]) => to !== node)); | ||
var getQueue = (sources, next, prev) => { | ||
@@ -63,19 +80,2 @@ const nodes = /* @__PURE__ */ new Set(); | ||
}; | ||
var getHops = (edges) => { | ||
const next = /* @__PURE__ */ new Map(); | ||
const prev = /* @__PURE__ */ new Map(); | ||
const pushHop = (deps, a, b) => { | ||
if (deps.has(a)) { | ||
deps.get(a).push(b); | ||
} else { | ||
deps.set(a, [b]); | ||
} | ||
}; | ||
for (const [from, to] of edges) { | ||
pushHop(next, from, to); | ||
pushHop(prev, to, from); | ||
} | ||
return { next, prev }; | ||
}; | ||
var getSources = (edges) => [...new Set(edges.map(([from]) => from))].filter((node) => edges.every(([, to]) => to !== node)); | ||
var getGraphs = (edges, sources, next) => { | ||
@@ -82,0 +82,0 @@ const graphs = []; |
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
11511
8
242