MCPcopy Index your code
hub / github.com/garrytan/gstack / fnBody

Function fnBody

test/setup-sections-linking.test.ts:19–24  ·  view source on GitHub ↗

Body of a shell function `name() { ... }` up to the closing line `}`.

(src: string, name: string)

Source from the content-addressed store, hash-verified

17
18/** Body of a shell function `name() { ... }` up to the closing line `}`. */
19function fnBody(src: string, name: string): string {
20 const start = src.indexOf(`${name}() {`);
21 if (start === -1) return '';
22 const end = src.indexOf('\n}', start);
23 return src.slice(start, end === -1 ? undefined : end);
24}
25
26describe('setup links sections/ for cherry-pick install targets', () => {
27 test('link_claude_skill_dirs links sections/ via _link_or_copy', () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected