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

Function isSequentialDesc

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

Source from the content-addressed store, hash-verified

11}
12
13function isSequentialDesc(code: string): boolean {
14 for (let i = 1; i < code.length; i++) {
15 const prev = Number(code[i - 1])
16 const curr = Number(code[i])
17 if (curr !== (prev + 9) % 10) return false
18 }
19 return true
20}
21
22function countGroups(code: string): number {
23 let groups = 1

Callers 1

analyzeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected