MCPcopy Create free account
hub / github.com/TanStack/query / dateSort

Function dateSort

packages/query-devtools/src/utils.tsx:104–107  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

102const queryHashSort: SortFn = (a, b) => a.queryHash.localeCompare(b.queryHash)
103
104const dateSort: SortFn = (a, b) => {
105 const diff = b.state.dataUpdatedAt - a.state.dataUpdatedAt
106 return diff < 0 ? -1 : diff > 0 ? 1 : 0
107}
108
109const statusAndDateSort: SortFn = (a, b) => {
110 if (getStatusRank(a) === getStatusRank(b)) {

Callers 2

statusAndDateSortFunction · 0.70
utils.test.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected