MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / bigIntToNumber

Function bigIntToNumber

apps/web/src/app/admin/api/slack-bot/stats/route.ts:99–104  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

97
98 // Helper function to safely convert BigInt to number
99 const bigIntToNumber = (value: unknown): number => {
100 if (value === null || value === undefined) return 0;
101 if (typeof value === 'bigint') return Number(value);
102 if (typeof value === 'string' && /^\d+$/.test(value)) return Number(value);
103 return Number(value) || 0;
104 };
105
106 // Overview stats
107 const overviewResult = await db

Callers 1

GETFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected