MCPcopy
hub / github.com/prettier/prettier / replaceChild

Method replaceChild

src/language-html/parse/ast.js:123–126  ·  view source on GitHub ↗

* @param {Node} [target] * @param {Object} [node]

(target, node)

Source from the content-addressed store, hash-verified

121 * @param {Object} [node]
122 */
123 replaceChild(target, node) {
124 const children = this.$children;
125 children[children.indexOf(target)] = this.createChild(node);
126 }
127
128 clone() {
129 return new Node(this);

Callers 1

postprocessFunction · 0.80

Calls 1

createChildMethod · 0.95

Tested by

no test coverage detected