Skip to content

Commit

Permalink
Merge pull request #23 from quran/dev
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
ahmedriad1 authored Feb 23, 2025
2 parents 0725c01 + 07a6b5b commit 02ea139
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/sdk/v4/_fetcher.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { camelizeKeys, decamelize, decamelizeKeys } from 'humps';
import humps from 'humps';
import { FetchFn } from '../../types';
import { BaseApiOptions } from '../../types/BaseApiOptions';
import { removeBeginningSlash } from '../../utils/misc';

export const API_BASE_URL = 'https://api.quran.com/api/v4/';

const { camelizeKeys, decamelize, decamelizeKeys } = humps;

export const makeUrl = (url: string, params?: Record<string, unknown>) => {
const baseUrl = `${API_BASE_URL}${removeBeginningSlash(url)}`;
if (!params) return baseUrl;
Expand Down
4 changes: 3 additions & 1 deletion src/sdk/v4/verses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ import {
VerseKey,
WordField,
} from '../../types';
import { decamelize } from 'humps';
import humps from 'humps';
import Utils from '../utils';
import { fetcher, mergeApiOptions } from './_fetcher';
import { BaseApiOptions } from '../../types/BaseApiOptions';

const { decamelize } = humps;

type GetVerseOptions = Partial<
BaseApiOptions & {
reciter: string | number;
Expand Down

0 comments on commit 02ea139

Please sign in to comment.