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

Function minValue

packages/db/src/query/predicate-utils.ts:1175–1180  ·  view source on GitHub ↗

* Get the minimum of two values, handling both numbers and Dates

(a: any, b: any)

Source from the content-addressed store, hash-verified

1173 * Get the minimum of two values, handling both numbers and Dates
1174 */
1175function minValue(a: any, b: any): any {
1176 if (a instanceof Date && b instanceof Date) {
1177 return a.getTime() < b.getTime() ? a : b
1178 }
1179 return Math.min(a, b)
1180}
1181
1182function areCompareOptionsEqual(
1183 a: { direction?: `asc` | `desc`; [key: string]: any },

Callers 1

unionSameFieldPredicatesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected