Skip to content

Commit

Permalink
refactor: merge changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedriad1 committed Oct 28, 2022
2 parents 31e459f + ff6dece commit a9a983f
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
publish-module:
name: 🎉 Publish to NPM
needs: [build]
if: github.repository == 'quranjs/api' && (github.ref == 'refs/heads/master')
if: github.repository == 'quran/api-js' && (github.ref == 'refs/heads/master')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

## Questions

If you have questions about implementation details, help or support, then please use our dedicated community forum at [GitHub Discussions](https://github.com/quranjs/api/discussions) **PLEASE NOTE:** If you choose to instead open an issue for your question, your issue will be immediately closed and redirected to the forum.
If you have questions about implementation details, help or support, then please use our dedicated community forum at [GitHub Discussions](https://github.com/quran/api-js/discussions) **PLEASE NOTE:** If you choose to instead open an issue for your question, your issue will be immediately closed and redirected to the forum.

## Reporting Issues

If you have found what you think is a bug, please [file an issue](https://github.com/quranjs/api/issues/new). **PLEASE NOTE:** Issues that are identified as implementation questions or non-issues will be immediately closed and redirected to [GitHub Discussions](https://github.com/quranjs/api/discussions)
If you have found what you think is a bug, please [file an issue](https://github.com/quran/api-js/issues/new). **PLEASE NOTE:** Issues that are identified as implementation questions or non-issues will be immediately closed and redirected to [GitHub Discussions](https://github.com/quran/api-js/discussions)

## Suggesting new features

Expand All @@ -18,7 +18,7 @@ If you have been assigned to fix an issue or develop a new feature, please follo

- Fork this repository
- Install dependencies by running `$ yarn`
- Link `@quranjs/api` locally by running `$ yarn link`
- Link `quran/api-js` locally by running `$ yarn link`
- Auto-build files as you edit by running `$ yarn start`
- Implement your changes and tests to files in the `src/` directory and corresponding test files
- To run examples, follow their individual directions. Usually this is just `$ yarn && yarn start`.
Expand All @@ -29,7 +29,7 @@ If you have been assigned to fix an issue or develop a new feature, please follo

## Commit message conventions

`@quranjs/api` is using [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines).
`quran/api-js` is using [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines).

We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**.

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Quranjs Api Header](https://github.com/quranjs/api/raw/master/media/repo-header.png)
![Quranjs Api Header](https://github.com/quran/api-js/raw/master/media/repo-header.png)
A library for fetching quran data from the [quran.com API][qdc-api]. This library also works on both Node.js and the browser.

[Checkout Docs][docs]
Expand Down Expand Up @@ -31,10 +31,10 @@ you can visit the [docs][docs] for more details.

[qdc-api]: https://quran.api-docs.io/
[docs]: https://quranjs.vercel.app/
[build-badge]: https://github.com/quranjs/api/workflows/CI/badge.svg
[build]: https://github.com/quranjs/api/actions?query=workflow%3ACI
[build-badge]: https://github.com/quran/api-js/workflows/CI/badge.svg
[build]: https://github.com/quran/api-js/actions?query=workflow%3ACI
[license-badge]: https://badgen.net/github/license/quranjs/api
[license]: https://github.com/quranjs/api/blob/master/LICENSE
[license]: https://github.com/quran/api-js/blob/master/LICENSE
[npm]: https://www.npmjs.com/package/@quranjs/api
[npm-badge]: https://badgen.net/npm/v/@quranjs/api
[downloads-badge]: https://img.shields.io/npm/dm/@quranjs/api.svg
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Image from 'next/image'
A library for fetching quran data from the [Quran.com API](https://quran.api-docs.io/). This library also works on both Node.js and the browser.

- [NPM](https://www.npmjs.com/package/@quranjs/api)
- [MIT License](https://github.com/quranjs/api/blob/master/LICENSE)
- [MIT License](https://github.com/quran/api-js/blob/master/LICENSE)

## Installation

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"index": "Introdution",
"index": "Introduction",
"chapters": "Chapters",
"verses": "Verses",
"search": "Search",
Expand Down
6 changes: 3 additions & 3 deletions docs/theme.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ const SEO = {
titleSuffix: ' - QuranJS / API',
description:
'QuranJS / Api: A library for fetching quran data from the Quran.com API on both Node.js and the browser.',
image: 'https://github.com/quranjs/api/raw/master/media/repo-header.png',
image: 'https://github.com/quran/api-js/raw/master/media/repo-header.png',
twitter: '@ahmedriad_',
github: 'quranjs/api',
github: 'quran/api-js',
color: '#5120DB',
domain: 'quranjs.vercel.app',
domain: 'www.quranjs.com',
}

const theme = {
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// this maps chapterNumber to verseCount
export const versesMaping = {
export const versesMapping = {
'1': 7,
'2': 286,
'3': 200,
Expand Down Expand Up @@ -211,7 +211,7 @@ const isValidVerseKey = (key: string) => {
if (!chapterId || !verseId || !isValidChapterId(chapterId)) return false;

const parsedVerse = Number(verseId);
const verseCount = (versesMaping as any)[chapterId];
const verseCount = (versesMapping as any)[chapterId];
if (!parsedVerse || parsedVerse <= 0 || parsedVerse > verseCount)
return false;

Expand Down

0 comments on commit a9a983f

Please sign in to comment.