UNPKG

quran-meta

Version:

Library with meta data and functionality related to Holy Quran

15 lines (14 loc) 458 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.findRukuByAyahId = findRukuByAyahId; var _rukuList = require("./lists/rukuList.cjs"); var _utils = require("./utils.cjs"); var _validation = require("./validation.cjs"); function findRukuByAyahId(ayahId) { (0, _validation.checkValidAyahId)(ayahId); const jj = (0, _utils.binarySearch)(_rukuList.RukuList, ayahId); const juz = jj < 0 ? -jj - 2 : jj; return juz; }