UNPKG

quran-meta

Version:

Library with meta data and functionality related to Holy Quran

15 lines (14 loc) 460 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.findPagebyAyahId = findPagebyAyahId; var _pageList = require("./lists/pageList.cjs"); var _utils = require("./utils.cjs"); var _validation = require("./validation.cjs"); function findPagebyAyahId(ayahId) { (0, _validation.checkValidAyahId)(ayahId); const jj = (0, _utils.binarySearch)(_pageList.PageList, ayahId); const page = jj < 0 ? -jj - 2 : jj; return page; }