MCPcopy
hub / github.com/webpack/webpack / child

Function child

test/buildHtmlAst.unittest.js:18–21  ·  view source on GitHub ↗
(children, tagName)

Source from the content-addressed store, hash-verified

16 * @returns {import("../lib/html/syntax").HtmlElement} the element
17 */
18const child = (children, tagName) =>
19 /** @type {import("../lib/html/syntax").HtmlElement} */ (
20 children.find((c) => c.type === NodeType.Element && c.tagName === tagName)
21 );
22
23// The tree builder always produces a full document (html > head, body); these
24// helpers reach the interesting subtrees.

Callers 4

htmlFunction · 0.85
bodyFunction · 0.85
headFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected