quran-meta
    Preparing search index...

    Function getPartRange

    • Returns the first and last ayah id of a part of the Quran (surah, juz, page, manzil, ruku, rub' al-hizb or thumun al-hizb).

      Parameters

      • type: "juz" | "surah" | "page" | "ruku" | "rubAlHizb" | "thumunAlHizb" | "manzil"

        The kind of part

      • num: number

        The part number, starting at 1

      • data: RiwayaData

        The Lists object for the riwaya

      Returns AyahRange

      [firstAyahId, lastAyahId]

      RangeError If num is outside the parts of that kind

      Error If the riwaya has no data for that kind of part (e.g. thumun al-hizb in Hafs)

      getPartRange("juz", 30, HafsLists) // [5673, 6236]
      getPartRange("surah", 1, HafsLists) // [1, 7]