Function getCandidateIndex

  • Given a candidate (string) or candidate index (number), calculates candidate index

    Returns

    candidate index

    Throws

    CustomError Thrown if candidate isn't a string candidate or a number candidate index or is out of valid range

    Parameters

    • candidate: unknown

      number candidate index or candidate string

    Returns number

Generated using TypeDoc