repo.or.cz
/
ProtonMail-WebClient.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git]
/
packages
/
utils
/
compare.ts
blob
4043051167fb41879aa3b62ba3bb8d788ad7d666
1
/**
2
* Basic comparator function that transforms order via >,< into the numeric order that sorting functions typically require
3
*/
4
const compare = (a: any, b: any) => {
5
if (a > b) {
6
return 1;
7
}
8
if (a < b) {
9
return -1;
10
}
11
return 0;
12
};
13
14
export default compare;