function ukUaCheck(tin) {
  // Calculate check digit
  const digits = tin.split('').map(a => parseInt(a, 10));
  const multipliers = [-1, 5, 7, 9, 4, 6, 10, 5, 7];
  let checksum = 0;
  for (let i = 0; i < multipliers.length; i++) {
    checksum += digits[i] * multipliers[i];
  }
  return checksum % 11 === 10 ? digits[9] === 0 : digits[9] === checksum % 11;
}
uk-UA validation function
Verify TIN validity by calculating check (last) digit (variant of MOD 11)