UNPKG

quran-meta

Version:

Library with meta data and functionality related to Holy Quran

17 lines (15 loc) 437 B
import { checkValidSurah } from "./validation.mjs"; //#region src/getSurahInfo.ts /** * Gets the metadata for the specified Surah. * * @param surah - The Surah to get the metadata for. * @param data - The Lists object containing SurahList. * @returns The metadata for the specified Surah. */ function getSurahInfo(surah, data) { checkValidSurah(surah, data.meta); return data.SurahList[surah]; } //#endregion export { getSurahInfo };