Function checkValidAyahId

  • Validates and asserts that the given value is a valid Ayah ID. An Ayah ID must be an integer between 1 and the total number of Ayahs.

    Parameters

    • ayahId: unknown

      The value to check as an Ayah ID

    Returns asserts ayahId is number

    TypeError If the value is not an integer

    RangeError If the value is not within valid Ayah ID range