MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / parseMutable

Function parseMutable

packages/sdk/src/engine/model.ts:19–27  ·  view source on GitHub ↗
(html: string)

Source from the content-addressed store, hash-verified

17}
18
19export function parseMutable(html: string): ParsedDocument {
20 const stamped = ensureHfIds(html);
21 const hasShell = /<!doctype|<html[\s>]/i.test(stamped);
22 const wrapped = !hasShell;
23 const { document } = wrapped
24 ? parseHTML(`<!DOCTYPE html><html><head></head><body>${stamped}</body></html>`)
25 : parseHTML(stamped);
26 return { document: document as unknown as Document, wrapped, stamped };
27}
28
29// ─── Element lookup ───────────────────────────────────────────────────────────
30

Callers 15

openCompositionFunction · 0.85
freshFunction · 0.85
freshWithVarsFunction · 0.85
mutate.test.tsFile · 0.85
elWithFunction · 0.85
freshFunction · 0.85
freshFunction · 0.85
freshNoTimelineFunction · 0.85
freshSplitFunction · 0.85
freshStaggerFunction · 0.85

Calls 1

ensureHfIdsFunction · 0.85

Tested by 11

freshFunction · 0.68
freshWithVarsFunction · 0.68
elWithFunction · 0.68
freshFunction · 0.68
freshFunction · 0.68
freshNoTimelineFunction · 0.68
freshSplitFunction · 0.68
freshStaggerFunction · 0.68
freshNoScriptFunction · 0.68
freshArcFunction · 0.68
timingDocFunction · 0.68