quran-meta
Version:
Library with meta data and functionality related to Holy Quran
22 lines (20 loc) • 781 B
text/typescript
import { RiwayaData } from "./lists/types.mjs";
import { AyahId, Manzil } from "./types.mjs";
//#region src/findManzilByAyahId.d.ts
/**
* Finds the Manzil number for a given Ayah ID using binary search.
* A Manzil is one of seven approximately equal divisions of the Quran.
*
* @param ayahId - The ID of the Ayah to find the Manzil for
* @param data - The Lists object for the riwaya.
* @returns The Manzil number (1-7) containing the specified Ayah
* @throws {@link Error} If the provided Ayah ID is invalid
*
* @example
* ```typescript
* const manzil = findManzilByAyahId(2345, HafsLists); // Returns the Manzil containing Ayah 2345
* ```
*/
declare function findManzilByAyahId(ayahId: AyahId, data: RiwayaData): Manzil;
//#endregion
export { findManzilByAyahId };