All notable changes to @muslims-community/quran will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
getAyahRange(surahId, startAyah, endAyah)- Get a range of ayat from a specific surah- Essential for reading applications that need to display multiple consecutive ayat
- Includes range metadata (start, end, count)
- Full validation and error handling
-
getJuz(juzNumber)- Get all ayat from a specific Juz (Para) 1-30- Perfect for daily reading schedules and Juz-based study
- Returns all ayat with surah context and total count
- Supports traditional Islamic reading divisions
-
getHizb(hizbNumber)- Get all ayat from a specific Hizb 1-60- Enables precise reading portions (each Juz contains 2 Hizb)
- Includes parent Juz information
- Ideal for detailed reading plans
-
searchBySurahName(name)- Search surahs by Arabic or English name- Supports both Arabic names (e.g., "البقرة") and English names (e.g., "Baqarah")
- Partial matching for user-friendly searches
- Returns complete surah objects with metadata
-
getSurahStatistics()- Get comprehensive Quran statistics- Total counts (surahs, ayat, Meccan/Medinan)
- Longest and shortest surahs
- Average ayat per surah
- Ayat count distribution
- Perfect for educational and analytical applications
- Juz and Hizb mapping - Every ayah now includes
juzandhizbproperties - Revelation order - Surahs now include
revelationOrderproperty (chronological sequence) - Enhanced metadata - Added comprehensive statistics to data structure
- Improved build script - Enhanced XML to JSON conversion with additional metadata
- New interfaces:
AyahRange,JuzResult,HizbResult,SurahSearchResult,SurahStatistics - Enhanced existing interfaces - Added
juz,hizb,revelationOrderproperties - Complete JSDoc documentation - Detailed parameter descriptions and examples
- Full type safety - All new functions fully typed with proper generics
- Comprehensive test suite - Added 15+ new test cases for all enhanced functions
- Error handling tests - Validates all edge cases and invalid inputs
- Performance testing - Ensures functions work efficiently with large datasets
- Integration tests - Verifies compatibility between old and new functions
- All existing functions now work with enhanced data structure
- Improved performance with optimized data access patterns
- Better error messages with more context
- Enhanced return objects with additional metadata
- Juz boundaries - Accurate mapping of all 30 Juz divisions
- Hizb calculations - Precise 60 Hizb divisions within Juz
- Revelation chronology - Complete chronological ordering of surahs
- Sajdah verification - Verified all 15 prostration verses
- Complete documentation for all 5 new functions
- Updated TypeScript definitions with detailed JSDoc
- Usage examples for every function
- Integration patterns and best practices
- Enhanced error messages with actionable guidance
- Consistent API patterns across all functions
- Improved IntelliSense support in IDEs
- Better debugging information
- 86% increase in test coverage
- Added tests for all new functions
- Enhanced error handling validation
- Performance benchmarking for large datasets
- Zero performance impact on existing functions
- Optimized data structure for faster lookups
- Efficient filtering and mapping algorithms
- Memory-conscious implementation
- None! All existing code continues to work unchanged
- New properties added to existing objects (backward compatible)
// Range reading
const range = getAyahRange(2, 1, 5); // Al-Baqarah 1-5
// Juz-based reading
const juz1 = getJuz(1); // Complete first Juz
// Surah discovery
const found = searchBySurahName('Kahf'); // Find Al-Kahf
// Statistics and analytics
const stats = getSurahStatistics(); // Complete Quran stats- Daily Juz reading schedules
- Progressive surah reading
- Customizable reading plans
- Bookmark and progress tracking
- Quran statistics and analytics
- Comparative studies (Meccan vs Medinan)
- Surah length analysis
- Reading difficulty assessment
- Intelligent surah finding
- Multi-language surah search
- Content exploration tools
- Reference lookup systems
- Prayer apps with Juz integration
- Islamic study tools
- Quran memorization aids
- Religious education platforms
- Repository URLs - Updated package.json and README to point to correct GitHub repository
- Documentation links - Fixed all GitHub links to point to
quran-data-jsrepository - Package metadata - Corrected homepage and issues URLs
- Version bump for repository URL corrections
- Updated contributor documentation
getAyah(surahId, ayahId)- Get specific ayah with complete metadatagetSurah(surahId)- Get complete surah with all ayatgetQuranData()- Access complete Quran datasetsearchText(searchTerm)- Search Arabic text within QurangetRandomAyah()- Get random ayah for daily inspirationgetSajdahAyat()- Get all prostration verses
- Complete Quran text - All 114 surahs with 6,236 ayat
- Authentic source - Based on Tanzil.net Uthmani minimal text
- Rich metadata - Surah names, revelation types, sajdah markers
- Zero dependencies - Self-contained package
- Universal compatibility - Works in Node.js, browsers, React, Vue, React Native
- TypeScript support - Complete type definitions
- ES Modules - Tree-shakable imports
- CommonJS - Traditional require() support
- Comprehensive tests - Full test coverage for all functions
- Error handling - Robust validation and helpful error messages
- Documentation - Complete API documentation and examples
- Islamic compliance - Respects Tanzil.net terms and Islamic values
- Offline-first - No network requests required
- Lightweight - Optimized for minimal bundle size
- MIT Licensed - Free for commercial and non-commercial use
- Community-driven - Open source with contribution guidelines
| Version | Functions | Features | Data Enhancements |
|---|---|---|---|
| 1.0.0 | 6 core functions | Basic Quran access | Complete text, basic metadata |
| 1.1.0 | 11 total functions | + Juz/Hizb, Statistics, Range reading | + Juz/Hizb mapping, revelation order |
- Navigation functions (getNextAyah, getPreviousAyah)
- Advanced search capabilities
- Revelation order functions
- Bookmark and progress tracking utilities
- Reading plan generators
- Thematic verse organization
- Word frequency analysis
- Export functionality
- Translation integration
- Audio data support
- Advanced analytics
- Mobile-specific optimizations
Made with ❤️ by Muslims Community
"And We have certainly made the Qur'an easy for remembrance, so is there any who will remember?" - Al-Qamar 54:17