@kmaslesa/tajweed
v1.0.0
Published
Qur'an ayahs tajweed
Downloads
2
Maintainers
Readme
بسم الله الرحمن الرحيم
Quran Tajweed
Installation
npm i @kmaslesa/tajweed
Usage
const quranTajweed = require("@kmaslesa/tajweed");
quranTajweed.getAllAyahs()
quranTajweed.getAyahByIndex(ayahIndex: number, withParsedTajweed: boolean)
// Synchronous tests
try {
const allAyahs = quranTajweed.getAllAyahs();
console.log('Synchronous - All Ayahs:', allAyahs);
const ayah = quranTajweed.getAyahByIndex(5, true); // Replace 5 with the desired index
console.log('Synchronous - Ayah by Index:', ayah);
} catch (error) {
console.error('Synchronous Error:', error.message);
}
// Asynchronous tests
(async () => {
try {
const allAyahsAsync = await quranTajweed.getAllAyahsAsync();
console.log('Asynchronous - All Ayahs:', allAyahsAsync);
const ayahAsync = await quranTajweed.getAyahByIndexAsync(5); // Replace 10 with the desired index
console.log('Asynchronous - Ayah by Index:', ayahAsync);
} catch (error) {
console.error('Asynchronous Error:', error.message);
}
})();
const ayah = quranTajweed.getAyahByIndex(5, true)
RESPONSE:
إِيَّاكَ نَعْبُدُ وَإِيَّاكَ نَسْتَع<tajweed class="madda_permissible"
data-type="madda-permissible" data-description="Permissible Prolongation: 2, 4, 6 Vowels" data-tajwe
ed="">ِي</tajweed>نُ
const ayah = quranTajweed.getAyahByIndex(5)
RESPONSE:
إِيَّاكَ نَعْبُدُ وَإِيَّاكَ نَسْتَع[p[ِي]نُ
::ng-deep {
tajweed.ghn {
color: #ff7e1e;
&:hover {
background-color: #ff7e1e;
color: black;
}
}
tajweed.qlq {
color: #dd0008;
&:hover {
background-color: #f3a6a9;
color: #dd0008;
cursor: pointer;
}
}
tajweed.idgh_ghn {
color: #169200;
&:hover {
background-color: #9ce58e;
color: #169200;
cursor: pointer;
}
}
tajweed.idgh_w_ghn {
color: #169200;
&:hover {
background-color: #9ce58e;
color: #169200;
cursor: pointer;
}
}
tajweed.iqlb {
color: #26bffd;
&:hover {
background-color: #92e5ff;
color: #0099c5;
cursor: pointer;
}
}
tajweed.ikhf {
color: #9400a8;
&:hover {
background-color: #daa6e1;
color: #9400a8;
cursor: pointer;
}
}
tajweed.ikhf_shfw {
color: #d500b7;
&:hover {
background-color: #f0a6e6;
color: #d500b7;
cursor: pointer;
}
}
tajweed.idghm_shfw {
color: #58b800;
&:hover {
background-color: #bae890;
color: #58b800;
cursor: pointer;
}
}
tajweed.slnt {
color: #aaaaaa;
}
tajweed.ham_wasl {
color: #aaaaaa;
&:hover {
background-color: #d7d7d7;
}
}
tajweed.madda_necessary {
color: #000ebc;
}
tajweed.madda_obligatory {
color: #2144c1;
}
tajweed.madda_permissible {
color: #4050ff;
}
tajweed.madda_normal {
color: #537fff;
}
.idgh_mus {
color: #a1a1a1;
&:hover {
background-color: #d7d7d7;
}
}
}