diff --git a/lib/models/node.js b/lib/models/node.js index 0ad8e8836..155aa875c 100644 --- a/lib/models/node.js +++ b/lib/models/node.js @@ -932,46 +932,6 @@ const Node = { return !!this.getClosest(key, parent => parent.isVoid) }, - /** - * Insert child `nodes` after child by `key`. - * - * @param {String or Node} key - * @param {List} nodes - * @return {Node} node - */ - - insertChildrenAfter(key, nodes) { - const child = this.assertChild(key) - const index = this.nodes.indexOf(child) - - nodes = this.nodes - .slice(0, index + 1) - .concat(nodes) - .concat(this.nodes.slice(index + 1)) - - return this.merge({ nodes }) - }, - - /** - * Insert child `nodes` before child by `key`. - * - * @param {String or Node} key - * @param {List} nodes - * @return {Node} node - */ - - insertChildrenBefore(key, nodes) { - const child = this.assertChild(key) - const index = this.nodes.indexOf(child) - - nodes = this.nodes - .slice(0, index) - .concat(nodes) - .concat(this.nodes.slice(index)) - - return this.merge({ nodes }) - }, - /** * Insert a `node` at `index`. * @@ -1129,34 +1089,6 @@ const Node = { return node }, - /** - * Remove children after a child by `key`. - * - * @param {String or Node} key - * @return {Node} node - */ - - removeChildrenAfter(key) { - const child = this.assertChild(key) - const index = this.nodes.indexOf(child) - const nodes = this.nodes.slice(0, index + 1) - return this.merge({ nodes }) - }, - - /** - * Remove children after a child by `key`, including the child. - * - * @param {String or Node} key - * @return {Node} node - */ - - removeChildrenAfterIncluding(key) { - const child = this.assertChild(key) - const index = this.nodes.indexOf(child) - const nodes = this.nodes.slice(0, index) - return this.merge({ nodes }) - }, - /** * Remove a `node` from the children node map. *