quran-meta
    Preparing search index...

    Function nextAyah

    • Get the next ayah for the given surah and ayah number.

      Parameters

      • surah: Surah

        The surah number.

      • ayah: AyahNo

        The ayah number within the surah.

      • data: RiwayaData

        The Lists object containing SurahList.

      • Optionaloptions: { wrap?: true }

        Behaviour at the end of the Quran, see AyahStepOptions.

      Returns SurahAyah

      The surah and ayah number of the next ayah, or undefined when wrap is false and there is no next ayah.

      nextAyah(1, 7, HafsLists) // [2, 1]
      nextAyah(114, 6, HafsLists) // [1, 1]
      nextAyah(114, 6, HafsLists, { wrap: false }) // undefined
    • Get the next ayah for the given surah and ayah number.

      Parameters

      Returns SurahAyah | undefined

      The surah and ayah number of the next ayah, or undefined when wrap is false and there is no next ayah.

      nextAyah(1, 7, HafsLists) // [2, 1]
      nextAyah(114, 6, HafsLists) // [1, 1]
      nextAyah(114, 6, HafsLists, { wrap: false }) // undefined