npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kmaslesa/quran-metadata

v1.0.24

Published

Qur'an metadata

Downloads

38

Readme

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

Quran metadata

Installation

npm install @kmaslesa/quran-metadata

Functions

  getSuraList,
  searchSuraByName,
  searchSuraByBosnianName,
  searchSuraByEnglishName,
  searchSuraByArabicName
  getSuraByIndex,
  getSuraByPageNumber,
  getJuzByPageNumber,
  sortSuraListByFirstPublished,
  sortSuraListByLastPublished,
  getSuraListPublishedInMekka,
  getSuraListPublishedInMedina,
  getSuraListByJuz,
  getJuzList,
  getJuzById,
  searchJuzListById,
  getNumberOfWordsAndLettersPerPage,
  getPageInfo

Usage

const quranMetaData = require('@kmaslesa/quran-metadata');
quranMetaData.getSuraList();

RESPONSE:
[
  ...
  {
    index: 60,
    numberOfAyas: 13,
    startAyaIndex: 5150,
    name: {
      arabic: 'الممتحنة',
      english: 'She that is to be examined',
      englishTranscription: 'Al-Mumtahanah',
      bosnian: 'Provjerena',
      bosnianTranscription: 'El-Mumtehine'
    },
    aboutSura: {
      bosnian: 'Čišćenje vjerničkih srca od prijateljevanja i ljubavi prema drugim vjerama mimo Allahove.'
    },
    type: 'Medinan',
    orderInPublishing: 91,
    numberOfWords: 356,
    numberOfLetters: 1510,
    startJuz: 28,
    endJuz: 28,
    startPage: 549,
    endPage: 551,
    totalPages: 3
  },
  {
    index: 61,
    numberOfAyas: 14,
    startAyaIndex: 5163,
    name: {
      arabic: 'الصف',
      english: 'The Ranks',
      englishTranscription: 'As-Saf',
      bosnian: 'Bojni red',
      bosnianTranscription: 'Es-Saff'
    },
    aboutSura: {
      bosnian: 'Stimulisanje vjernika na pomaganje Allahove vjere i borbu na Njegovom putu.'
    },
    type: 'Medinan',
    orderInPublishing: 109,
    numberOfWords: 230,
    numberOfLetters: 900,
    startJuz: 28,
    endJuz: 28,
    startPage: 551,
    endPage: 552,
    totalPages: 2
  },
  {
    index: 62,
    numberOfAyas: 11,
    startAyaIndex: 5177,
    name: {
      arabic: 'الجمعة',
      english: 'The Congregation, Friday',
      englishTranscription: "Al-Jumu'ah",
      bosnian: 'Petak',
      bosnianTranscription: "El-Džumu'a"
    },
    aboutSura: {
      bosnian: 'Pojašnjavanje Allahove blagodati ovom ummetu kojeg je posebno odlikovao uputom i slanjem Poslanika, sallallahu alejhi ve sellem, nakon što je bio u zabludi, zaduživanje pokornošću njemu i upozorenje na opasnost poistovjećivanja sa Jevrejima.'
    },
    type: 'Medinan',
    orderInPublishing: 110,
    numberOfWords: 181,
    numberOfLetters: 720,
    startJuz: 28,
    endJuz: 28,
    startPage: 553,
    endPage: 554,
    totalPages: 2
  },
  {
    index: 63,
    numberOfAyas: 11,
    startAyaIndex: 5188,
    name: {
      arabic: 'المنافقون',
      english: 'The Hypocrites',
      englishTranscription: 'Al-Munafiqun',
      bosnian: 'Licemjeri',
      bosnianTranscription: 'El-Munafikun'
    },
    aboutSura: {
      bosnian: 'Otkrivanje svojstava licemjera i pojašnjavanje njihovog stava naspram islama i muslimana, te upozorenje na opasnost poistovjećivanja s njima.'
    },
    type: 'Medinan',
    orderInPublishing: 104,
    numberOfWords: 185,
    numberOfLetters: 776,
    startJuz: 28,
    endJuz: 28,
    startPage: 554,
    endPage: 555,
    totalPages: 2
  },
	...
	]
quranMetaData.searchSuraByName(searchTerm); //bosnian, arabic and english
quranMetaData.searchSuraByBosnianName(searchTerm),
quranMetaData.searchSuraByEnglishName(searchTerm),
quranMetaData.searchSuraByArabicName(searchTerm)

EXAMPLE:
quranMetaData.searchSuraByBosnianName('krava');
quranMetaData.searchSuraByEnglishName('opener');
quranMetaData.searchSuraByArabicName('الفاتحة');
quranMetaData.getSuraByIndex(index); //index = 1-114

EXAMPLE: 
quranMetaData.getSuraByIndex(1);
quranMetaData.getJuzByPageNumber(page); //page = 1-604

EXMAPLE: 
quranMetaData.getJuzByPageNumber(50);

RESPONSE:
{
  id: 3,
  juzNumber: 3,
  surahs: [
    { id: 2, startAyah: 253, endAyah: 286, name: [Object] },
    { id: 3, startAyah: 1, endAyah: 92, name: [Object] }
  ],
  firstAyahId: 260,
  lastAyahId: 385,
  numberOfAyahs: 126,
  startPage: 42,
  endPage: 61
}
quranMetaData.getSuraByPageNumber(page); //page = 1-604

EXAMPLE: 
quranMetaData.getSuraByPageNumber(604);

REPONSE:
[
  {
    index: 112,
    numberOfAyas: 4,
    startAyaIndex: 6221,
    name: {
      arabic: 'الإخلاص',
      english: 'The Sincerity',
      englishTranscription: 'Al-Ikhlas',
      bosnian: 'Iskrenost',
      bosnianTranscription: 'El-Ihlas'
    },
    aboutSura: {
      bosnian: 'Potvrđivanje da je Allah jedinstven u svome savršenstvu, božanstvenosti i čistoći od mahana'
    },
    type: 'Meccan',
    orderInPublishing: 22,
    numberOfWords: 19,
    numberOfLetters: 47,
    startJuz: 30,
    endJuz: 30,
    startPage: 604,
    endPage: 604,
    totalPages: 1
  },
  {
    index: 113,
    numberOfAyas: 5,
    startAyaIndex: 6225,
    name: {
      arabic: 'الفلق',
      english: 'The Daybreak',
      englishTranscription: 'Al-Falaq',
      bosnian: 'Svitanje',
      bosnianTranscription: 'El-Felek'
    },
    aboutSura: { bosnian: 'Traženje zaštite kod Allaha od vidljivog zla.' },
    type: 'Meccan',
    orderInPublishing: 20,
    numberOfWords: 27,
    numberOfLetters: 74,
    startJuz: 30,
    endJuz: 30,
    startPage: 604,
    endPage: 604,
    totalPages: 1
  },
  {
    index: 114,
    numberOfAyas: 6,
    startAyaIndex: 6230,
    name: {
      arabic: 'الناس',
      english: 'The Mankind',
      englishTranscription: 'An-Nas',
      bosnian: 'Ljudi',
      bosnianTranscription: 'En-Nas'
    },
    aboutSura: {
      bosnian: 'Zaštita kod Allaha od zla šejtana i njegovih došaptavanja i od skrivenog zla.'
    },
    type: 'Meccan',
    orderInPublishing: 21,
    numberOfWords: 24,
    numberOfLetters: 79,
    startJuz: 30,
    endJuz: 30,
    startPage: 604,
    endPage: 604,
    totalPages: 1
  }
]
quranMetaData.sortSuraListByFirstPublished();
quranMetaData.sortSuraListByLastPublished();
quranMetaData.getSuraListPublishedInMekka();
quranMetaData.getSuraListPublishedInMedina();
quranMetaData.getSuraListByJuz(juz); //juz = 1-30

EXAMPLE:
quranMetaData.getSuraListByJuz(1);
quranMetaData.getJuzList();

