@quranjs/api 1.1.4 → 1.4.0

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 CHANGED
@@ -1,6 +1,8 @@
1
1
  ![Quranjs Api Header](https://github.com/quranjs/api/raw/master/media/repo-header.png)
2
2
  A library for fetching quran data from the [quran.com API][qdc-api]. This library also works on both Node.js and the browser.
3
3
 
4
+ [Checkout Docs][docs]
5
+
4
6
  [![Build Status][build-badge]][build]
5
7
  [![MIT License][license-badge]][license]
6
8
  [![NPM Version][npm-badge]][npm]
@@ -21,9 +23,14 @@ using yarn:
21
23
  yarn add @quranjs/api
22
24
  ```
23
25
 
26
+ ## Getting Started
27
+
28
+ you can visit the [docs][docs] for more details.
29
+
24
30
  <!-- Links -->
25
31
 
26
32
  [qdc-api]: https://quran.api-docs.io/
33
+ [docs]: https://quranjs.vercel.app/
27
34
  [build-badge]: https://github.com/quranjs/api/workflows/CI/badge.svg
28
35
  [build]: https://github.com/quranjs/api/actions?query=workflow%3ACI
29
36
  [license-badge]: https://badgen.net/github/license/quranjs/api
@@ -2,16 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var types = require('@/types');
6
5
  var fetch = require('cross-fetch');
7
6
  var humps = require('humps');
8
- var stringify = require('@/utils/qs-stringify');
9
- var misc = require('@/utils/misc');
10
7
 
11
8
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
9
 
13
10
  var fetch__default = /*#__PURE__*/_interopDefaultLegacy(fetch);
14
- var stringify__default = /*#__PURE__*/_interopDefaultLegacy(stringify);
15
11
 
16
12
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
17
13
  try {
@@ -827,12 +823,205 @@ try {
827
823
 
828
824
  var _regeneratorRuntime = runtime.exports;
829
825
 
826
+ exports.CharType = void 0;
827
+
828
+ (function (CharType) {
829
+ CharType["Word"] = "word";
830
+ CharType["End"] = "end";
831
+ CharType["Pause"] = "pause";
832
+ CharType["Sajdah"] = "sajdah";
833
+ CharType["RubElHizb"] = "rub-el-hizb";
834
+ })(exports.CharType || (exports.CharType = {}));
835
+
836
+ exports.Language = void 0;
837
+
838
+ (function (Language) {
839
+ Language["ARABIC"] = "ar";
840
+ Language["ENGLISH"] = "en";
841
+ Language["URDU"] = "ur";
842
+ Language["BENGALI"] = "bn";
843
+ Language["TURKISH"] = "tr";
844
+ Language["SPANISH"] = "es";
845
+ Language["GERMAN"] = "de";
846
+ Language["BOSNIAN"] = "bs";
847
+ Language["RUSSIAN"] = "ru";
848
+ Language["ALBANIAN_AL"] = "al";
849
+ Language["FRENCH"] = "fr";
850
+ Language["DUTCH"] = "nl";
851
+ Language["TAMIL"] = "ta";
852
+ Language["TAJIK"] = "tg";
853
+ Language["INDONESIAN"] = "id";
854
+ Language["UZBEK"] = "uz";
855
+ Language["VIETNAMESE"] = "vi";
856
+ Language["CHINESE"] = "zh";
857
+ Language["ITALIAN"] = "it";
858
+ Language["JAPANESE"] = "ja";
859
+ Language["MALAYALAM"] = "ml";
860
+ Language["AMHARIC"] = "am";
861
+ Language["KAZAKH"] = "kk";
862
+ Language["PORTUGUESE"] = "pt";
863
+ Language["TAGALOG"] = "tl";
864
+ Language["THAI"] = "th";
865
+ Language["KOREAN"] = "ko";
866
+ Language["HINDI"] = "hi";
867
+ Language["KURDISH"] = "ku";
868
+ Language["HAUSA"] = "ha";
869
+ Language["AZERI"] = "az";
870
+ Language["SWAHILI"] = "sw";
871
+ Language["PERSIAN"] = "fa";
872
+ Language["SERBIAN"] = "sr";
873
+ Language["MARANAO"] = "mrn";
874
+ Language["AMAZIGH"] = "zgh";
875
+ Language["ASSAMESE"] = "as";
876
+ Language["BULGARIAN"] = "bg";
877
+ Language["CHECHEN"] = "ce";
878
+ Language["CZECH"] = "cs";
879
+ Language["DIVEHI"] = "dv";
880
+ Language["DHIVEHI"] = "dv";
881
+ Language["MALDIVIAN"] = "dv";
882
+ Language["FINNISH"] = "fi";
883
+ Language["GUJAARATI"] = "gu";
884
+ Language["HEBREW"] = "he";
885
+ Language["GEORGIAN"] = "ka";
886
+ Language["CENTRAL_KHMER"] = "km";
887
+ Language["GANDA"] = "lg";
888
+ Language["MARATHI"] = "mr";
889
+ Language["YORUBA"] = "yo";
890
+ Language["MALAY"] = "ms";
891
+ Language["NEPALI"] = "ne";
892
+ Language["SWEDISH"] = "sv";
893
+ Language["TELUGU"] = "te";
894
+ Language["TATAR"] = "tt";
895
+ Language["UIGHUR"] = "ug";
896
+ Language["UYGHUR"] = "ug";
897
+ Language["UKRAINIAN"] = "uk";
898
+ Language["NORWEGIAN"] = "no";
899
+ Language["OROMO"] = "om";
900
+ Language["POLISH"] = "pl";
901
+ Language["PASHTO"] = "ps";
902
+ Language["ROMANIAN"] = "ro";
903
+ Language["SINDHI"] = "sd";
904
+ Language["NORTHERN_SAMI"] = "se";
905
+ Language["SINHALA"] = "si";
906
+ Language["SINHALESE"] = "si";
907
+ Language["SOMALI"] = "so";
908
+ Language["ALBANIAN_SQ"] = "sq";
909
+ })(exports.Language || (exports.Language = {}));
910
+
911
+ exports.QuranFont = void 0;
912
+
913
+ (function (QuranFont) {
914
+ QuranFont["MadaniV1"] = "code_v1";
915
+ QuranFont["MadaniV2"] = "code_v2";
916
+ QuranFont["Uthmani"] = "text_uthmani";
917
+ })(exports.QuranFont || (exports.QuranFont = {}));
918
+
919
+ // Reference: https://github.com/billjs/query-string/blob/master/src/index.ts
920
+ var defaultStringifyFunction = function defaultStringifyFunction(_key, value) {
921
+ return value;
922
+ };
923
+
924
+ var defaultEq = '=';
925
+ var defaultSep = '&';
926
+ var defaultConfig = {
927
+ eq: defaultEq,
928
+ sep: defaultSep,
929
+ prefix: '',
930
+ fn: defaultStringifyFunction
931
+ };
932
+ /**
933
+ * Given a query object, return the query string
934
+ * See qs-stringify.test.ts for examples
935
+ *
936
+ * @param {QueryObject} obj a query object to be converted to a query string
937
+ * @param {Config} config optional configuration
938
+ * @returns {string} query string
939
+ *
940
+ * @example
941
+ * stringify({a: 1, b: 2}) // returns 'a=1&b=s'
942
+ */
943
+
944
+ function stringify(obj, config) {
945
+ if (config === void 0) {
946
+ config = defaultConfig;
947
+ }
948
+
949
+ var _defaultConfig$config = _extends({}, defaultConfig, config),
950
+ eq = _defaultConfig$config.eq,
951
+ sep = _defaultConfig$config.sep,
952
+ fn = _defaultConfig$config.fn,
953
+ prefix = _defaultConfig$config.prefix;
954
+
955
+ if (obj == null || !isObject(obj)) {
956
+ return '';
957
+ }
958
+
959
+ return Object.entries(obj).filter(function (_ref) {
960
+ var value = _ref[1];
961
+ return value !== null;
962
+ }) // filter out null values
963
+ .map(function (_ref2) {
964
+ var key = _ref2[0],
965
+ value = _ref2[1];
966
+ if (Array.isArray(value)) return encode(key, value.join(','), {
967
+ eq: eq,
968
+ fn: fn,
969
+ prefix: prefix
970
+ });
971
+ if (isObject(value)) return stringify(value, {
972
+ eq: eq,
973
+ sep: sep,
974
+ fn: fn,
975
+ prefix: getKey(key, prefix)
976
+ });
977
+ return encode(key, value, {
978
+ eq: eq,
979
+ fn: fn,
980
+ prefix: prefix
981
+ });
982
+ }).join(sep);
983
+ } // encode the key and add prefix if necessary
984
+
985
+
986
+ var getKey = function getKey(key, prefix) {
987
+ if (prefix === void 0) {
988
+ prefix = '';
989
+ }
990
+
991
+ var encodedKey = encodeURIComponent(key);
992
+ if (prefix) return prefix + "[" + encodedKey + "]";
993
+ return encodedKey;
994
+ }; // encode the key and value of a query object
995
+
996
+
997
+ var encode = function encode(key, value, _ref3) {
998
+ var _ref3$eq = _ref3.eq,
999
+ eq = _ref3$eq === void 0 ? defaultEq : _ref3$eq,
1000
+ _ref3$fn = _ref3.fn,
1001
+ fn = _ref3$fn === void 0 ? defaultStringifyFunction : _ref3$fn,
1002
+ _ref3$prefix = _ref3.prefix,
1003
+ prefix = _ref3$prefix === void 0 ? '' : _ref3$prefix;
1004
+ var newValue = encodeURIComponent(fn(key, value));
1005
+ var newKey = getKey(key, prefix);
1006
+ return [newKey, newValue].join(eq);
1007
+ }; // check if the given value is an object
1008
+
1009
+
1010
+ function isObject(obj) {
1011
+ var type = typeof obj;
1012
+ return obj && (type === 'object' || type === 'function') || false;
1013
+ }
1014
+
1015
+ var removeBeginningSlash = function removeBeginningSlash(url) {
1016
+ return url.startsWith('/') ? url.slice(1) : url;
1017
+ };
1018
+
830
1019
  var API_BASE_URL = 'https://api.quran.com/api/v4/';
831
1020
  var makeUrl = function makeUrl(url, params) {
832
- var baseUrl = "" + API_BASE_URL + misc.removeBeginningSlash(url);
1021
+ var baseUrl = "" + API_BASE_URL + removeBeginningSlash(url);
833
1022
  if (!params) return baseUrl;
834
1023
  var decamelizedKeys = humps.decamelizeKeys(params);
835
- var paramsString = stringify__default["default"](decamelizedKeys);
1024
+ var paramsString = stringify(decamelizedKeys);
836
1025
  if (!paramsString) return baseUrl;
837
1026
  return baseUrl + "?" + paramsString;
838
1027
  };
@@ -1116,7 +1305,7 @@ var Utils = {
1116
1305
  };
1117
1306
 
1118
1307
  var defaultOptions$2 = {
1119
- language: types.Language.ARABIC
1308
+ language: exports.Language.ARABIC
1120
1309
  };
1121
1310
 
1122
1311
  var getChapterOptions = function getChapterOptions(options) {
@@ -1131,7 +1320,7 @@ var getChapterOptions = function getChapterOptions(options) {
1131
1320
  /**
1132
1321
  * Get all chapters.
1133
1322
  * @description https://quran.api-docs.io/v4/chapters/list-chapters
1134
- * @param {Options} options
1323
+ * @param {GetChapterOptions} options
1135
1324
  * @example
1136
1325
  * quran.v4.chapters.findAll()
1137
1326
  */
@@ -1170,7 +1359,7 @@ var findAll$1 = /*#__PURE__*/function () {
1170
1359
  * Get chapter by id.
1171
1360
  * @description https://quran.api-docs.io/v4/chapters/get-chapter
1172
1361
  * @param {ChapterId} id chapter id, minimum 1, maximum 114
1173
- * @param {Options} options
1362
+ * @param {GetChapterOptions} options
1174
1363
  * @example
1175
1364
  * quran.v4.chapters.findById('1')
1176
1365
  * quran.v4.chapters.findById('114')
@@ -1218,7 +1407,7 @@ var findById = /*#__PURE__*/function () {
1218
1407
  * Get chapter info by id.
1219
1408
  * @description https://quran.api-docs.io/v4/chapters/chapter_info
1220
1409
  * @param {ChapterId} id chapter id, minimum 1, maximum 114
1221
- * @param {Options} options
1410
+ * @param {GetChapterOptions} options
1222
1411
  * @example
1223
1412
  * quran.v4.chapters.findInfoById('1')
1224
1413
  * quran.v4.chapters.findInfoById('114')
@@ -1270,7 +1459,7 @@ var chapters = {
1270
1459
  };
1271
1460
 
1272
1461
  var defaultOptions$1 = {
1273
- language: types.Language.ARABIC,
1462
+ language: exports.Language.ARABIC,
1274
1463
  perPage: 50
1275
1464
  };
1276
1465
 
@@ -1654,7 +1843,7 @@ var juzs = {
1654
1843
  };
1655
1844
 
1656
1845
  var defaultChapterRecitationsOptions = {
1657
- language: types.Language.ARABIC
1846
+ language: exports.Language.ARABIC
1658
1847
  };
1659
1848
 
1660
1849
  var getChapterRecitationsOptions = function getChapterRecitationsOptions(options) {
@@ -1668,7 +1857,7 @@ var getChapterRecitationsOptions = function getChapterRecitationsOptions(options
1668
1857
  };
1669
1858
 
1670
1859
  var defaultVerseRecitationsOptions = {
1671
- language: types.Language.ARABIC
1860
+ language: exports.Language.ARABIC
1672
1861
  };
1673
1862
 
1674
1863
  var getVerseRecitationsOptions = function getVerseRecitationsOptions(options) {
@@ -1701,7 +1890,7 @@ var getVerseRecitationsOptions = function getVerseRecitationsOptions(options) {
1701
1890
  * Get all chapter recitations for specific reciter
1702
1891
  * @description https://quran.api-docs.io/v4/audio-recitations/list-of-all-surah-audio-files-for-specific-reciter
1703
1892
  * @param {string} reciterId
1704
- * @param {GetChapterRecitationsOptions} options
1893
+ * @param {GetChapterRecitationOptions} options
1705
1894
  * @example
1706
1895
  * quran.v4.audio.findAllChapterRecitations('2')
1707
1896
  */
@@ -1741,7 +1930,7 @@ var findAllChapterRecitations = /*#__PURE__*/function () {
1741
1930
  * @description https://quran.api-docs.io/v4/audio-recitations/get-single-surah-audio-for-specific-reciter
1742
1931
  * @param {ChapterId} chapterId
1743
1932
  * @param {string} reciterId
1744
- * @param {GetChapterRecitationsOptions} options
1933
+ * @param {GetChapterRecitationOptions} options
1745
1934
  * @example
1746
1935
  * quran.v4.audio.findChapterRecitationById('1', '2') // first chapter recitation for reciter 2
1747
1936
  */
@@ -1789,7 +1978,7 @@ var findChapterRecitationById = /*#__PURE__*/function () {
1789
1978
  * @description https://quran.api-docs.io/v4/audio-recitations/get-ayah-recitations-for-specific-surah
1790
1979
  * @param {ChapterId} chapterId
1791
1980
  * @param {string} recitationId
1792
- * @param {GetVerseRecitationsOptions} options
1981
+ * @param {GetVerseRecitationOptions} options
1793
1982
  * @example
1794
1983
  * quran.v4.audio.findVerseRecitationsByChapter('1', '2')
1795
1984
  */
@@ -1881,7 +2070,7 @@ var findVerseRecitationsByJuz = /*#__PURE__*/function () {
1881
2070
  * @description https://quran.api-docs.io/v4/audio-recitations/get-ayah-recitations-for-specific-madani-mushaf-page
1882
2071
  * @param {PageNumber} page
1883
2072
  * @param {string} recitationId
1884
- * @param {GetVerseRecitationsOptions} options
2073
+ * @param {GetVerseRecitationOptions} options
1885
2074
  * @example
1886
2075
  * quran.v4.audio.findVerseRecitationsByPage('1', '2')
1887
2076
  */
@@ -1927,7 +2116,7 @@ var findVerseRecitationsByPage = /*#__PURE__*/function () {
1927
2116
  * @description https://quran.api-docs.io/v4/audio-recitations/get-ayah-recitations-for-specific-rub
1928
2117
  * @param {RubNumber} rub
1929
2118
  * @param {string} recitationId
1930
- * @param {GetVerseRecitationsOptions} options
2119
+ * @param {GetVerseRecitationOptions} options
1931
2120
  * @example
1932
2121
  * quran.v4.audio.findVerseRecitationsByRub('1', '2')
1933
2122
  */
@@ -1973,7 +2162,7 @@ var findVerseRecitationsByRub = /*#__PURE__*/function () {
1973
2162
  * @description https://quran.api-docs.io/v4/audio-recitations/get-ayah-recitations-for-specific-hizb
1974
2163
  * @param {HizbNumber} hizb
1975
2164
  * @param {string} recitationId
1976
- * @param {GetVerseRecitationsOptions} options
2165
+ * @param {GetVerseRecitationOptions} options
1977
2166
  * @example
1978
2167
  * quran.v4.audio.findVerseRecitationsByHizb('1', '2')
1979
2168
  */
@@ -2015,11 +2204,11 @@ var findVerseRecitationsByHizb = /*#__PURE__*/function () {
2015
2204
  };
2016
2205
  }();
2017
2206
  /**
2018
- * Get all verse audio files for a specific reciter and a specific hizb
2207
+ * Get all verse audio files for a specific reciter and a specific verse
2019
2208
  * @description https://quran.api-docs.io/v4/audio-recitations/get-ayah-recitations-for-specific-ayah
2020
2209
  * @param {VerseKey} key
2021
2210
  * @param {string} recitationId
2022
- * @param {GetVerseRecitationsOptions} options
2211
+ * @param {GetVerseRecitationOptions} options
2023
2212
  * @example
2024
2213
  * quran.v4.audio.findVerseRecitationsByKey('1:1', '2')
2025
2214
  */
@@ -2073,7 +2262,7 @@ var audio = {
2073
2262
  };
2074
2263
 
2075
2264
  var defaultOptions = {
2076
- language: types.Language.ARABIC
2265
+ language: exports.Language.ARABIC
2077
2266
  };
2078
2267
 
2079
2268
  var getResourcesOptions = function getResourcesOptions(options) {
@@ -2088,7 +2277,7 @@ var getResourcesOptions = function getResourcesOptions(options) {
2088
2277
  /**
2089
2278
  * Get all recitations.
2090
2279
  * @description https://quran.api-docs.io/v4/resources/recitations
2091
- * @param {GetResourcesOptions} options
2280
+ * @param {GetResourceOptions} options
2092
2281
  * @example
2093
2282
  * quran.v4.resources.findAllRecitations()
2094
2283
  */
@@ -2128,11 +2317,11 @@ var findAllRecitations = /*#__PURE__*/function () {
2128
2317
  * Get all recitation info.
2129
2318
  * @description https://quran.api-docs.io/v4/resources/recitation-info
2130
2319
  * @param {string} id recitation id
2131
- * @param {GetResourcesOptions} options
2320
+ * @param {GetResourceOptions} options
2132
2321
  * @example
2133
2322
  * quran.v4.resources.findRecitationInfo('1')
2134
2323
  */
2135
- // const findRecitationInfo = async (id: string, options?: GetResourcesOptions) => {
2324
+ // const findRecitationInfo = async (id: string, options?: GetResourceOptions) => {
2136
2325
  // const params = getResourcesOptions(options);
2137
2326
  // const { info } = await fetcher<{
2138
2327
  // info: RecitationInfoResource;
@@ -2143,7 +2332,7 @@ var findAllRecitations = /*#__PURE__*/function () {
2143
2332
  /**
2144
2333
  * Get all translations.
2145
2334
  * @description https://quran.api-docs.io/v4/resources/translations
2146
- * @param {GetResourcesOptions} options
2335
+ * @param {GetResourceOptions} options
2147
2336
  * @example
2148
2337
  * quran.v4.resources.findAllTranslations()
2149
2338
  */
@@ -2183,11 +2372,11 @@ var findAllTranslations = /*#__PURE__*/function () {
2183
2372
  * Get translation info.
2184
2373
  * @description https://quran.api-docs.io/v4/resources/translation-info
2185
2374
  * @param {string} id translation id
2186
- * @param {GetResourcesOptions} options
2375
+ * @param {GetResourceOptions} options
2187
2376
  * @example
2188
2377
  * quran.v4.resources.findTranslationInfo('169')
2189
2378
  */
2190
- // const findTranslationInfo = async (id: string, options?: GetResourcesOptions) => {
2379
+ // const findTranslationInfo = async (id: string, options?: GetResourceOptions) => {
2191
2380
  // const params = getResourcesOptions(options);
2192
2381
  // const { info } = await fetcher<{
2193
2382
  // info: TranslationInfoResource;
@@ -2198,7 +2387,7 @@ var findAllTranslations = /*#__PURE__*/function () {
2198
2387
  /**
2199
2388
  * Get all tafsirs.
2200
2389
  * @description https://quran.api-docs.io/v4/resources/tafsirs
2201
- * @param {GetResourcesOptions} options
2390
+ * @param {GetResourceOptions} options
2202
2391
  * @example
2203
2392
  * quran.v4.resources.findAllTafsirs()
2204
2393
  */
@@ -2238,11 +2427,11 @@ var findAllTafsirs = /*#__PURE__*/function () {
2238
2427
  * Get tafsir info.
2239
2428
  * @description https://quran.api-docs.io/v4/resources/tafsirs-info
2240
2429
  * @param {string} id tafsir id
2241
- * @param {GetResourcesOptions} options
2430
+ * @param {GetResourceOptions} options
2242
2431
  * @example
2243
2432
  * quran.v4.resources.findTranslationInfo('1')
2244
2433
  */
2245
- // const findTafsirInfo = async (id: string, options?: GetResourcesOptions) => {
2434
+ // const findTafsirInfo = async (id: string, options?: GetResourceOptions) => {
2246
2435
  // const params = getResourcesOptions(options);
2247
2436
  // const { info } = await fetcher<{
2248
2437
  // info: TafsirInfoResource;
@@ -2289,7 +2478,7 @@ var findAllRecitationStyles = /*#__PURE__*/function () {
2289
2478
  /**
2290
2479
  * Get all languages.
2291
2480
  * @description https://quran.api-docs.io/v4/resources/languages
2292
- * @param {GetResourcesOptions} options
2481
+ * @param {GetResourceOptions} options
2293
2482
  * @example
2294
2483
  * quran.v4.resources.findAllLanguages()
2295
2484
  */
@@ -2327,7 +2516,7 @@ var findAllLanguages = /*#__PURE__*/function () {
2327
2516
  /**
2328
2517
  * Get all chapter infos.
2329
2518
  * @description https://quran.api-docs.io/v4/resources/chapter-info
2330
- * @param {GetResourcesOptions} options
2519
+ * @param {GetResourceOptions} options
2331
2520
  * @example
2332
2521
  * quran.v4.resources.findAllChapterInfos()
2333
2522
  */
@@ -2365,7 +2554,7 @@ var findAllChapterInfos = /*#__PURE__*/function () {
2365
2554
  /**
2366
2555
  * Get verse media.
2367
2556
  * @description https://quran.api-docs.io/v4/resources/verse_media
2368
- * @param {GetResourcesOptions} options
2557
+ * @param {GetResourceOptions} options
2369
2558
  * @example
2370
2559
  * quran.v4.resources.findVerseMedia()
2371
2560
  */
@@ -2403,7 +2592,7 @@ var findVerseMedia = /*#__PURE__*/function () {
2403
2592
  /**
2404
2593
  * Get all chapter reciters.
2405
2594
  * @description https://quran.api-docs.io/v4/resources/list-of-chapter-reciters
2406
- * @param {GetResourcesOptions} options
2595
+ * @param {GetResourceOptions} options
2407
2596
  * @example
2408
2597
  * quran.v4.resources.findAllChapterReciters()
2409
2598
  */
@@ -2454,7 +2643,7 @@ var resources = {
2454
2643
  };
2455
2644
 
2456
2645
  var defaultSearchOptions = {
2457
- language: types.Language.ARABIC,
2646
+ language: exports.Language.ARABIC,
2458
2647
  size: 30
2459
2648
  };
2460
2649
 
@@ -2472,13 +2661,13 @@ var getSearchOptions = function getSearchOptions(q, options) {
2472
2661
  /**
2473
2662
  * Search
2474
2663
  * @description https://quran.api-docs.io/v4/search/KfCmk4KQYbtyK9adj
2475
- * @param q search query
2476
- * @param options search options
2664
+ * @param {string} q search query
2665
+ * @param {SearchOptions} options
2477
2666
  * @example
2478
- * quran.v4.search.search('الله')
2479
- * quran.v4.search.search('الله', { language: Language.ENGLISH })
2480
- * quran.v4.search.search('الله', { language: Language.ENGLISH, size: 10 })
2481
- * quran.v4.search.search('الله', { language: Language.ENGLISH, page: 2 })
2667
+ * quran.v4.search.search('نور')
2668
+ * quran.v4.search.search('نور', { language: Language.ENGLISH })
2669
+ * quran.v4.search.search('نور', { language: Language.ENGLISH, size: 10 })
2670
+ * quran.v4.search.search('نور', { language: Language.ENGLISH, page: 2 })
2482
2671
  */
2483
2672
 
2484
2673
 
@@ -2530,98 +2719,5 @@ var quran = {
2530
2719
  utils: Utils
2531
2720
  };
2532
2721
 
2533
- exports.CharType = void 0;
2534
-
2535
- (function (CharType) {
2536
- CharType["Word"] = "word";
2537
- CharType["End"] = "end";
2538
- CharType["Pause"] = "pause";
2539
- CharType["Sajdah"] = "sajdah";
2540
- CharType["RubElHizb"] = "rub-el-hizb";
2541
- })(exports.CharType || (exports.CharType = {}));
2542
-
2543
- exports.Language = void 0;
2544
-
2545
- (function (Language) {
2546
- Language["ARABIC"] = "ar";
2547
- Language["ENGLISH"] = "en";
2548
- Language["URDU"] = "ur";
2549
- Language["BENGALI"] = "bn";
2550
- Language["TURKISH"] = "tr";
2551
- Language["SPANISH"] = "es";
2552
- Language["GERMAN"] = "de";
2553
- Language["BOSNIAN"] = "bs";
2554
- Language["RUSSIAN"] = "ru";
2555
- Language["ALBANIAN_AL"] = "al";
2556
- Language["FRENCH"] = "fr";
2557
- Language["DUTCH"] = "nl";
2558
- Language["TAMIL"] = "ta";
2559
- Language["TAJIK"] = "tg";
2560
- Language["INDONESIAN"] = "id";
2561
- Language["UZBEK"] = "uz";
2562
- Language["VIETNAMESE"] = "vi";
2563
- Language["CHINESE"] = "zh";
2564
- Language["ITALIAN"] = "it";
2565
- Language["JAPANESE"] = "ja";
2566
- Language["MALAYALAM"] = "ml";
2567
- Language["AMHARIC"] = "am";
2568
- Language["KAZAKH"] = "kk";
2569
- Language["PORTUGUESE"] = "pt";
2570
- Language["TAGALOG"] = "tl";
2571
- Language["THAI"] = "th";
2572
- Language["KOREAN"] = "ko";
2573
- Language["HINDI"] = "hi";
2574
- Language["KURDISH"] = "ku";
2575
- Language["HAUSA"] = "ha";
2576
- Language["AZERI"] = "az";
2577
- Language["SWAHILI"] = "sw";
2578
- Language["PERSIAN"] = "fa";
2579
- Language["SERBIAN"] = "sr";
2580
- Language["MARANAO"] = "mrn";
2581
- Language["AMAZIGH"] = "zgh";
2582
- Language["ASSAMESE"] = "as";
2583
- Language["BULGARIAN"] = "bg";
2584
- Language["CHECHEN"] = "ce";
2585
- Language["CZECH"] = "cs";
2586
- Language["DIVEHI"] = "dv";
2587
- Language["DHIVEHI"] = "dv";
2588
- Language["MALDIVIAN"] = "dv";
2589
- Language["FINNISH"] = "fi";
2590
- Language["GUJAARATI"] = "gu";
2591
- Language["HEBREW"] = "he";
2592
- Language["GEORGIAN"] = "ka";
2593
- Language["CENTRAL_KHMER"] = "km";
2594
- Language["GANDA"] = "lg";
2595
- Language["MARATHI"] = "mr";
2596
- Language["YORUBA"] = "yo";
2597
- Language["MALAY"] = "ms";
2598
- Language["NEPALI"] = "ne";
2599
- Language["SWEDISH"] = "sv";
2600
- Language["TELUGU"] = "te";
2601
- Language["TATAR"] = "tt";
2602
- Language["UIGHUR"] = "ug";
2603
- Language["UYGHUR"] = "ug";
2604
- Language["UKRAINIAN"] = "uk";
2605
- Language["NORWEGIAN"] = "no";
2606
- Language["OROMO"] = "om";
2607
- Language["POLISH"] = "pl";
2608
- Language["PASHTO"] = "ps";
2609
- Language["ROMANIAN"] = "ro";
2610
- Language["SINDHI"] = "sd";
2611
- Language["NORTHERN_SAMI"] = "se";
2612
- Language["SINHALA"] = "si";
2613
- Language["SINHALESE"] = "si";
2614
- Language["SOMALI"] = "so";
2615
- Language["ALBANIAN_SQ"] = "sq";
2616
- })(exports.Language || (exports.Language = {}));
2617
-
2618
- exports.QuranFont = void 0;
2619
-
2620
- (function (QuranFont) {
2621
- QuranFont["MadaniV1"] = "code_v1";
2622
- QuranFont["MadaniV2"] = "code_v2";
2623
- QuranFont["Uthmani"] = "text_uthmani";
2624
- })(exports.QuranFont || (exports.QuranFont = {}));
2625
-
2626
2722
  exports.quran = quran;
2627
2723
  //# sourceMappingURL=api.cjs.development.js.map