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.
TypeScript
import { isRecord } from '../is-record'
/**
* A value with every object key respelled for the event-logging ingest:
* `platformRaw` as `platform_raw`, all the way down; arrays and leaves kept.
*
* @param value the row, or a part of it, keyed as the plugin builds it
* @returns the same value keyed as the ingest reads it
*/
export function wireOf(value: unknown): unknown {
const isList = Array.isArray(value)
const isObject = isRecord(value)
return isList
? value.map(wireOf)
: isObject
? Object.fromEntries(
Object.entries(value).map(([key, member]) => [
key.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`),
wireOf(member),
]),
)
: value
}