MCPcopy Create free account
hub / github.com/simstudioai/sim / fetchGitHubStars

Function fetchGitHubStars

apps/sim/hooks/queries/github-stars.ts:19–23  ·  view source on GitHub ↗
(signal?: AbortSignal)

Source from the content-addressed store, hash-verified

17export const GITHUB_STARS_FALLBACK = '27.8k'
18
19async function fetchGitHubStars(signal?: AbortSignal): Promise<string> {
20 const data = await requestJson(getStarsContract, { signal })
21 const value = data.stars
22 return typeof value === 'string' && value.length > 0 ? value : GITHUB_STARS_FALLBACK
23}
24
25/**
26 * Loads the formatted GitHub star count for the Sim repository.

Callers 1

useGitHubStarsFunction · 0.85

Calls 1

requestJsonFunction · 0.90

Tested by

no test coverage detected