quran-meta
Advanced tools
Comparing version 3.0.1-8 to 3.0.1-9
type QuranMeta = { | ||
numAyahs: number; | ||
numSuras: number; | ||
numSurahs: number; | ||
numPages: number; | ||
@@ -5,0 +5,0 @@ numJuzs: number; |
/*! | ||
* Quran Meta library 3.0.1-8 | ||
* Quran Meta library 3.0.1-9 | ||
* | ||
@@ -15,3 +15,3 @@ * Released under the MIT license | ||
numAyahs: 6236, | ||
numSuras: 114, | ||
numSurahs: 114, | ||
numPages: 604, | ||
@@ -159,5 +159,5 @@ numJuzs: 30, | ||
} | ||
if (surah < 1 || surah > meta.numSuras) { | ||
if (surah < 1 || surah > meta.numSurahs) { | ||
if (checkOnly) return false; | ||
throw new RangeError("Surah must be between 1 and " + meta.numSuras); | ||
throw new RangeError("Surah must be between 1 and " + meta.numSurahs); | ||
} | ||
@@ -1874,4 +1874,4 @@ return true; | ||
function nextAyah(surah, ayah) { | ||
if (surah < 1 || surah > meta.numSuras) | ||
throw new RangeError("Surah must be between 1 and " + meta.numSuras); | ||
if (surah < 1 || surah > meta.numSurahs) | ||
throw new RangeError("Surah must be between 1 and " + meta.numSurahs); | ||
const ayahId = findAyahIdBySurah(surah, ayah); | ||
@@ -1878,0 +1878,0 @@ return findSurahByAyahId(ayahId == meta.numAyahs ? 1 : ayahId + 1); |
/*! | ||
* Quran Meta library 3.0.1-8 | ||
* Quran Meta library 3.0.1-9 | ||
* | ||
@@ -9,3 +9,3 @@ * Released under the MIT license | ||
numAyahs: 6236, | ||
numSuras: 114, | ||
numSurahs: 114, | ||
numPages: 604, | ||
@@ -145,5 +145,5 @@ numJuzs: 30, | ||
} | ||
if (surah < 1 || surah > meta.numSuras) { | ||
if (surah < 1 || surah > meta.numSurahs) { | ||
if (checkOnly) return false; | ||
throw new RangeError("Surah must be between 1 and " + meta.numSuras); | ||
throw new RangeError("Surah must be between 1 and " + meta.numSurahs); | ||
} | ||
@@ -1810,4 +1810,4 @@ return true; | ||
];function nextAyah(surah, ayah) { | ||
if (surah < 1 || surah > meta.numSuras) | ||
throw new RangeError("Surah must be between 1 and " + meta.numSuras); | ||
if (surah < 1 || surah > meta.numSurahs) | ||
throw new RangeError("Surah must be between 1 and " + meta.numSurahs); | ||
const ayahId = findAyahIdBySurah(surah, ayah); | ||
@@ -1814,0 +1814,0 @@ return findSurahByAyahId(ayahId == meta.numAyahs ? 1 : ayahId + 1); |
export type QuranMeta = { | ||
numAyahs: number; | ||
numSuras: number; | ||
numSurahs: number; | ||
numPages: number; | ||
@@ -5,0 +5,0 @@ numJuzs: number; |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "3.0.1-8", | ||
"version": "3.0.1-9", | ||
"license": "MIT", | ||
@@ -14,0 +14,0 @@ "jsdelivr": "./dist/index.mjs", |
@@ -88,3 +88,3 @@ Quran Meta | ||
console.log(" Assalam Aleykum! ") // => 'Assalam Aleykum!' | ||
console.log(`There are ${quranMeta.meta.numSuras} suras in the Holy Quran`) // => 'There are 114 suras in the Holy Quran' | ||
console.log(`There are ${quranMeta.meta.numSurahs} suras in the Holy Quran`) // => 'There are 114 suras in the Holy Quran' | ||
@@ -96,3 +96,3 @@ ``` | ||
console.log("Assalam Aleykum!") | ||
console.log(`There are ${meta.numSuras} suras in the Holy Quran`) // => 'There are 114 suras in the Holy Quran' | ||
console.log(`There are ${meta.numSurahs} suras in the Holy Quran`) // => 'There are 114 suras in the Holy Quran' | ||
``` | ||
@@ -105,5 +105,5 @@ | ||
console.log(`There are ${meta.numSuras} suras in the Holy Quran`) | ||
console.log(`There are ${meta.numSurahs} suras in the Holy Quran`) | ||
for (let surah: Surah = 1; surah <= meta.numSuras; surah++) { | ||
for (let surah: Surah = 1; surah <= meta.numSurahs; surah++) { | ||
const ayaCount = getAyahCountinSurah(surah) | ||
@@ -110,0 +110,0 @@ console.log(surah, ': ',ayaCount) |
export type QuranMeta = { | ||
numAyahs: number | ||
numSuras: number | ||
numSurahs: number | ||
numPages: number | ||
@@ -15,3 +15,3 @@ numJuzs: number | ||
numAyahs: 6236, | ||
numSuras: 114, | ||
numSurahs: 114, | ||
numPages: 604, | ||
@@ -18,0 +18,0 @@ numJuzs: 30, |
@@ -13,4 +13,4 @@ import { meta } from "./const" | ||
export function nextAyah(surah: Surah, ayah: AyahNo): SurahAyah { | ||
if (surah < 1 || surah > meta.numSuras) | ||
throw new RangeError("Surah must be between 1 and " + meta.numSuras) | ||
if (surah < 1 || surah > meta.numSurahs) | ||
throw new RangeError("Surah must be between 1 and " + meta.numSurahs) | ||
@@ -17,0 +17,0 @@ const ayahId: AyahId = findAyahIdBySurah(surah, ayah) |
@@ -17,5 +17,5 @@ import { meta } from "./const" | ||
if (surah < 1 || surah > meta.numSuras) { | ||
if (surah < 1 || surah > meta.numSurahs) { | ||
if (checkOnly) return false | ||
throw new RangeError("Surah must be between 1 and " + meta.numSuras) | ||
throw new RangeError("Surah must be between 1 and " + meta.numSurahs) | ||
} | ||
@@ -22,0 +22,0 @@ return true |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
508352
111