Weighted modulus digit calculation
import { weightedModulusDigit } from 'idnumbers';weightedModulusDigit([1, 2, 3, 4], [4, 3, 2, 1], 11); // 2: 11 - (20 % 11)weightedModulusDigit([1, 2, 3, 4], [4, 3, 2, 1], 11, true); // 9: only the remainder, 20 % 11 Copy
import { weightedModulusDigit } from 'idnumbers';weightedModulusDigit([1, 2, 3, 4], [4, 3, 2, 1], 11); // 2: 11 - (20 % 11)weightedModulusDigit([1, 2, 3, 4], [4, 3, 2, 1], 11, true); // 9: only the remainder, 20 % 11
Weighted modulus digit calculation