MCPcopy Create free account
hub / github.com/dailydotdev/apps / sortAlphabeticallyByProperty

Function sortAlphabeticallyByProperty

packages/shared/src/lib/func.ts:139–150  ·  view source on GitHub ↗
(property: keyof T)

Source from the content-addressed store, hash-verified

137
138export const sortAlphabeticallyByProperty =
139 <T>(property: keyof T) =>
140 (a: T, b: T): number => {
141 if (a[property] < b[property]) {
142 return -1;
143 }
144
145 if (a[property] > b[property]) {
146 return 1;
147 }
148
149 return 0;
150 };
151
152export enum UserAgent {
153 Chrome = 'Chrome',

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected