Skip to content
Svartz v2.6.0

@svartz/auth/badge

5 exported symbols.

Functions

f formatReputation`score` as the badge shows it: whole points, grouped (`1,234`), and shortened past ten thousand (`12.3K`).
f reputationBadgeHtmlThe badge as HTML, to follow an account's name after a space: `<span class="sv-reputation-badge" …>1,234</span>`. A screen reader reads the score whole, and so does its tooltip.
f reputationBadgePartsThe badge's parts: what only assistive technology reads, and what everyone sees. A score shown whole reads as "Reputation 1,234"; a shortened one is read in full, "Reputation 12,500", while `12.5K` is shown.
f reputationLabelWhat the badge says to assistive technology and in its tooltip: the score in full, named.

Variables

v REPUTATION_BADGE_CLASSThe badge's class: `.sv-reputation-badge`.