quran-meta
Version:
Library with meta data and functionality related to Holy Quran
56 lines (55 loc) • 1.37 kB
TypeScript
export type Surah = number;
export type AyahNo = number;
export type AyahId = number;
export type Page = number;
export type Juz = number;
export type JuzHizb = {
juz: Juz;
juzPart: number;
hizbId: number;
rubAlHizbId: number;
};
export type SurahAyah = [Surah, AyahNo];
export type AyahRange = [AyahId, AyahId];
export type SurahAyahSegment = [Surah, AyahNo | [AyahNo, AyahNo]];
export type PageMeta = {
pageNum: Page;
first: SurahAyah;
last: SurahAyah;
};
export type JuzMeta = {
leftjuz: Juz;
ayahsBetweenJuzSurah: number;
rightJuz: Juz;
leftAyahId: AyahId;
rightAyahId: AyahId;
};
export type SajdaType = "recommended" | "obligatory";
export type Sajda = [AyahId, SajdaType];
export type SurahMeta = [
startAyahId: AyahId,
ayahCount: number,
surahOrder: number,
rukuCount: number,
name: string,
isMeccan: boolean,
page: Page
];
export type SurahName = [name: string, translitName: string];
export type AyahMeta = {
juz: number;
juzPart: number;
hizbId: number;
rubAlHizbId: number;
surah: number;
ayah: number;
isStartOfQuarter: boolean;
isEndOfQuarter: boolean;
isSajdahAyah: boolean;
isStartOfPage: boolean;
isEndOfPage: boolean;
isStartOfJuz: boolean;
isEndOfJuz: boolean;
isStartOfSurah: boolean;
isEndOfSurah: boolean;
};