Telegram Web K with changes to work inside I2P
https://web.telegram.i2p/
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.
11 lines
329 B
11 lines
329 B
2 years ago
|
import compareLong from "./long/compareLong";
|
||
|
|
||
|
export default function compareValue(val1: string | number, val2: typeof val1) {
|
||
|
if((val1 as number).toExponential) {
|
||
|
const diff = (val1 as number) - (val2 as number);
|
||
|
return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
|
||
|
}
|
||
|
|
||
|
return compareLong(val1 as string, val2 as string);
|
||
|
}
|