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 🙏

© 2026 – Pkg Stats / Ryan Hefner

sunan-abi-dawud

v1.0.5

Published

Complete Sunan Abi Dawud. Offline-first, zero dependencies. CLI + Node + React/Vue/Vite.

Readme

npm version npm downloads npm downloads per month license node version bundle size GitHub stars

📚 Complete Sunan Abi Dawud for JavaScript — CLI, Node.js, React, Vue, and every bundler. Tiny package, data served from CDN.

NPM


📊 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)


Made with ❤️ for the Muslim community | Seeking knowledge together

GitHub stars