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

Function normalizeScore

deployments/desktop/static/desktop.js:1569–1574  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

1567 }
1568
1569 function normalizeScore(value) {
1570 const raw = Number(value);
1571 if (!Number.isFinite(raw)) return 80;
1572 const percentage = raw > 0 && raw <= 1 ? raw * 100 : raw;
1573 return Math.max(0, Math.min(100, Math.round(percentage)));
1574 }
1575
1576 function paperDisplayTags(paper) {
1577 const rawCategories = Array.isArray(paper?.categories)

Callers 2

renderPushFunction · 0.85
wikiEvidenceMetaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected