@quranjs/api 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/api.cjs.development.js +2 -2
- package/dist/api.cjs.development.js.map +1 -1
- package/dist/api.cjs.production.min.js.map +1 -1
- package/dist/api.esm.js +2 -2
- package/dist/api.esm.js.map +1 -1
- package/dist/sdk/utils.d.ts +1 -1
- package/package.json +1 -1
- package/src/sdk/utils.ts +2 -2
package/dist/sdk/utils.d.ts
CHANGED
package/package.json
CHANGED
package/src/sdk/utils.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// this maps chapterNumber to verseCount
|
|
2
|
-
export const
|
|
2
|
+
export const versesMapping = {
|
|
3
3
|
'1': 7,
|
|
4
4
|
'2': 286,
|
|
5
5
|
'3': 200,
|
|
@@ -211,7 +211,7 @@ const isValidVerseKey = (key: string) => {
|
|
|
211
211
|
if (!chapterId || !verseId || !isValidChapterId(chapterId)) return false;
|
|
212
212
|
|
|
213
213
|
const parsedVerse = Number(verseId);
|
|
214
|
-
const verseCount = (
|
|
214
|
+
const verseCount = (versesMapping as any)[chapterId];
|
|
215
215
|
if (!parsedVerse || parsedVerse <= 0 || parsedVerse > verseCount)
|
|
216
216
|
return false;
|
|
217
217
|
|