Skip to content

Passive-IT/prayer-times-js

Repository files navigation

prayer-times-js

Zero-dependency TypeScript library for Islamic prayer time calculations. Functional API, tree-shakeable, native TypeScript.

Features

  • Pure mathematical calculations (no external API calls)
  • Zero runtime dependencies
  • TypeScript-first with full type definitions
  • Tree-shakeable ESM and CJS builds
  • Browser and Node.js compatible
  • Supports multiple calculation methods (MWL, ISNA, Egypt, Makkah, Karachi, Tehran, etc.)

Installation

npm install prayer-times-js

Usage

import { getPrayerTimes } from 'prayer-times-js';

const times = getPrayerTimes({
  date: new Date(),
  latitude: 21.4225,
  longitude: 39.8262,
  method: 'makkah'
});

console.log(times);
// { fajr: '04:52', sunrise: '06:12', dhuhr: '12:27', asr: '15:45', maghrib: '18:42', isha: '20:12' }

License

MIT

About

Zero-dependency TypeScript library for Islamic prayer time calculations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors