You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
231 B
12 lines
231 B
2 years ago
|
export default function compareId (id1: string, id2: string) {
|
||
7 years ago
|
if (id1 === id2) {
|
||
|
return 0;
|
||
|
}
|
||
5 years ago
|
|
||
7 years ago
|
if (id1.length === id2.length) {
|
||
|
return id1 > id2 ? 1 : -1;
|
||
|
} else {
|
||
|
return id1.length > id2.length ? 1 : -1;
|
||
|
}
|
||
2 years ago
|
}
|