@tanstack/db
Version:
A reactive client store for building super fast apps on sync
24 lines (23 loc) • 575 B
JavaScript
import { compareKeys } from "@tanstack/db-ivm";
function compareKeysReversed(a, b) {
return compareKeys(b, a);
}
function findInsertPositionInArray(sortedArray, value, compareFn) {
let left = 0;
let right = sortedArray.length;
while (left < right) {
const mid = Math.floor((left + right) / 2);
const comparison = compareFn(sortedArray[mid], value);
if (comparison < 0) {
left = mid + 1;
} else {
right = mid;
}
}
return left;
}
export {
compareKeysReversed,
findInsertPositionInArray
};
//# sourceMappingURL=array-utils.js.map