quran-meta
Version:
Library with meta data and functionality related to Holy Quran
19 lines (17 loc) • 759 B
JavaScript
import { checkValidAyahId } from "./validation.mjs";
import { findThumunAlHizbByAyahId } from "./findThumunAlHizbByAyahId.mjs";
import { getThumunAlHizb } from "./getThumunAlHizb.mjs";
//#region src/getThumunAlHizbByAyahId.ts
/**
* Finds the Juz, Hizb, Rub-el-Hizb id and thuumun-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 riwaya. Defaults to "Qalun" if not provided.
* @returns An object containing the Juz, Hizb, Hizb ID and thuumun-el-Hizb id for the given Ayah ID.
*/
function getThumunAlHizbByAyahId(ayahId, data) {
checkValidAyahId(ayahId, data.meta);
return getThumunAlHizb(findThumunAlHizbByAyahId(ayahId, data));
}
//#endregion
export { getThumunAlHizbByAyahId };