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

Function countRecords

packages/stats/server/src/router.ts:63–69  ·  view source on GitHub ↗
(items: unknown[])

Source from the content-addressed store, hash-verified

61}
62
63function countRecords(items: unknown[]) {
64 let records = 0
65 for (const item of items) {
66 if (Boolean(item) && typeof item === "object" && !Array.isArray(item)) records++
67 }
68 return records
69}
70
71function json(status: number, body: Record<string, unknown>) {
72 return HttpServerResponse.json(body, { status }).pipe(Effect.orDie)

Callers 1

ingestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected