buildCountsByIso2() — supabase Function Reference
Architecture documentation for the buildCountsByIso2() function in geo.ts from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/studio/components/interfaces/Reports/utils/geo.ts lines 37–47
export const buildCountsByIso2 = (rows: CountryCountRow[]): Record<string, number> => {
const counts: Record<string, number> = {}
for (const row of rows) {
if (!row.country) continue
const code = row.country.toUpperCase()
const numeric = typeof row.count === 'number' ? row.count : Number(row.count)
if (!Number.isFinite(numeric)) continue
counts[code] = (counts[code] || 0) + numeric
}
return counts
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free