MCPcopy Create free account
hub / github.com/AlexErrant/Pentive / serialize

Function serialize

app/src/sqlite/template.ts:373–380  ·  view source on GitHub ↗
(doc: Document)

Source from the content-addressed store, hash-verified

371>(template: T) {
372 const serializer = new XMLSerializer()
373 const serialize = (doc: Document) => {
374 const s = serializer.serializeToString(doc)
375 return s.startsWith(
376 `<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`,
377 )
378 ? doc.body.innerHTML
379 : s
380 }
381 if (template.templateType.tag === 'standard') {
382 const rawDoms = template.templateType.templates.flatMap((t) => [
383 t.front,

Callers 3

remotifyTemplateFunction · 0.70
serializeMethod · 0.50
clearMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected