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

Method prevSibling

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

* get previous sibling node

()

Source from the content-addressed store, hash-verified

699 * get previous sibling node
700 */
701 get prevSibling(): Node | null | undefined {
702 if (!this.parent) {
703 return null
704 }
705 const { index } = this
706 if (typeof index !== 'number') {
707 return null
708 }
709 if (index < 1) {
710 return null
711 }
712 return this.parent.children?.get(index - 1)
713 }
714
715 mergeChildren(
716 remover: (node: Node, idx: number) => any,

Callers

nothing calls this directly

Calls 1

getMethod · 0.65

Tested by

no test coverage detected