quran-meta
    Preparing search index...

    Function convertAyahSpan

    • Converts an ayah to all ayahs of another riwaya that share any of its text.

      Where to splits the ayah into several, the result is a range; where both riwayas agree it is a single ayah, like convertAyah.

      Parameters

      • surah: Surah

        Surah number

      • ayah: AyahNo

        Ayah number in the from riwaya

      • from: "Bazzi" | "Douri" | "Hafs" | "Qalun" | "Qunbul" | "Shuba" | "Sousi" | "Warsh"

        Riwaya the reference is written in

      • to: "Bazzi" | "Douri" | "Hafs" | "Qalun" | "Qunbul" | "Shuba" | "Sousi" | "Warsh"

        Riwaya to convert to

      Returns SurahAyahSegment

      [surah, ayah] or [surah, [firstAyah, lastAyah]] in the to riwaya

      RangeError If the surah or ayah does not exist in the from riwaya

      convertAyahSpan(2, 1, "Warsh", "Hafs") // [2, [1, 2]]
      convertAyahSpan(1, 7, "Hafs", "Warsh") // [1, [6, 7]]
      convertAyahSpan(2, 3, "Hafs", "Warsh") // [2, 2]