MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / parseHTML

Function parseHTML

src/utils/helpers.js:385–393  ·  view source on GitHub ↗
(html)

Source from the content-addressed store, hash-verified

383 });
384 },
385 parseHTML(html) {
386 const parser = new DOMParser();
387 const doc = parser.parseFromString(html, "text/html");
388 const children = doc.body.children;
389 if (children.length === 1) {
390 return children[0];
391 }
392 return Array.from(children);
393 },
394 async createFileStructure(uri, pathString, isFile = true) {
395 const parts = pathString.split("/").filter(Boolean);
396 let currentUri = uri;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected