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

@shkomaghdid/react-native-prayer-times

v1.0.1

Published

React Native library providing Prayer Times, Offline Geocoder, Names of Allah, and Azkars (Hisnul Muslim)

Readme

@shkomaghdid/react-native-prayer-times

A React Native library providing Islamic data offline — no API keys, no network required.

  • Prayer Times — fixed (database) and calculated using 7 methods
  • Offline Geocoder — search, geocode, and reverse-geocode 6700+ cities
  • 99 Names of Allah — with translations and transliterations
  • Azkars (Hisnul Muslim) — categories, chapters, and items

All data is available in 6 languages: English, Arabic, Kurdish (Sorani), Kurdish (Badini), Farsi, and Russian.

Installation

npm install @shkomaghdid/react-native-prayer-times @op-engineering/op-sqlite

Then link the bundled database into your native projects:

npx react-native-asset

@op-engineering/op-sqlite is the only peer dependency.

Quick Start

import { MuslimDb, LocationRepository, PrayerTimeRepository, createPrayerAttribute } from '@shkomaghdid/react-native-prayer-times';

// 1. Open once at app startup (async — copies DB from assets on first launch)
await MuslimDb.getInstance().open();

// 2. Use any repository
const location = LocationRepository.getInstance().geocoder('GB', 'London');

const prayers = PrayerTimeRepository.getInstance().getPrayerTimes({
  location: location!,
  date: new Date(),
  attribute: createPrayerAttribute(),
});

console.log(prayers?.fajr);   // Date object
console.log(prayers?.dhuhr);  // Date object

API

MuslimDb

| Method | Description | |--------|-------------| | getInstance() | Singleton accessor | | open(): Promise<void> | Open the database (call once at startup) | | close(): void | Close the database connection |

LocationRepository

| Method | Returns | |--------|---------| | searchLocations(name) | Location[] | | geocoder(countryCode, cityName) | Location \| null | | reverseGeocoder(lat, lng) | Location \| null | | getFixedPrayerTimesList() | Location[] |

PrayerTimeRepository

| Method | Returns | |--------|---------| | getPrayerTimes({ location, date, attribute, useFixedPrayer? }) | PrayerTime \| null |

PrayerTime contains: fajr, sunrise, dhuhr, asr, maghrib, isha — all Date objects.

NameOfAllahRepository

| Method | Returns | |--------|---------| | getNames(language?) | NameOfAllah[]{ id, name, translation, transliteration } |

HisnulMuslimRepository

| Method | Returns | |--------|---------| | getAzkarCategories(language?) | AzkarCategory[] | | getAzkarChapters({ language?, categoryId? }) | AzkarChapter[] | | getAzkarChaptersByIds({ language?, chapterIds }) | AzkarChapter[] | | searchAzkarChapters({ language?, query }) | AzkarChapter[] | | getAzkarItems({ language?, chapterId }) | AzkarItem[] |

Calculation Methods

| Key | Description | |-----|-------------| | makkah | Umm al-Qura, Makkah | | mwl | Muslim World League | | isna | Islamic Society of North America | | karachi | University of Islamic Sciences, Karachi | | egypt | Egyptian General Authority of Survey | | jafari | Ithna Ashari | | tehran | Institute of Geophysics, University of Tehran | | custom | Custom fajr/isha angles |

Prayer Attribute

import { createPrayerAttribute, CalculationMethod, AsrMethod, HigherLatitudeMethod } from '@shkomaghdid/react-native-prayer-times';

const attribute = createPrayerAttribute({
  calculationMethod: CalculationMethod.mwl,      // default: makkah
  asrMethod: AsrMethod.shafii,                    // default: shafii
  higherLatitudeMethod: HigherLatitudeMethod.angleBased, // default: angleBased
  offset: [0, 0, 0, 0, 0, 0],                    // [fajr, sunrise, dhuhr, asr, maghrib, isha] in minutes
});

Language

import { Language } from '@shkomaghdid/react-native-prayer-times';

Language.en           // English
Language.ar           // Arabic
Language.ckb          // Kurdish (Sorani)
Language.ckbBadini    // Kurdish (Badini)
Language.fa           // Farsi
Language.ru           // Russian

How It Works

This package ships a pre-populated SQLite database (~28 MB) containing prayer times, location data, azkars, and names of Allah. On install, npx react-native-asset copies the database into your native project's asset directories. At runtime, open() moves it from native assets to the documents directory where the SQLite engine can read it.

Requirements

  • React Native >= 0.71
  • @op-engineering/op-sqlite >= 15.0.0

Demo App

See the My Prayers Test App for a full working example showcasing all features.

Credits

This package is a React Native port of muslim-data-flutter by Kosrat D. Ahmad. The database and prayer time calculation logic originate from that project.

License

MIT