MCPcopy Index your code
hub / github.com/TeaCoder52/patcode / countGroups

Function countGroups

src/analyze.ts:22–28  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

20}
21
22function countGroups(code: string): number {
23 let groups = 1
24 for (let i = 1; i < code.length; i++) {
25 if (code[i] !== code[i - 1]) groups++
26 }
27 return groups
28}
29
30function estimateEntropy(code: string): number {
31 const freq: Record<string, number> = {}

Callers 1

analyzeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected