🕌 Sunan Abi Dawud
📚 Complete Sunan Abi Dawud for JavaScript — CLI, Node.js, React, Vue, and every bundler. Tiny package, data served from CDN.
📊 Package Statistics
| Metric | Value | Description |
|---|---|---|
| 📚 Total Hadiths | 5,274 | Complete Sunan Abi Dawud collection |
| 📝 Chapters | 1,871 | Detailed chapter organization |
| 📦 Package Size | ~3KB | Core package — data loads from CDN |
| 🔧 Dependencies | 0 | Zero external dependencies |
| 🌐 Bilingual | ✅ | Full Arabic text + English translations |
| 📘 TypeScript | ✅ | Built-in type definitions |
🚀 Installation
npm install sunan-abi-dawud # local
npm install -g sunan-abi-dawud # global CLI
🖥️ CLI Usage
dawud 1 # First hadith
dawud 2345 # Hadith #2345
dawud 23 34 # 34th hadith of chapter 23
dawud 2345 -a # Arabic only
dawud 2345 -b # Arabic + English
dawud --react # Generate React hook in current project
dawud --help
dawud --version
⚛️ React / Vue / Vite
cd my-react-app
dawud --react
# ✓ Generated: src/hooks/useDawud.js
import { useDawud } from '../hooks/useDawud';
function HadithOfTheDay() {
const dawud = useDawud();
if (!dawud) return <p>Loading...</p>;
const hadith = dawud.getRandom();
return (
<div>
<p><strong>{hadith.english.narrator}</strong></p>
<p>{hadith.english.text}</p>
</div>
);
}
🟩 Node.js Usage
// CommonJS
const dawud = require('sunan-abi-dawud');
console.log(dawud.get(1));
console.log(dawud.search('prayer'));
console.log(dawud.getRandom());
console.log(dawud.getByChapter(1));
console.log(dawud.length);
// ESM
import dawud from 'sunan-abi-dawud';
const hadith = dawud.get(23);
console.log(hadith.english.text);
🛠️ API Reference
| Method / Property | Description |
|---|---|
dawud[0] |
Hadith at index 0 |
dawud.get(id) |
Hadith by ID |
dawud.getByChapter(id) |
All hadiths in a chapter |
dawud.search(query) |
Full-text search |
dawud.getRandom() |
Random hadith |
dawud.length |
Total hadiths |
dawud.metadata |
Book metadata |
dawud.chapters |
All chapters |
All native array methods work: find, filter, map, forEach, slice.
📐 Data Structure
{
"id": 1,
"chapterId": 1,
"arabic": "حَدَّثَنَا...",
"english": {
"narrator": "Abu Huraira",
"text": "The Prophet (ﷺ) said..."
}
}
📄 License
GNU Affero General Public License v3.0 (AGPL-3.0)
Metadata
Release files for sunan-abi-dawud 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sunan_abi_dawud-1.0.5.tar.gz | 1.7 MB | Without provenance | Details for sunan_abi_dawud-1.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sunan_abi_dawud-1.0.5-py3-none-any.whl | Python 3 | none | any | Details for sunan_abi_dawud-1.0.5-py3-none-any.whl |
Total release size: 3.4 MB
Release files / sunan_abi_dawud-1.0.5.tar.gz
| Download URL | sunan_abi_dawud-1.0.5.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4eb2330e8b4683e446ac464a4e14ae2e45f18f968f6c1a0758721ba06f992f46
|
|
BLAKE2b-256 checksum How to use checksums |
c6e097d4610e8a59549b2e646711677e54805a0de0137d6cdff2f8caaa99e0ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / sunan_abi_dawud-1.0.5-py3-none-any.whl
| Download URL | sunan_abi_dawud-1.0.5-py3-none-any.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4dd8b03066b58a58958691d96e980674f8c8ef84e886ec6eae00e9e640fce076
|
|
BLAKE2b-256 checksum How to use checksums |
8c0b3bff3fc16f1b89b87cebb178bc5c0bfc3bd16a7a2eede4f8b5c1d17c6e57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for sunan-abi-dawud 1.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.