Gets the metadata for this riwaya
Gets the riwaya name
Iterates over every [surah, ayah] in a part of the Quran
Finds juz and calculates shift between juz start and surah start
Finds juz metadata for a given surah and ayah
Finds the RubAlHizb for a given surah and ayah
Finds the ThumunAlHizb ID for a given surah and ayah
Finds the ThumunAlHizb ID for a given ayah ID
Formats an ayah id as a "surah:ayah" reference
Returns the parts of a kind as { startAyahId, ayahCount } blocks, or null when the riwaya has no such data
Returns [firstAyahId, lastAyahId] of a surah, juz, page, manzil, ruku, rub' al-hizb or thumun al-hizb
Gets RubAlHizb data (juz, hizb, etc.) for a given ayah ID
Gets RubAlHizb data (juz, hizb, etc.) for a given ayah ID
Gets complete RubAlHizb metadata for a given ayah ID
Gets juz, hizb, quarter and eighth numbers for a ThumunAlHizb ID
Gets juz, hizb, quarter and eighth numbers for a given ayah ID
Gets metadata for a specific ThumunAlHizb
Gets the ThumunAlHizb containing an ayah ID, with its first and last ayah
Checks if an ayah is the first ayah of a juz
Checks if an ayah is the first ayah of a page
Gets the next ayah after the given surah and ayah.
Wraps from the last ayah to 1:1 unless { wrap: false } is passed, in which case it returns undefined.
Gets the previous ayah before the given surah and ayah.
Wraps from 1:1 to the last ayah unless { wrap: false } is passed, in which case it returns undefined.
StaticcreateCreate a QuranRiwaya instance with the specified riwaya, metadata, and lists
StaticisStaticstring2
QuranRiwaya class provides a clean API for Quran metadata operations with a specific riwaya (recitation tradition) context.
It covers the whole functional API (surahs, ayahs, juz, pages, manzils, rukus, rub' al-hizb and thumun al-hizb, validation and parsing) bound to one riwaya's data.
Example
Basic Usage with Hafs
Example
Working with Qalun
Example
Creating a custom instance
QuranRiwaya.create()takes a Lists object (SurahList, JuzList, PageList, etc. plus meta) shaped like the built-in data. The easiest way to build one iscustomizeRiwaya, which starts from a built-in riwaya and replaces some lists: