MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / applyWikiGraphTransform

Function applyWikiGraphTransform

deployments/desktop/static/desktop.js:3798–3805  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3796 const id = graphId(node);
3797 return (degree[id] || 0) + Number(node.score || 0) + (graphBody(node) ? 0.2 : 0);
3798 }
3799
3800 function topPaperNodes(sourceNodes, sourceEdges, limit = 4) {
3801 const degree = graphDegreeMap(sourceNodes, sourceEdges);
3802 return sourceNodes
3803 .filter((node) => graphType(node) === "paper")
3804 .sort((a, b) => paperScore(b, degree) - paperScore(a, degree))
3805 .slice(0, limit);
3806 }
3807
3808 function relatedPapersForEntry(entry, sourceById, sourceEdges, fallbackPapers = []) {

Callers 3

renderWikiGraphFunction · 0.85
resetWikiGraphTransformFunction · 0.85
bindEventsFunction · 0.85

Calls 2

clampWikiGraphPanFunction · 0.85
$Function · 0.70

Tested by

no test coverage detected