1.1.7 • Published 8 years ago

azhan-jo v1.1.7

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

Azhan Jo

Get azhan times in Amman

Install Globally

To be able to get azhan's times in your cli you have to install the package globally

npm install azhan-jo -g

To fetch and print prayer times you can use one of the commands

azhan or adan or adhan

Usage

Install the package to your project

npm install azhan-jo

Sample Code

var azhan = require('azhan-jo');

azhan.getPrayerTimes().then(function(results) {
  console.log(results);
}).catch(function(error) {
  console.log(error);  
});

Methods

getTitles()

Return an array of prayer titles 'fajr', 'sunrise', 'dhuhr', 'asr', 'maghrib', 'isha'

console.log(azhan.getTitles());

getPrayerTimes()

Fetch, parse, and return an object of prayer times through Promise object.

azhan.getPrayerTimes().then(function(results) {
  console.log(results);
}).catch(function(error) {
  console.log(error);  
});

getPrayerTime(title)

Fetch, parse, and return an the time for a specefic prayer by its title through Promise object.

azhan.getPrayerTime('fajr').then(function(result) {
  console.log(result);
}).catch(function(error) {
  console.log(error);  
});

License

This project is under the MIT license, so feel free to use it.

1.1.7

8 years ago

1.1.6

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago