The best way to control Claude Code, Codex and more from any computer or phone
| 1 | export function field(source: unknown, key: string): unknown { |
| 2 | return typeof source === "object" && source !== null ? Reflect.get(source, key) : undefined; |
| 3 | } |
| 4 | |
| 5 | export function text(value: unknown): string | undefined { |
| 6 | if (typeof value !== "string") return undefined; |
| 7 | const trimmed = value.trim(); |
| 8 | return trimmed.length === 0 ? undefined : trimmed; |
| 9 | } |