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

Function metaSortKeySort

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

Source from the content-addressed store, hash-verified

93};
94
95export const metaSortKeySort: SortFunction<Pick<SortableModel, '_id' | 'metaSortKey'>> = (a, b) => {
96 if (a.metaSortKey === b.metaSortKey) {
97 return a._id > b._id ? -1 : 1;
98 }
99
100 return a.metaSortKey < b.metaSortKey ? -1 : 1;
101};
102
103export const ascendingNumberSort: SortFunction<number> = (a, b) => {
104 return a < b ? -1 : 1;

Callers 4

sorting.test.tsFile · 0.90
httpMethodSortFunction · 0.85
ascendingTypeSortFunction · 0.85
descendingTypeSortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected