spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / telemetry / tests / fixtures / wire / event-name-of.ts
12 lines · 374 BRaw
1/**
2 * The name a row was sent under, as rowsOf reads the row back; undefined
3 * for a value that is no row.
4 *
5 * @param row one of rowsOf's rows
6 * @returns the name the row was sent under
7 */
8export function eventNameOf(row: unknown): unknown {
9 const isRow = typeof row === 'object' && row !== null && 'event_name' in row
10
11 return isRow ? row.event_name : undefined
12}