tauqeet-js 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # 🌌 Tauqeet.js
2
+
3
+ **Tauqeet.js** is a high-precision, low-code JavaScript library for Islamic prayer times and astronomical ephemeris. Built on the gold-standard algorithms of **Jean Meeus**, it provides sub-second accuracy for global prayer times, solar/lunar positioning, and Qibla direction.
4
+
5
+ [![NPM Version](https://img.shields.io/npm/v/tauqeet-js)](https://www.npmjs.com/package/tauqeet-js)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ## ✨ Why Tauqeet.js?
9
+ In Urdu and Arabic, *Tauqeet* refers to the science of timekeeping, specifically for religious purposes. This library is designed to bring that ancient precision to the modern web with a focus on:
10
+ - **Sub-Second Precision:** Uses Successive Approximation loops for perfect convergence.
11
+ - **Topocentric Accuracy:** Accounts for refraction, solar semidiameter, parallax, and **Altitude (Elevation)**.
12
+ - **Low-Code API:** Get results in one line of code.
13
+ - **Robust:** Hardened against division-by-zero errors at poles and extreme latitudes.
14
+
15
+ ## 🚀 Quick Start (One-Liner)
16
+
17
+ ```javascript
18
+ import { calculate } from 'tauqeet-js';
19
+
20
+ // Get times for London (51.5, -0.1) using the Karachi method
21
+ const times = calculate(51.5074, -0.1278);
22
+
23
+ console.log(times.fajr);
24
+ ```
25
+
26
+ ## 🛠️ Advanced Features
27
+
28
+ ### 1. Elevation / Altitude Support
29
+ Tauqeet.js handles the "Dip of the Horizon" based on your vertical height.
30
+ ```javascript
31
+ const times = calculate(31.4, 73.0, 'Karachi', 'Hanafi', new Date(), 1000); // 1000 meters elevation
32
+ ```
33
+
34
+ ### 2. High-Level Config
35
+ ```javascript
36
+ import { getPrayerTimes } from 'tauqeet-js';
37
+
38
+ const schedule = getPrayerTimes({
39
+ location: { latitude: 31.4, longitude: 73.0, elevation: 500 },
40
+ method: 'MWL',
41
+ madhab: 'Hanafi',
42
+ date: new Date()
43
+ });
44
+ ```
45
+
46
+ ### 3. High-Precision Astronomy
47
+ Access coordinates for the Sun, Moon (including phases), and Polaris.
48
+ ```javascript
49
+ import { AstronomyClass } from 'tauqeet-js';
50
+
51
+ const astro = new AstronomyClass();
52
+ console.log(astro.moon.illumination); // Current moon phase %
53
+ console.log(astro.sun.GHA); // Sun Greenwich Hour Angle
54
+ ```
55
+
56
+ ### 4. Qibla Direction
57
+ Calculates Great Circle bearing and Distance to Makkah.
58
+ ```javascript
59
+ import { calculateQibla } from 'tauqeet-js';
60
+
61
+ const qibla = calculateQibla({ latitude: 31.4, longitude: 73.0 });
62
+ console.log(qibla.bearing); // Bearing from North
63
+ console.log(qibla.distance); // KM to Kaaba
64
+ ```
65
+
66
+ ## 📐 Accuracy Benchmark
67
+ This library aligns with:
68
+ - **Astro-Almanac HP** (Henning Umland)
69
+ - **Jean Meeus** (Astronomical Algorithms)
70
+ - **Islamic Standard Methods** (Karachi, MWL, ISNA, Egypt, Tehran, Jafari, Makkah)
71
+
72
+ ## 📄 License
73
+ MIT © 2026 Ghulam Hasnain.