Skip to content

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
462 B
Raw Blame
/**
 * One step into settings read as plain data: the value's own member of that
 * name, or undefined when the value is no object or holds none.
 *
 * @param value what was read so far
 * @param key the member's name
 * @returns the member, or undefined
 */
export function memberOf(value: unknown, key: string): unknown {
  const isObject = typeof value === 'object' && value !== null

  return isObject ? new Map(Object.entries(value)).get(key) : undefined
}