@sofiakb/nemaaz
v1.0.2
Published
A typescript library for axios API calls.
Downloads
33
Readme
About The Library
The library gives you prayer times in a given position.
Built With
Prerequisites
- axios
- typescript
Installation
npm install --save @sofiakb/nemaaz
Usage
import {
AsrJuristic,
CalculationMethod,
CalculatorParams,
Coordinates,
HigherLatitudesAdjusting,
PrayerTimes,
TimeFormats,
} from '@sofiakb/nemaaz';
import { DateTime } from 'luxon';
import { mapValues } from 'lodash';
const date = DateTime.now().setZone('Europe/Paris');
const test = new PrayerTimes(
new CalculatorParams({
coordinates: new Coordinates({
latitude: 50.3555,
longitude: 3.11127,
}),
calculationMethod: CalculationMethod.mwl(),
adjustHighLats: HigherLatitudesAdjusting.ANGLE_BASED,
asrJuristic: AsrJuristic.SHAFI,
dhuhrMinutes: 0,
numIterations: 1,
timeFormat: TimeFormats.TIME24,
date: date.toJSDate(),
}),
);
console.log(mapValues(test.toJson(), (item) => DateTime.fromJSDate(item, { zone: 'Europe/Paris' }).toString()));
Roadmap
See the open issues for a list of proposed features (and known issues).
License
Distributed under the MIT License. See LICENSE
for more information.