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

Function streamSnapshots

tests/helpers/simulate-stream.ts:15–23  ·  view source on GitHub ↗
(
  full: string,
  chunkSize = 8,
  options?: RehtmlOptions,
)

Source from the content-addressed store, hash-verified

13
14/** Run rehtml at each chunk boundary */
15export function streamSnapshots(
16 full: string,
17 chunkSize = 8,
18 options?: RehtmlOptions,
19): RehtmlResult[] {
20 return [...streamChunks(full, chunkSize)].map((chunk) =>
21 rehtml(chunk, options),
22 );
23}
24
25/** Assert stable block count never decreases during streaming */
26export function assertMonotonicStable(

Callers 3

Calls 2

rehtmlFunction · 0.90
streamChunksFunction · 0.85

Tested by

no test coverage detected