Download mods/diff/hooks/is-record/is-record.ts from SaylorTwift/claude-code: direct link, hf CLI and curl.
- Browser
- Download file 331 Bytes
-
https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/hooks/is-record/is-record.ts
- Command line
-
hf download hf://SaylorTwift/claude-code/mods/diff/hooks/is-record/is-record.ts
-
curl -L -o is-record.ts https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/hooks/is-record/is-record.ts
331 Bytes
| /** | |
| * Whether a value is a plain object that can be read field by field. | |
| * | |
| * @param value anything a tool result may be | |
| * @returns whether it is a non-null, non-array object | |
| */ | |
| export const isRecord = (value: unknown): value is Record<string, unknown> => | |
| typeof value === 'object' && value !== null && !Array.isArray(value) | |