MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / asText

Function asText

telemetry-worker/src/index.ts:189–189  ·  view source on GitHub ↗
(v: unknown)

Source from the content-addressed store, hash-verified

187 * already guarantee these types; these just turn "absent" into a NULL bind.
188 */
189const asText = (v: unknown): string | null => (typeof v === 'string' ? v : null);
190const asInt = (v: unknown): number | null => (typeof v === 'number' ? v : null);
191const asFlag = (v: unknown): number | null => (typeof v === 'boolean' ? (v ? 1 : 0) : null);
192

Callers 1

writeToD1Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected