[go: up one dir, main page]

@kmaslesa/word-by-word-quran

1.0.3 • Public • Published

بسم الله الرحمن الرحيم

Quran words

Installation

npm i @kmaslesa/word-by-word-quran

Usage

const quranWords = require("@kmaslesa/word-by-word-quran");

quranWords.getAllQuranWords();
quranWords.getWordsByPage(page); //page = (1-604)

// SYNC
const sync = quranWords.getWordsByPage(1);
console.log(sync);

// ASYNC
async function getWordsByPageAsync() {
  try {
    const wordsByPage = await quranWords.getAllQuranWordsAsync(1);
    console.log(wordsByPage);
  } catch (error) {
    console.error(error);
  }
}
console.log(getWordsByPageAsync());

// Call getWordsByPage() with .then() and .catch()
quranWords
  .getWordsByPageAsync(1)
  .then((wordsByPage) => {
    console.log(wordsByPage);
  })
  .catch((error) => {
    console.error(error);
  });
quranWords.getWordsByPage(1)

RESPONSE:
{
  "page": 1,
  "ayahs": [
    {
      "metaData": {
        "lineType": "start_sura",
        "suraName": "الفاتحة - Al-Fatihah"
      },
      "words": []
    },
    {
      "metaData": {},
      "words": [
        {
          "id": 1,
          "code": "ﭑ",
          "audio": "wbw/001_001_001.mp3",
          "type": "word",
          "ayah": 1
        },
        {
          "id": 2,
          "code": "ﭒ",
          "audio": "wbw/001_001_002.mp3",
          "type": "word",
          "ayah": 1
        },
        {
          "id": 3,
          "code": "ﭓ",
          "audio": "wbw/001_001_003.mp3",
          "type": "word",
          "ayah": 1
        },
        {
          "id": 4,
          "code": "ﭔ",
          "audio": "wbw/001_001_004.mp3",
          "type": "word",
          "ayah": 1
        },
        {
          "id": 5,
          "code": "ﭕ",
          "audio": null,
          "type": "end",
          "ayah": 1
        }
      ]
    },
    {
      "metaData": {},
      "words": [
        {
          "id": 1130,
          "code": "ﭖ",
          "audio": "wbw/001_002_001.mp3",
          "type": "word",
          "ayah": 2
        },
        {
          "id": 1131,
          "code": "ﭗ",
          "audio": "wbw/001_002_002.mp3",
          "type": "word",
          "ayah": 2
        },
        {
          "id": 1132,
          "code": "ﭘ",
          "audio": "wbw/001_002_003.mp3",
          "type": "word",
          "ayah": 2
        },
        {
          "id": 1133,
          "code": "ﭙ",
          "audio": "wbw/001_002_004.mp3",
          "type": "word",
          "ayah": 2
        },
        {
          "id": 1134,
          "code": "ﭚ",
          "audio": null,
          "type": "end",
          "ayah": 2
        }
      ]
    },
    {
      "metaData": {},
      "words": [
        {
          "id": 2953,
          "code": "ﭛ",
          "audio": "wbw/001_003_001.mp3",
          "type": "word",
          "ayah": 3
        },
        {
          "id": 2954,
          "code": "ﭜ",
          "audio": "wbw/001_003_002.mp3",
          "type": "word",
          "ayah": 3
        },
        {
          "id": 2955,
          "code": "ﭝ",
          "audio": null,
          "type": "end",
          "ayah": 3
        },
        {
          "id": 3252,
          "code": "ﭞ",
          "audio": "wbw/001_004_001.mp3",
          "type": "word",
          "ayah": 4
        },
        {
          "id": 3253,
          "code": "ﭟ",
          "audio": "wbw/001_004_002.mp3",
          "type": "word",
          "ayah": 4
        },
        {
          "id": 3254,
          "code": "ﭠ",
          "audio": "wbw/001_004_003.mp3",
          "type": "word",
          "ayah": 4
        },
        {
          "id": 3255,
          "code": "ﭡ",
          "audio": null,
          "type": "end",
          "ayah": 4
        }
      ]
    },
    {
      "metaData": {},
      "words": [
        {
          "id": 5334,
          "code": "ﭢ",
          "audio": "wbw/001_005_001.mp3",
          "type": "word",
          "ayah": 5
        },
        {
          "id": 5335,
          "code": "ﭣ",
          "audio": "wbw/001_005_002.mp3",
          "type": "word",
          "ayah": 5
        },
        {
          "id": 5336,
          "code": "ﭤ",
          "audio": "wbw/001_005_003.mp3",
          "type": "word",
          "ayah": 5
        },
        {
          "id": 5337,
          "code": "ﭥ",
          "audio": "wbw/001_005_004.mp3",
          "type": "word",
          "ayah": 5
        },
        {
          "id": 5338,
          "code": "ﭦ",
          "audio": null,
          "type": "end",
          "ayah": 5
        },
        {
          "id": 6844,
          "code": "ﭧ",
          "audio": "wbw/001_006_001.mp3",
          "type": "word",
          "ayah": 6
        }
      ]
    },
    {
      "metaData": {},
      "words": [
        {
          "id": 6845,
          "code": "ﭨ",
          "audio": "wbw/001_006_002.mp3",
          "type": "word",
          "ayah": 6
        },
        {
          "id": 6846,
          "code": "ﭩ",
          "audio": "wbw/001_006_003.mp3",
          "type": "word",
          "ayah": 6
        },
        {
          "id": 6847,
          "code": "ﭪ",
          "audio": null,
          "type": "end",
          "ayah": 6
        },
        {
          "id": 8411,
          "code": "ﭫ",
          "audio": "wbw/001_007_001.mp3",
          "type": "word",
          "ayah": 7
        },
        {
          "id": 8412,
          "code": "ﭬ",
          "audio": "wbw/001_007_002.mp3",
          "type": "word",
          "ayah": 7
        },
        {
          "id": 8413,
          "code": "ﭭ",
          "audio": "wbw/001_007_003.mp3",
          "type": "word",
          "ayah": 7
        }
      ]
    },
    {
      "metaData": {},
      "words": [
        {
          "id": 8414,
          "code": "ﭮ",
          "audio": "wbw/001_007_004.mp3",
          "type": "word",
          "ayah": 7
        },
        {
          "id": 8415,
          "code": "ﭯ",
          "audio": "wbw/001_007_005.mp3",
          "type": "word",
          "ayah": 7
        },
        {
          "id": 8416,
          "code": "ﭰ",
          "audio": "wbw/001_007_006.mp3",
          "type": "word",
          "ayah": 7
        },
        {
          "id": 8417,
          "code": "ﭱ",
          "audio": "wbw/001_007_007.mp3",
          "type": "word",
          "ayah": 7
        }
      ]
    },
    {
      "metaData": {},
      "words": [
        {
          "id": 8418,
          "code": "ﭲ",
          "audio": "wbw/001_007_008.mp3",
          "type": "word",
          "ayah": 7
        },
        {
          "id": 8419,
          "code": "ﭳ",
          "audio": "wbw/001_007_009.mp3",
          "type": "word",
          "ayah": 7
        },
        {
          "id": 8420,
          "code": "ﭴ",
          "audio": null,
          "type": "end",
          "ayah": 7
        }
      ]
    }
  ]
}

VERSIONS

1.0.2

  • metaData changed from: "metaData": { "lineType": "start_sura", "suraName": "الفاتحة - Al-Fatihah" },

to: "metaData": { "lineType": "start_sura", "sura": 1 },

  • translation and transliteration included for each word: trn":"In (the) name","lit":"bis'mi"

1.0.3

  • added uth (qpc_uthmani_hafs) text for each word
  • for example: "uth":"بِسۡمِ"

{"id":1,"code":"ﭑ","audio":"wbw/001_001_001.mp3","type":"word","ayah":1,"trn":"In (the) name","lit":"bis'mi","uth":"بِسۡمِ"}

License

MIT

Package Sidebar

Install

npm i @kmaslesa/word-by-word-quran

Weekly Downloads

3

Version

1.0.3

License

ISC

Unpacked Size

11.9 MB

Total Files

4

Last publish

Collaborators

  • kmaslesa