thai-astrology 0.1.5 → 0.1.6
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/README.md +7 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Thai Astrology
|
|
2
2
|
|
|
3
|
-
Thai Astrology is a TypeScript library that recreates classical Thai astrological calculations. It converts birth details into the 12-channel chart, Tanuseth, planetary positions
|
|
3
|
+
Thai Astrology (โหราศาสตร์ไทย) is a TypeScript library that recreates classical Thai astrological calculations. It converts birth details into the 12-channel chart lakna, Tanuseth, planetary positions without relying on runtime dependencies.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
const chart = generateThaiAstrologyChart({
|
|
20
20
|
day: 15,
|
|
21
21
|
monthTh: 9,
|
|
22
|
-
yearBe: 2566, //
|
|
22
|
+
yearBe: 2566, // 2023 in BCE
|
|
23
23
|
hour: 14,
|
|
24
24
|
minute: 45,
|
|
25
25
|
province: "กรุงเทพมหานคร", // Bangkok
|
|
@@ -33,17 +33,6 @@ console.log(chart.sunPosition)
|
|
|
33
33
|
|
|
34
34
|
For BCE dates, supply `yearBc` instead of `yearBe`.
|
|
35
35
|
|
|
36
|
-
```ts
|
|
37
|
-
generateThaiAstrologyChart({
|
|
38
|
-
day: 21,
|
|
39
|
-
monthTh: 4,
|
|
40
|
-
yearBc: -320,
|
|
41
|
-
hour: 6,
|
|
42
|
-
minute: 30,
|
|
43
|
-
province: "เชียงใหม่",
|
|
44
|
-
})
|
|
45
|
-
```
|
|
46
|
-
|
|
47
36
|
Example output:
|
|
48
37
|
|
|
49
38
|
```text
|
|
@@ -56,6 +45,11 @@ Example output:
|
|
|
56
45
|
[ 27, 29 ]
|
|
57
46
|
```
|
|
58
47
|
|
|
48
|
+
## Key API
|
|
49
|
+
|
|
50
|
+
- `generateThaiAstrologyChart(input: CalculationInput): ThaiAstrologyChart` – runs the core calculations and returns planets, tanuseth,12 channel outputs, and ruling planets metadata when available.
|
|
51
|
+
- `formatChannelOutputs(chart, options?: { numerals?: "arabic" | "thai" } | "arabic" | "thai")` – strips channel labels and renders numbers in Arabic or Thai numerals.
|
|
52
|
+
|
|
59
53
|
## License
|
|
60
54
|
|
|
61
55
|
MIT © Contributors
|