RESPONSE:
[
  {
    id: 1,
    juzNumber: 1,
    surahs: [
      {
        id: 1,
        startAyah: 1,
        endAyah: 7,
        name: {
          arabic: "الفاتحة",
          english: "The Opener",
          englishTranscription: "Al-Fatihah",
          bosnian: "Pristup",
          bosnianTranscription: "El-Fatiha",
        },
      },
      {
        id: 2,
        startAyah: 1,
        endAyah: 141,
        name: {
          arabic: "البقرة",
          english: "The Cow",
          englishTranscription: "Al-Baqarah",
          bosnian: "Krava",
          bosnianTranscription: "El-Bekare",
        },
      },
    ],
    firstAyahId: 1,
    lastAyahId: 148,
    numberOfAyahs: 148,
    startPage: 1,
    endPage: 21,
  },
  {
    id: 2,
    juzNumber: 2,
    surahs: [
      {
        id: 2,
        startAyah: 142,
        endAyah: 252,
        name: {
          arabic: "البقرة",
          english: "The Cow",
          englishTranscription: "Al-Baqarah",
          bosnian: "Krava",
          bosnianTranscription: "El-Bekare",
        },
      },
    ],
    firstAyahId: 149,
    lastAyahId: 259,
    numberOfAyahs: 111,
    startPage: 22,
    endPage: 41,
  },
  {
    id: 3,
    juzNumber: 3,
    surahs: [
      {
        id: 2,
        startAyah: 253,
        endAyah: 286,
        name: {
          arabic: "البقرة",
          english: "The Cow",
          englishTranscription: "Al-Baqarah",
          bosnian: "Krava",
          bosnianTranscription: "El-Bekare",
        },
      },
      {
        id: 3,
        startAyah: 1,
        endAyah: 92,
        name: {
          arabic: "آل عمران",
          english: "Family of Imran",
          englishTranscription: "Ali 'Imran",
          bosnian: "Imranova porodica",
          bosnianTranscription: "Ali-'Imran",
        },
      },
    ],
    firstAyahId: 260,
    lastAyahId: 385,
    numberOfAyahs: 126,
    startPage: 42,
    endPage: 61,
  },
  {
    id: 4,
    juzNumber: 4,
    surahs: [
      {
        id: 3,
        startAyah: 93,
        endAyah: 200,
        name: {
          arabic: "آل عمران",
          english: "Family of Imran",
          englishTranscription: "Ali 'Imran",
          bosnian: "Imranova porodica",
          bosnianTranscription: "Ali-'Imran",
        },
      },
      {
        id: 4,
        startAyah: 1,
        endAyah: 23,
        name: {
          arabic: "النساء",
          english: "The Women",
          englishTranscription: "An-Nisa",
          bosnian: "Žene",
          bosnianTranscription: "En-Nisa",
        },
      },
    ],
    firstAyahId: 386,
    lastAyahId: 516,
    numberOfAyahs: 131,
    startPage: 62,
    endPage: 81,
  },
  {
    id: 5,
    juzNumber: 5,
    surahs: [
      {
        id: 4,
        startAyah: 24,
        endAyah: 147,
        name: {
          arabic: "النساء",
          english: "The Women",
          englishTranscription: "An-Nisa",
          bosnian: "Žene",
          bosnianTranscription: "En-Nisa",
        },
      },
    ],
    firstAyahId: 517,
    lastAyahId: 640,
    numberOfAyahs: 124,
    startPage: 82,
    endPage: 101,
  },
	....
]
quranMetaData.getNumberOfWordsAndLettersPerPage(1);

RESPONSE:
{ page: 1, wordsNumber: 29, lettersNumber: 145 }
quranMetaData.getPageInfo(604);

RESPONSE:
{
  pageNumber: 604,
  sura: [
    {
      arabic: 'الإخلاص',
      english: 'The Sincerity',
      englishTranscription: 'Al-Ikhlas',
      bosnian: 'Iskrenost',
      bosnianTranscription: 'El-Ihlas'
    },
    {
      arabic: 'الفلق',
      english: 'The Daybreak',
      englishTranscription: 'Al-Falaq',
      bosnian: 'Svitanje',
      bosnianTranscription: 'El-Felek'
    },
    {
      arabic: 'الناس',
      english: 'The Mankind',
      englishTranscription: 'An-Nas',
      bosnian: 'Ljudi',
      bosnianTranscription: 'En-Nas'
    }
  ],
  juz: 30,
  wordsNumber: 58,
  lettersNumber: 201
  firstAyahIndex: 6222,
  lastAyahIndex: 6236
}

  getSuraStartPage,
  getJuzStartPage,
  getHizbStartPage,
  getManzilStartPage,
  getSuraStartEndAyahIndex,
  getJuzStartEndAyahIndex,
  getHizbStartEndAyahIndex,
  getPageStartEndAyahIndex

License

MIT