Download mods/diff/tests/fixtures/code-blocks-of/is-within-code-cap.ts from SaylorTwift/claude-code: direct link, hf CLI and curl.
- Browser
- Download file 355 Bytes
-
https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/tests/fixtures/code-blocks-of/is-within-code-cap.ts
- Command line
-
hf download hf://SaylorTwift/claude-code/mods/diff/tests/fixtures/code-blocks-of/is-within-code-cap.ts
-
curl -L -o is-within-code-cap.ts https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/tests/fixtures/code-blocks-of/is-within-code-cap.ts
355 Bytes
| import Views from '../../../hooks/views' | |
| /** | |
| * Whether a source is one a `Code` element may carry: at most | |
| * MAX_CODE_CHARS, counted in UTF-16 units as the engine counts. | |
| * | |
| * @param source the block's source | |
| * @returns true when the source fits | |
| */ | |
| export const isWithinCodeCap = (source: string): boolean => | |
| source.length <= Views.MAX_CODE_CHARS | |