MCPcopy Create free account
hub / github.com/SplootCode/splootcode / isChildBetween

Method isChildBetween

packages/core/src/language/childset.ts:209–218  ·  view source on GitHub ↗
(node: SplootNode, start: SplootNode, end: SplootNode)

Source from the content-addressed store, hash-verified

207 }
208
209 isChildBetween(node: SplootNode, start: SplootNode, end: SplootNode): boolean {
210 const idx = this.children.indexOf(node)
211 if (idx === -1) {
212 return false
213 }
214
215 const startIdx = this.children.indexOf(start)
216 const endIdx = this.children.indexOf(end)
217 return idx > startIdx && idx < endIdx
218 }
219
220 getRightmostChild(): SplootNode {
221 return this.children[this.children.length - 1]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected