Download mods/diff/hooks/message-of/message-of.ts from SaylorTwift/claude-code: direct link, hf CLI and curl.
- Browser
- Download file 274 Bytes
-
https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/hooks/message-of/message-of.ts
- Command line
-
hf download hf://SaylorTwift/claude-code/mods/diff/hooks/message-of/message-of.ts
-
curl -L -o message-of.ts https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/hooks/message-of/message-of.ts
274 Bytes
| /** | |
| * A thrown or rejected value as the words it carries: an Error's message, | |
| * anything else as a string. | |
| * | |
| * @param error what was caught | |
| * @returns the message | |
| */ | |
| export const messageOf = (error: unknown) => | |
| error instanceof Error ? error.message : String(error) | |