MCPcopy Create free account
hub / github.com/Kong/insomnia / descendingModifiedSort

Function descendingModifiedSort

packages/insomnia/src/common/sorting.ts:36–42  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

34};
35
36export const descendingModifiedSort: SortFunction<{ lastModifiedTimestamp: number }> = (a, b) => {
37 if (a.lastModifiedTimestamp === b.lastModifiedTimestamp) {
38 return 0;
39 }
40
41 return a.lastModifiedTimestamp > b.lastModifiedTimestamp ? -1 : 1;
42};
43
44export const httpMethodSort: SortFunction<Pick<SortableModel, 'type' | 'metaSortKey' | '_id'>> = (a, b) => {
45 // Sort Requests and GrpcRequests to top, in that order

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected