MCPcopy Index your code
hub / github.com/TanStack/db / splitOffRightSide

Method splitOffRightSide

packages/db/src/utils/btree.ts:620–627  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

618 }
619
620 splitOffRightSide(): BNode<K, V> {
621 // Reminder: parent node must update its copy of key for this node
622 const half = this.keys.length >> 1,
623 keys = this.keys.splice(half)
624 const values =
625 this.values === undefVals ? undefVals : this.values.splice(half)
626 return new BNode<K, V>(keys, values)
627 }
628
629 // ///////////////////////////////////////////////////////////////////////////
630 // Leaf Node: scanning & deletions //////////////////////////////////////////

Callers 1

setMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected