MCPcopy
hub / github.com/prettier/prettier / createChild

Method createChild

src/language-html/parse/ast.js:93–100  ·  view source on GitHub ↗
(nodeOrProperties)

Source from the content-addressed store, hash-verified

91 }
92
93 createChild(nodeOrProperties) {
94 const node =
95 nodeOrProperties instanceof Node
96 ? nodeOrProperties.clone()
97 : new Node(nodeOrProperties);
98 node.setProperty("parent", this);
99 return node;
100 }
101
102 /**
103 * @param {Node} [target]

Callers 3

setPropertyMethod · 0.95
insertChildBeforeMethod · 0.95
replaceChildMethod · 0.95

Calls 2

setPropertyMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected