All files / sdk/utils other.ts

81.81% Statements 9/11
0% Branches 0/2
100% Functions 1/1
100% Lines 7/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 96x 7x 7x 7x 21x 21x   7x  
export const isNewerVersion  = (v1: string, v2: string): boolean => {
    const parts1 = v1.split('.').map(Number);
    const parts2 = v2.split('.').map(Number);
    for (let i = 0; i < 3; i++) {
        Iif (parts1[i] > parts2[i]) return true;
        Iif (parts1[i] < parts2[i]) return false;
    }
    return false;
}