MCPcopy Create free account
hub / github.com/anomalyco/opencode / nullableInteger

Function nullableInteger

packages/stats/core/src/domain/inference.ts:242–245  ·  view source on GitHub ↗
(data: AthenaData, key: string)

Source from the content-addressed store, hash-verified

240}
241
242function nullableInteger(data: AthenaData, key: string) {
243 if (data[key] === undefined || data[key] === "") return null
244 return Math.round(number(data, key))
245}
246
247function number(data: AthenaData, key: string) {
248 const value = Number(data[key])

Callers 1

toStatBaseAggregateFunction · 0.70

Calls 1

numberFunction · 0.70

Tested by

no test coverage detected