deno.land / x / prayers@v1.6.0 / docs / api.md
new StaticCalculator(config: CalculationsConfig)Initializes a new StaticCalculator instance.
Parameters:
config: CalculationsConfigExample:
const calculator = new StaticCalculator({
/* config options */
})getQiblaDirection(coordinates?: CoordinatesObject): numberCalculates the Qibla direction.
Parameters:
coordinates: Optional. CoordinatesObjectExample:
const direction = calculator.getQiblaDirection()new ReactiveCalculator(config: CalculationsConfig)Initializes a new ReactiveCalculator instance.
cleanup(): voidCleans up all subscriptions.
Example:
reactiveCalculator.cleanup()calculateQibla(coordinates: CoordinatesObject): numberCalculates the Qibla direction based on the given coordinates.
Example:
const direction = calculateQibla({ latitude: 40.7128, longitude: -74.006 }){
latitude: number
longitude: number
}{
name: string
time: Date
}Version Info