MCPcopy Create free account
hub / github.com/Alphanimble/htmlstream / shouldSkipStreamRewind

Function shouldSkipStreamRewind

src/hold-stream.ts:12–23  ·  view source on GitHub ↗
(
  previousClean: string,
  nextClean: string,
)

Source from the content-addressed store, hash-verified

10 * string (e.g. stripping a trailing incomplete tag). Keeps layout stable.
11 */
12export function shouldSkipStreamRewind(
13 previousClean: string,
14 nextClean: string,
15): boolean {
16 if (!previousClean || !nextClean) {
17 return false;
18 }
19 return (
20 nextClean.length < previousClean.length &&
21 previousClean.startsWith(nextClean)
22 );
23}
24
25/**
26 * Grow-only min-height while streaming so the container never collapses

Callers 2

streamhtml.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected