MCPcopy Create free account
hub / github.com/Noumena-Network/code / hashRow

Function hashRow

src/ink/renderTrace.ts:70–78  ·  view source on GitHub ↗
(screen: Screen, y: number)

Source from the content-addressed store, hash-verified

68}
69
70function hashRow(screen: Screen, y: number): string {
71 let s = ''
72 for (let x = 0; x < screen.width; x++) {
73 const cell = cellAt(screen, x, y)
74 s += cell?.char ?? ' '
75 s += String(cell?.styleId ?? 'N')
76 }
77 return createHash('sha256').update(s).digest('hex').slice(0, 16)
78}
79
80function rowsToStrings(screen: Screen): string[] {
81 const rows: string[] = []

Callers 1

captureMethod · 0.85

Calls 1

cellAtFunction · 0.85

Tested by

no test coverage detected