Download mods/diff/tests/fixtures/keeping.ts from SaylorTwift/claude-code: direct link, hf CLI and curl.
- Browser
- Download file 334 Bytes
-
https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/tests/fixtures/keeping.ts
- Command line
-
hf download hf://SaylorTwift/claude-code/mods/diff/tests/fixtures/keeping.ts
-
curl -L -o keeping.ts https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/tests/fixtures/keeping.ts
334 Bytes
| /** | |
| * A hook that keeps each input it is asked with, and answers, beside what | |
| * it kept. | |
| * | |
| * @returns the hook, and each input in the order it came | |
| */ | |
| export function keeping<E>() { | |
| const kept: E[] = [] | |
| function hook(_engine: unknown, e: E) { | |
| kept.push(e) | |
| return { value: undefined } | |
| } | |
| return { hook, kept } | |
| } | |