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 / hooks / entries / fields-of / fields-of.ts
14 lines · 462 BRaw
1import { EVENT_PREFIX } from '../event-prefix'
2import type { Fields } from '../fields'
3
4/**
5 * One checked entry as its fields, the event under its prefix.
6 *
7 * @param event the event's name as the caller spelled it
8 * @param props the properties as checked
9 * @returns the entry's fields, the event name prefixed and the props attached
10 */
11export const fieldsOf = (event: string, props: Fields['props']): Fields => ({
12 name: EVENT_PREFIX + event,
13 props,
14})