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 / diff / hooks / is-record / is-record.ts
8 lines · 331 BRaw
1/**
2 * Whether a value is a plain object that can be read field by field.
3 *
4 * @param value anything a tool result may be
5 * @returns whether it is a non-null, non-array object
6 */
7export const isRecord = (value: unknown): value is Record<string, unknown> =>
8 typeof value === 'object' && value !== null && !Array.isArray(value)