Zero-dependency TypeScript library for Islamic prayer time calculations. Functional API, tree-shakeable, native TypeScript.
- 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.)
npm install prayer-times-jsimport { 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' }MIT