Function checkValidAyahId

  • Checks if the given Ayah (verse) ID is valid.

    Parameters

    • ayahId: number

      The Ayah (verse) ID to check.

    • checkOnly: boolean = false

      If true, the function will only check the validity and not throw an error.

    Returns boolean

    True if the Ayah ID is valid, otherwise throws a RangeError.