votes
    Preparing search index...

    Function normalizeBallot

    • Prevents cheating!

      Type Parameters

      • C extends string
      • B extends Ballot<C>

      Parameters

      • ballot: B

        ballot to normalize

      • candidates: string[]

        official candidates

      • appendUnranked: boolean = true

        if true, append an extra rank at the end of the ballot with all the candidates that are not ranked in the ballot

      Returns B