MCPcopy Create free account
hub / github.com/TanStack/db / maxPair

Method maxPair

packages/db/src/utils/btree.ts:481–487  ·  view source on GitHub ↗
(reusedArray: [K, V])

Source from the content-addressed store, hash-verified

479 }
480
481 maxPair(reusedArray: [K, V]): [K, V] | undefined {
482 if (this.keys.length === 0) return undefined
483 const lastIndex = this.keys.length - 1
484 reusedArray[0] = this.keys[lastIndex]!
485 reusedArray[1] = this.values[lastIndex]!
486 return reusedArray
487 }
488
489 clone(): BNode<K, V> {
490 const v = this.values

Callers 3

nextLowerPairMethod · 0.45
maxPairMethod · 0.45
getPairOrNextLowerMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected