@kmaslesa/holy-quran-word-by-word-full-data
v1.0.6
Published
Qur'an words
Downloads
14
Maintainers
Readme
بسم الله الرحمن الرحيم
Holy Quran - word by word
Installation
npm i @kmaslesa/holy-quran-word-by-word-full-data
Usage
const quranWords = require('@kmaslesa/holy-quran-word-by-word-full-data');
quranWords.getAllQuranWords().then((data: QuranData) => {
console.log(JSON.stringify(data));
});
quranWords.getWordsByPage(page).then((data: QuranData) => { //page = (1-604)
console.log(JSON.stringify(data));
});
INTERFACES
export interface QuranData {
ayahs?: Ayah[] | null;
page: number;
}
export interface Ayah {
words?: (Word | null)[] | null;
metaData: MetaData;
}
export interface Word {
id: number;
position: number;
audio_url?: string | null;
char_type_name: string;
code_v1: string;
page_number: number;
line_number: number;
text: string;
translation: TranslationOrTransliteration;
transliteration: Transliteration;
parentAyahVerseKey: string;
ayahIndex: number;
}
export interface TranslationOrTransliteration {
text: string;
language_name: string;
}
export interface Transliteration {
text?: string | null;
language_name: string;
}
export interface MetaData {
lineType?: string | null;
suraName?: string | null;
}
quranWords.getAllQuranWords().then((data: QuranData) => {
console.log(JSON.stringify(data));
});
RESPONSE: [
{
ayahs: [
{
words: [],
metaData: {
lineType: 'start_sura',
suraName: 'الفاتحة - Al-Fatihah',
},
},
{
words: [
{
id: 1,
position: 1,
audio_url: 'wbw/001_001_001.mp3',
char_type_name: 'word',
code_v1: 'ﭑ',
page_number: 1,
line_number: 2,
text: 'ﭑ',
translation: {
text: 'In (the) name',
language_name: 'english',
},
transliteration: {
text: "bis'mi",
language_name: 'english',
},
parentAyahVerseKey: '1:1',
ayahIndex: 1,
},
{
id: 2,
position: 2,
audio_url: 'wbw/001_001_002.mp3',
char_type_name: 'word',
code_v1: 'ﭒ',
page_number: 1,
line_number: 2,
text: 'ﭒ',
translation: {
text: '(of) Allah',
language_name: 'english',
},
transliteration: {
text: 'l-lahi',
language_name: 'english',
},
parentAyahVerseKey: '1:1',
ayahIndex: 1,
},
{
id: 3,
position: 3,
audio_url: 'wbw/001_001_003.mp3',
char_type_name: 'word',
code_v1: 'ﭓ',
page_number: 1,
line_number: 2,
text: 'ﭓ',
translation: {
text: 'the Most Gracious',
language_name: 'english',
},
transliteration: {
text: 'l-raḥmāni',
language_name: 'english',
},
parentAyahVerseKey: '1:1',
ayahIndex: 1,
},
{
id: 4,
position: 4,
audio_url: 'wbw/001_001_004.mp3',
char_type_name: 'word',
code_v1: 'ﭔ',
page_number: 1,
line_number: 2,
text: 'ﭔ',
translation: {
text: 'the Most Merciful',
language_name: 'english',
},
transliteration: {
text: 'l-raḥīmi',
language_name: 'english',
},
parentAyahVerseKey: '1:1',
},
{
id: 5,
position: 5,
audio_url: null,
char_type_name: 'end',
code_v1: 'ﭕ',
page_number: 1,
line_number: 2,
text: 'ﭕ',
translation: {
text: '(1)',
language_name: 'english',
},
transliteration: {
text: null,
language_name: 'english',
},
parentAyahVerseKey: '1:1',
},
],
metaData: {},
},
{
words: [
{
id: 1130,
position: 1,
audio_url: 'wbw/001_002_001.mp3',
char_type_name: 'word',
code_v1: 'ﭖ',
page_number: 1,
line_number: 3,
text: 'ﭖ',
translation: {
text: 'All praises and thanks',
language_name: 'english',
},
transliteration: {
text: 'al-ḥamdu',
language_name: 'english',
},
parentAyahVerseKey: '1:2',
},
{
id: 1131,
position: 2,
audio_url: 'wbw/001_002_002.mp3',
char_type_name: 'word',
code_v1: 'ﭗ',
page_number: 1,
line_number: 3,
text: 'ﭗ',
translation: {
text: '(be) to Allah',
language_name: 'english',
},
transliteration: {
text: 'lillahi',
language_name: 'english',
},
parentAyahVerseKey: '1:2',
},
{
id: 1132,
position: 3,
audio_url: 'wbw/001_002_003.mp3',
char_type_name: 'word',
code_v1: 'ﭘ',
page_number: 1,
line_number: 3,
text: 'ﭘ',
translation: {
text: 'the Lord',
language_name: 'english',
},
transliteration: {
text: 'rabbi',
language_name: 'english',
},
parentAyahVerseKey: '1:2',
},
{
id: 1133,
position: 4,
audio_url: 'wbw/001_002_004.mp3',
char_type_name: 'word',
code_v1: 'ﭙ',
page_number: 1,
line_number: 3,
text: 'ﭙ',
translation: {
text: 'of the universe',
language_name: 'english',
},
transliteration: {
text: 'l-ʿālamīna',
language_name: 'english',
},
parentAyahVerseKey: '1:2',
},
{
id: 1134,
position: 5,
audio_url: null,
char_type_name: 'end',
code_v1: 'ﭚ',
page_number: 1,
line_number: 3,
text: 'ﭚ',
translation: {
text: '(2)',
language_name: 'english',
},
transliteration: {
text: null,
language_name: 'english',
},
parentAyahVerseKey: '1:2',
},
],
metaData: {},
},
{
words: [
{
id: 2953,
position: 1,
audio_url: 'wbw/001_003_001.mp3',
char_type_name: 'word',
code_v1: 'ﭛ',
page_number: 1,
line_number: 4,
text: 'ﭛ',
translation: {
text: 'The Most Gracious',
language_name: 'english',
},
transliteration: {
text: 'al-raḥmāni',
language_name: 'english',
},
parentAyahVerseKey: '1:3',
},
{
id: 2954,
position: 2,
audio_url: 'wbw/001_003_002.mp3',
char_type_name: 'word',
code_v1: 'ﭜ',
page_number: 1,
line_number: 4,
text: 'ﭜ',
translation: {
text: 'the Most Merciful',
language_name: 'english',
},
transliteration: {
text: 'l-raḥīmi',
language_name: 'english',
},
parentAyahVerseKey: '1:3',
},
{
id: 2955,
position: 3,
audio_url: null,
char_type_name: 'end',
code_v1: 'ﭝ',
page_number: 1,
line_number: 4,
text: 'ﭝ',
translation: {
text: '(3)',
language_name: 'english',
},
transliteration: {
text: null,
language_name: 'english',
},
parentAyahVerseKey: '1:3',
},
{
id: 3252,
position: 1,
audio_url: 'wbw/001_004_001.mp3',
char_type_name: 'word',
code_v1: 'ﭞ',
page_number: 1,
line_number: 4,
text: 'ﭞ',
translation: {
text: '(The) Master',
language_name: 'english',
},
transliteration: {
text: 'māliki',
language_name: 'english',
},
parentAyahVerseKey: '1:4',
},
{
id: 3253,
position: 2,
audio_url: 'wbw/001_004_002.mp3',
char_type_name: 'word',
code_v1: 'ﭟ',
page_number: 1,
line_number: 4,
text: 'ﭟ',
translation: {
text: '(of the) Day',
language_name: 'english',
},
transliteration: {
text: 'yawmi',
language_name: 'english',
},
parentAyahVerseKey: '1:4',
},
{
id: 3254,
position: 3,
audio_url: 'wbw/001_004_003.mp3',
char_type_name: 'word',
code_v1: 'ﭠ',
page_number: 1,
line_number: 4,
text: 'ﭠ',
translation: {
text: '(of the) Judgment',
language_name: 'english',
},
transliteration: {
text: 'l-dīni',
language_name: 'english',
},
parentAyahVerseKey: '1:4',
},
{
id: 3255,
position: 4,
audio_url: null,
char_type_name: 'end',
code_v1: 'ﭡ',
page_number: 1,
line_number: 4,
text: 'ﭡ',
translation: {
text: '(4)',
language_name: 'english',
},
transliteration: {
text: null,
language_name: 'english',
},
parentAyahVerseKey: '1:4',
},
],
metaData: {},
},
{
words: [
{
id: 5334,
position: 1,
audio_url: 'wbw/001_005_001.mp3',
char_type_name: 'word',
code_v1: 'ﭢ',
page_number: 1,
line_number: 5,
text: 'ﭢ',
translation: {
text: 'You Alone',
language_name: 'english',
},
transliteration: {
text: 'iyyāka',
language_name: 'english',
},
parentAyahVerseKey: '1:5',
},
{
id: 5335,
position: 2,
audio_url: 'wbw/001_005_002.mp3',
char_type_name: 'word',
code_v1: 'ﭣ',
page_number: 1,
line_number: 5,
text: 'ﭣ',
translation: {
text: 'we worship',
language_name: 'english',
},
transliteration: {
text: 'naʿbudu',
language_name: 'english',
},
parentAyahVerseKey: '1:5',
},
{
id: 5336,
position: 3,
audio_url: 'wbw/001_005_003.mp3',
char_type_name: 'word',
code_v1: 'ﭤ',
page_number: 1,
line_number: 5,
text: 'ﭤ',
translation: {
text: 'and You Alone',
language_name: 'english',
},
transliteration: {
text: 'wa-iyyāka',
language_name: 'english',
},
parentAyahVerseKey: '1:5',
},
{
id: 5337,
position: 4,
audio_url: 'wbw/001_005_004.mp3',
char_type_name: 'word',
code_v1: 'ﭥ',
page_number: 1,
line_number: 5,
text: 'ﭥ',
translation: {
text: 'we ask for help',
language_name: 'english',
},
transliteration: {
text: 'nastaʿīnu',
language_name: 'english',
},
parentAyahVerseKey: '1:5',
},
{
id: 5338,
position: 5,
audio_url: null,
char_type_name: 'end',
code_v1: 'ﭦ',
page_number: 1,
line_number: 5,
text: 'ﭦ',
translation: {
text: '(5)',
language_name: 'english',
},
transliteration: {
text: null,
language_name: 'english',
},
parentAyahVerseKey: '1:5',
},
{
id: 6844,
position: 1,
audio_url: 'wbw/001_006_001.mp3',
char_type_name: 'word',
code_v1: 'ﭧ',
page_number: 1,
line_number: 5,
text: 'ﭧ',
translation: {
text: 'Guide us',
language_name: 'english',
},
transliteration: {
text: "ih'dinā",
language_name: 'english',
},
parentAyahVerseKey: '1:6',
},
],
metaData: {},
},
{
words: [
{
id: 6845,
position: 2,
audio_url: 'wbw/001_006_002.mp3',
char_type_name: 'word',
code_v1: 'ﭨ',
page_number: 1,
line_number: 6,
text: 'ﭨ',
translation: {
text: '(to) the path',
language_name: 'english',
},
transliteration: {
text: 'l-ṣirāṭa',
language_name: 'english',
},
parentAyahVerseKey: '1:6',
},
{
id: 6846,
position: 3,
audio_url: 'wbw/001_006_003.mp3',
char_type_name: 'word',
code_v1: 'ﭩ',
page_number: 1,
line_number: 6,
text: 'ﭩ',
translation: {
text: 'the straight',
language_name: 'english',
},
transliteration: {
text: "l-mus'taqīma",
language_name: 'english',
},
parentAyahVerseKey: '1:6',
},
{
id: 6847,
position: 4,
audio_url: null,
char_type_name: 'end',
code_v1: 'ﭪ',
page_number: 1,
line_number: 6,
text: 'ﭪ',
translation: {
text: '(6)',
language_name: 'english',
},
transliteration: {
text: null,
language_name: 'english',
},
parentAyahVerseKey: '1:6',
},
{
id: 8411,
position: 1,
audio_url: 'wbw/001_007_001.mp3',
char_type_name: 'word',
code_v1: 'ﭫ',
page_number: 1,
line_number: 6,
text: 'ﭫ',
translation: {
text: '(The) path',
language_name: 'english',
},
transliteration: {
text: 'ṣirāṭa',
language_name: 'english',
},
parentAyahVerseKey: '1:7',
},
{
id: 8412,
position: 2,
audio_url: 'wbw/001_007_002.mp3',
char_type_name: 'word',
code_v1: 'ﭬ',
page_number: 1,
line_number: 6,
text: 'ﭬ',
translation: {
text: '(of) those',
language_name: 'english',
},
transliteration: {
text: 'alladhīna',
language_name: 'english',
},
parentAyahVerseKey: '1:7',
},
{
id: 8413,
position: 3,
audio_url: 'wbw/001_007_003.mp3',
char_type_name: 'word',
code_v1: 'ﭭ',
page_number: 1,
line_number: 6,
text: 'ﭭ',
translation: {
text: 'You have bestowed (Your) Favors',
language_name: 'english',
},
transliteration: {
text: 'anʿamta',
language_name: 'english',
},
parentAyahVerseKey: '1:7',
},
],
metaData: {},
},
{
words: [
{
id: 8414,
position: 4,
audio_url: 'wbw/001_007_004.mp3',
char_type_name: 'word',
code_v1: 'ﭮ',
page_number: 1,
line_number: 7,
text: 'ﭮ',
translation: {
text: 'on them',
language_name: 'english',
},
transliteration: {
text: 'ʿalayhim',
language_name: 'english',
},
parentAyahVerseKey: '1:7',
},
{
id: 8415,
position: 5,
audio_url: 'wbw/001_007_005.mp3',
char_type_name: 'word',
code_v1: 'ﭯ',
page_number: 1,
line_number: 7,
text: 'ﭯ',
translation: {
text: 'not (of)',
language_name: 'english',
},
transliteration: {
text: 'ghayri',
language_name: 'english',
},
parentAyahVerseKey: '1:7',
},
{
id: 8416,
position: 6,
audio_url: 'wbw/001_007_006.mp3',
char_type_name: 'word',
code_v1: 'ﭰ',
page_number: 1,
line_number: 7,
text: 'ﭰ',
translation: {
text: 'those who earned (Your) wrath',
language_name: 'english',
},
transliteration: {
text: 'l-maghḍūbi',
language_name: 'english',
},
parentAyahVerseKey: '1:7',
},
{
id: 8417,
position: 7,
audio_url: 'wbw/001_007_007.mp3',
char_type_name: 'word',
code_v1: 'ﭱ',
page_number: 1,
line_number: 7,
text: 'ﭱ',
translation: {
text: 'on themselves',
language_name: 'english',
},
transliteration: {
text: 'ʿalayhim',
language_name: 'english',
},
parentAyahVerseKey: '1:7',
},
],
metaData: {},
},
{
words: [
{
id: 8418,
position: 8,
audio_url: 'wbw/001_007_008.mp3',
char_type_name: 'word',
code_v1: 'ﭲ',
page_number: 1,
line_number: 8,
text: 'ﭲ',
translation: {
text: 'and not',
language_name: 'english',
},
transliteration: {
text: 'walā',
language_name: 'english',
},
parentAyahVerseKey: '1:7',
},
{
id: 8419,
position: 9,
audio_url: 'wbw/001_007_009.mp3',
char_type_name: 'word',
code_v1: 'ﭳ',
page_number: 1,
line_number: 8,
text: 'ﭳ',
translation: {
text: '(of) those who go astray',
language_name: 'english',
},
transliteration: {
text: 'l-ḍālīna',
language_name: 'english',
},
parentAyahVerseKey: '1:7',
},
{
id: 8420,
position: 10,
audio_url: null,
char_type_name: 'end',
code_v1: 'ﭴ',
page_number: 1,
line_number: 8,
text: 'ﭴ',
translation: {
text: '(7)',
language_name: 'english',
},
transliteration: {
text: null,
language_name: 'english',
},
parentAyahVerseKey: '1:7',
},
],
metaData: {},
},
],
page: 1,
},
{
ayahs: [...],
page: 2
},
{
ayahs: [...],
page: 3
},
];
Transform data
quranWords.getAllQuranWords().then((data: QuranData[]) => {
const newQuranData = data.map((page: QuranData) => ({
page: page.page,
ayahs: page.ayahs?.map((ayah: Ayah) => ({
metaData: ayah.metaData,
words: ayah.words?.map(word => ({
codeV1: word?.code_v1,
audio: word?.audio_url,
charType: word?.char_type_name,
ayahKey: word?.parentAyahVerseKey,
//add more..
})),
})),
}));
});