adhan.js is a powerful Node.js module that allows you to easily interact with the Al-Adhan Prayer Times API.
- Object-oriented
- Predictable abstractions
- Performant
- 100% coverage of the Prayer Times API
Node.js 18 or newer is required.
npm install adhan.jsimport AdhanAPI from "adhan.js";
const api = new AdhanAPI({
latitude: 21.4225,
longitude: 39.8262
});
const timings = api.timings();
console.log(timings);import { watchAdhan } from "adhan.js";
for await (const event of watchAdhan({
latitude: 21.4225,
longitude: 39.8262
})) {
console.log(event);
}import { watchDate } from "adhan.js";
for await (const event of watchDate({
latitude: 21.4225,
longitude: 39.8262
})) {
console.log(event);
}