nationid - v2.2.1
    Preparing search index...

    Function verhoeffCheckDigit

    • Computes the Verhoeff check digit for a digit string that does NOT yet include the check digit.

      Parameters

      • base: string

        Digit-only string (the "base" without the check digit).

      Returns number

      A single digit in [0, 9] such that verhoeffValid(base + checkDigit) === true.

      on non-digit input.

      import { verhoeffCheckDigit } from "nationid/algorithms";

      verhoeffCheckDigit("23412341234"); // 6