quran-meta
    Preparing search index...

    Function prevAyah

    • Get the previous 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 start of the Quran, see AyahStepOptions.

      Returns SurahAyah

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

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

      Parameters

      Returns SurahAyah | undefined

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

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