MCPcopy Create free account
hub / github.com/Easy-Editor/EasyEditor / removeNode

Method removeNode

packages/core/src/document/document.ts:233–247  ·  view source on GitHub ↗
(idOrNode: string | Node)

Source from the content-addressed store, hash-verified

231 }
232
233 removeNode(idOrNode: string | Node) {
234 let node: Node | null
235
236 if (typeof idOrNode === 'string') {
237 node = this.getNode(idOrNode)
238 } else {
239 node = idOrNode
240 }
241
242 if (!node) {
243 return
244 }
245
246 this.internalRemoveNode(node)
247 }
248
249 @action
250 private internalRemoveNode(node: Node, useMutator = false) {

Callers 3

batchRemoveNodeMethod · 0.95
initFunction · 0.80
valueFunction · 0.80

Calls 2

getNodeMethod · 0.95
internalRemoveNodeMethod · 0.95

Tested by

no test coverage detected