MCPcopy Create free account
hub / github.com/ImGoodBai/MapGoGoGo / pct

Function pct

frontend/src/App.tsx:68–74  ·  view source on GitHub ↗
(value: number)

Source from the content-addressed store, hash-verified

66const earthRadiusM = 6_371_000;
67
68function pct(value: number) {
69 const percent = value * 100;
70 if (percent > 0 && percent < 1) {
71 return `${percent.toFixed(1)}%`;
72 }
73 return `${Math.round(percent)}%`;
74}
75
76function challengeShareUrl(challengeId: string) {
77 return `${window.location.origin}${window.location.pathname}?challenge=${challengeId}`;

Callers 5

challengeShareTextFunction · 0.85
HomeViewFunction · 0.85
ChallengeViewFunction · 0.85
DesktopSimulatorPanelFunction · 0.85
AdminViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected