MCPcopy
hub / github.com/upstash/context7 / formatInstallRange

Function formatInstallRange

packages/cli/src/utils/prompts.ts:40–46  ·  view source on GitHub ↗
(count: number | undefined)

Source from the content-addressed store, hash-verified

38 * Returns the install count as a human-readable range string.
39 */
40export function formatInstallRange(count: number | undefined): string {
41 if (count === undefined || count === 0) return "Unknown";
42 if (count < 100) return "<100";
43 if (count < 500) return "<500";
44 if (count < 1000) return "<1,000";
45 return "1,000+";
46}
47
48/**
49 * Formats trust score as High / Medium / Low label.

Callers 3

installCommandFunction · 0.85
searchCommandFunction · 0.85
suggestCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected