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

Method allowInsert

packages/core/src/language/childset.ts:73–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71 }
72
73 allowInsert(): boolean {
74 if (this.type === ChildSetType.Single) {
75 return this.children.length === 0
76 } else if (this.type === ChildSetType.Immutable) {
77 return false
78 }
79 return this.maxChildren === -1 || this.children.length < this.maxChildren
80 }
81
82 insertNode(node: SplootNode, index: number) {
83 if (node.parent && node.enableMutations) {

Calls

no outgoing calls

Tested by

no test coverage detected