export function compareVersion(v1: string, v2: string): boolean {
  let v1Arr = v1.split('.');
  let v2Arr = v2.split('.');
  const len = Math.max(v1.length, v2.length);

  while (v1.length < len) {
    v1Arr.push('0');
  }
  while (v2.length < len) {
    v2Arr.push('0');
  }

  for (let i = 0; i < len; i++) {
    const num1 = parseInt(v1[i]);
    const num2 = parseInt(v2[i]);

    if (num1 > num2) {
      return true;
    } else if (num1 < num2) {
      return false;
    }
  }

  return true;
}
