(html: string)
| 66 | /** sha1 of the served HTML — the single comparison that correctly dedupes updates, |
| 67 | * rollbacks (same source, moved pointer), no-op rewrites, and the error overlay. */ |
| 68 | export function hashHtml(html: string): string { |
| 69 | return createHash('sha1').update(html).digest('hex'); |
| 70 | } |
| 71 | |
| 72 | /** Pure push decision, extracted for unit testing. */ |
| 73 | export function shouldPush(prevHash: string | null, nextHash: string): boolean { |
no test coverage detected