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

Function memorabilityScore

src/analyze.ts:65–77  ·  view source on GitHub ↗
(
	code: string,
	groups: number
)

Source from the content-addressed store, hash-verified

63}
64
65function memorabilityScore(
66 code: string,
67 groups: number
68): 'low' | 'medium' | 'high' {
69 if (isAllSame(code)) return 'low'
70 if (isTooSimpleSequence(code)) return 'low'
71
72 if (groups <= 2) return 'high'
73
74 if (groups === 3) return 'medium'
75
76 return 'low'
77}
78
79export function analyze(code: string): CodeAnalysis {
80 const length = code.length as CodeLength

Callers 1

analyzeFunction · 0.85

Calls 2

isAllSameFunction · 0.90
isTooSimpleSequenceFunction · 0.90

Tested by

no test coverage detected