UNPKG

quran-meta

Version:

Library with meta data and functionality related to Holy Quran

27 lines (26 loc) 954 B
import { AyahId, SurahMeta } from "./types"; export declare const partNames: readonly ["surah", "juz", "page", "manzil", "rubAlHizb", "ruku"]; export type PartType = (typeof partNames)[number]; /** * An object that maps part types to their corresponding data lists. */ export declare const parts: { readonly surah: SurahMeta[]; readonly juz: number[]; readonly rubAlHizb: number[]; readonly page: number[]; readonly manzil: number[]; readonly ruku: number[]; }; type PartBlock = { startAyahId: AyahId; ayahCount: number; }; /** * Retrieves a list of part blocks for the specified part type. * * @param type - The type of part to retrieve the list for, such as "surah", "juz", "page", "manzil", "ruku" or "rubAlHizb". * @returns An array of part blocks, where each part block contains the starting ayah ID and the ayah count for that part. */ export declare function getList(type: PartType): PartBlock[]; export {};