quran-meta
Version:
Library with meta data and functionality related to Holy Quran
21 lines (19 loc) • 1.01 kB
text/typescript
import { RiwayaData } from "./lists/types.mjs";
import { AyahId, AyahRange, RangeMode } from "./types.mjs";
//#region src/findRangeAroundAyah.d.ts
/**
* Finds the range of ayahs surrounding a given ayah based on specified mode
* @param ayahId - The unique identifier of the ayah
* @param mode - The scope for finding the range:
* - "juz": Returns range of ayahs in the same juz
* - "surah": Returns range of ayahs in the same surah
* - "ayah": Returns the single ayah as both start and end of range
* - "page": Returns range of ayahs on the same page
* - "ruku": Returns range of ayahs on the same ruku
* - "all": Returns range covering all ayahs (1 to total number of ayahs)
* @param data - The Lists object for the riwaya.
* @returns An array of two numbers representing the start and end ayah IDs of the range [startAyahId, endAyahId]
*/
declare function findRangeAroundAyah(ayahId: AyahId, mode: RangeMode, data: RiwayaData): AyahRange;
//#endregion
export { findRangeAroundAyah };