UNPKG

quran-meta

Version:

Library with meta data and functionality related to Holy Quran

23 lines (16 loc) 593 B
const require_validation = require('./validation.cjs'); const require_utils = require('./utils.cjs'); const require_pageList = require('./lists/pageList.cjs'); //#region src/isAyahPageFirst.ts /** * Determines if the given ayah is the first ayah of a juz. * * @param ayahId - The ayah id . * @returns The page number if the ayah is the first ayah of the page, otherwise -1. */ function isAyahPageFirst(ayahId) { require_validation.checkValidAyahId(ayahId); return require_utils.binarySearch(require_pageList.PageList, ayahId); } //#endregion exports.isAyahPageFirst = isAyahPageFirst;