MCPcopy Index your code
hub / github.com/Alphanimble/htmlstream / splitTableStream

Function splitTableStream

src/patch-streaming-html.ts:533–546  ·  view source on GitHub ↗
(tableSection: string)

Source from the content-addressed store, hash-verified

531}
532
533function splitTableStream(tableSection: string): TableStreamParts {
534 const theadPart = sliceTagSection(tableSection, "thead");
535 const tbodyPart = sliceTagSection(tableSection, "tbody");
536
537 const theadComplete = theadPart ? extractCompleteRows(theadPart) : [];
538 const tbodyComplete = tbodyPart ? extractCompleteRows(tbodyPart) : [];
539
540 return {
541 theadComplete,
542 tbodyComplete,
543 theadPartial: extractPartialRow(theadPart, theadComplete),
544 tbodyPartial: extractPartialRow(tbodyPart, tbodyComplete),
545 };
546}
547
548function extractPartialRow(
549 section: string,

Callers 3

assembleTableSectionHtmlFunction · 0.85
patchTableRowsFunction · 0.85

Calls 3

sliceTagSectionFunction · 0.85
extractCompleteRowsFunction · 0.85
extractPartialRowFunction · 0.85

Tested by

no test coverage detected