MCPcopy Index your code
hub / github.com/simstudioai/sim / formatStarCount

Function formatStarCount

apps/sim/lib/github/stars.ts:16–20  ·  view source on GitHub ↗
(num: number)

Source from the content-addressed store, hash-verified

14 * Formats a raw star count for display (e.g. 28900 → "28.9k").
15 */
16export function formatStarCount(num: number): string {
17 if (num < 1000) return String(num)
18 const formatted = (Math.round(num / 100) / 10).toFixed(1)
19 return formatted.endsWith('.0') ? `${formatted.slice(0, -2)}k` : `${formatted}k`
20}
21
22/**
23 * Fetches the Sim repository's GitHub star count, formatted for display.

Callers 1

getGitHubStarsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected