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

Method nextSibling

packages/core/src/document/node/node.ts:684–696  ·  view source on GitHub ↗

* get next sibling node

()

Source from the content-addressed store, hash-verified

682 * get next sibling node
683 */
684 get nextSibling(): Node | null | undefined {
685 if (!this.parent) {
686 return null
687 }
688 const { index } = this
689 if (typeof index !== 'number') {
690 return null
691 }
692 if (index < 0) {
693 return null
694 }
695 return this.parent.children?.get(index + 1)
696 }
697
698 /**
699 * get previous sibling node

Callers

nothing calls this directly

Calls 1

getMethod · 0.65

Tested by

no test coverage detected