@pathmaker-digital/pmd-utilities - v2.2.6
    Preparing search index...

    Function generateRandomPassword

    • Generates a random password with a given length, ensuring it meets the strength criteria. Uses isStrongPassword() to ensure password is strong. Retries if not.

      Parameters

      • length: number

        The length of the password to generate.

      Returns string

      A randomly generated password that is strong.

      const password = generateRandomPassword(12);
      console.log(password); // Example: "aA1!xYz@9Pq#"