lanka-validations - v2.1.0
    Preparing search index...

    Function maskBankAccount

    • Masks a valid bank account number after removing supported separators.

      Parameters

      • input: unknown

        Bank account number.

      • visibleDigits: number = 4

        Digits to leave visible at the end. Defaults to 4.

      Returns string | null

      The masked account number, or null if invalid.

      maskBankAccount('1234-5678-90'); // '******7890'