quran-meta
Version:
Library with meta data and functionality related to Holy Quran
19 lines (17 loc) • 678 B
JavaScript
import { checkValidAyahId } from "./validation.mjs";
import { findRubAlHizbByAyahId } from "./findRubAlHizbByAyahId.mjs";
import { getRubAlHizb } from "./getRubAlHizb.mjs";
//#region src/getRubAlHizbByAyahId.ts
/**
* Finds the Juz, Hizb, and Rub-el-Hizb id for the given Ayah ID.
*
* @param ayahId - The Ayah ID to find the Juz, Hizb, and Hizb ID for.
* @param data - The Lists object for the riwaya.
* @returns An object containing the Juz, Hizb, and Hizb ID for the given Ayah ID.
*/
function getRubAlHizbByAyahId(ayahId, data) {
checkValidAyahId(ayahId, data.meta);
return getRubAlHizb(findRubAlHizbByAyahId(ayahId, data));
}
//#endregion
export { getRubAlHizbByAyahId };