MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / collectFiles

Function collectFiles

scripts/inject-create-require.mjs:6–19  ·  view source on GitHub ↗
(dir, acc = [])

Source from the content-addressed store, hash-verified

4const root = './recovered-claude-code/src'
5
6function collectFiles(dir, acc = []) {
7 for (const entry of readdirSync(dir)) {
8 const fullPath = join(dir, entry)
9 const stat = statSync(fullPath)
10 if (stat.isDirectory()) {
11 collectFiles(fullPath, acc)
12 continue
13 }
14 if (/\.(ts|tsx)$/.test(entry)) {
15 acc.push(fullPath)
16 }
17 }
18 return acc
19}
20
21function findInsertionIndex(lines) {
22 let i = 0

Callers 1

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected