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.jsimportAdhanAPIfrom"adhan.js";constapi=newAdhanAPI({latitude: 21.4225,longitude: 39.8262});consttimings=api.timings();console.log(timings);import{watchAdhan}from"adhan.js";forawait(consteventofwatchAdhan({latitude: 21.4225,longitude: 39.8262})){console.log(event);}import{watchDate}from"adhan.js";forawait(consteventofwatchDate({latitude: 21.4225,longitude: 39.8262})){console.log(event);}