western-signs 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.
Files changed (3) hide show
  1. package/README.md +43 -0
  2. package/dist/index.js +1 -0
  3. package/package.json +31 -0
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # Western signs
2
+
3
+ Simple interface for [western astrological](https://en.wikipedia.org/wiki/Western_astrology) signs.
4
+
5
+ The Western Signs library retrieves detailed information about a specific astrological sign, including its name, element, modality, ruling planet, symbol, etc. You can also specify the language for translations.
6
+
7
+ ## Installation
8
+
9
+ To install dependencies:
10
+
11
+ ```bash
12
+ npm install western-signs
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ To use the `getSignByName` function, import it along with the `SIGNS` constant from the `western-signs` package:
18
+
19
+ ```js
20
+ import { getSignByName, SIGNS } from 'western-signs'
21
+ ```
22
+
23
+ Call the function with the desired astrological sign and optionally specify a language code. If no language code is provided, it defaults to English.
24
+
25
+ ```js
26
+ const data = getSignByName(SIGNS.TAURUS)
27
+ ```
28
+
29
+ It should returns an object with the following properties:
30
+
31
+ ```js
32
+ {
33
+ name: 'Taurus',
34
+ element: 'Earth',
35
+ modality: 'Fixed',
36
+ rulingPlanet: 'Venus',
37
+ symbol: '♉'
38
+ }
39
+ ```
40
+
41
+ ## License
42
+
43
+ MIT License © 2024 [Marc Mariné](https://github.com/marcmarine)
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ var r={ARIES:"aries",TAURUS:"taurus",GEMINI:"gemini",CANCER:"cancer",LEO:"leo",VIRGO:"virgo",LIBRA:"libra",SCORPIO:"scorpio",SAGITTARIUS:"sagittarius",CAPRICORN:"capricorn",AQUARIUS:"aquarius",PISCES:"pisces"},o={MARS:"mars",VENUS:"venus",MERCURY:"mercury",MOON:"moon",SUN:"sun",PLUTO:"pluto",JUPITER:"jupiter",SATURN:"saturn",URANUS:"uranus",NEPTUNE:"neptune"},A={CARDINAL:"cardinal",FIXED:"fixed",MUTABLE:"mutable"},E={FIRE:"fire",EARTH:"earth",AIR:"air",WATER:"water"};var T={aries:{name:r.ARIES,element:E.FIRE,modality:A.CARDINAL,rulingPlanet:o.MARS,symbol:"\u2648"},taurus:{name:r.TAURUS,element:E.EARTH,modality:A.FIXED,rulingPlanet:o.VENUS,symbol:"\u2649"},gemini:{name:r.GEMINI,element:E.AIR,modality:A.MUTABLE,rulingPlanet:o.MERCURY,symbol:"\u264A"},cancer:{name:r.CANCER,element:E.WATER,modality:A.CARDINAL,rulingPlanet:o.MOON,symbol:"\u264B"},leo:{name:r.LEO,element:E.FIRE,modality:A.FIXED,rulingPlanet:o.SUN,symbol:"\u264C"},virgo:{name:r.VIRGO,element:E.EARTH,modality:A.MUTABLE,rulingPlanet:o.MERCURY,symbol:"\u264D"},libra:{name:r.LIBRA,element:E.AIR,modality:A.CARDINAL,rulingPlanet:o.VENUS,symbol:"\u264E"},scorpio:{name:r.SCORPIO,element:E.WATER,modality:A.FIXED,rulingPlanet:o.PLUTO,symbol:"\u264F"},sagittarius:{name:r.SAGITTARIUS,element:E.FIRE,modality:A.MUTABLE,rulingPlanet:o.JUPITER,symbol:"\u2650"},capricorn:{name:r.CAPRICORN,element:E.EARTH,modality:A.CARDINAL,rulingPlanet:o.SATURN,symbol:"\u2651"},aquarius:{name:r.AQUARIUS,element:E.AIR,modality:A.FIXED,rulingPlanet:o.URANUS,symbol:"\u2652"},pisces:{name:r.PISCES,element:E.WATER,modality:A.MUTABLE,rulingPlanet:o.NEPTUNE,symbol:"\u2653"}},R=T;var L={aries:"Aries",taurus:"Taurus",gemini:"Gemini",cancer:"Cancer",leo:"Leo",virgo:"Virgo",libra:"Libra",scorpio:"Scorpio",sagittarius:"Sagittarius",capricorn:"Capricorn",aquarius:"Aquarius",pisces:"Pisces",fire:"Fire",earth:"Earth",air:"Air",water:"Water",cardinal:"Cardinal",fixed:"Fixed",mutable:"Mutable",mars:"Mars",venus:"Venus",mercury:"Mercury",moon:"Moon",sun:"Sun",pluto:"Pluto",jupiter:"Jupiter",saturn:"Saturn",uranus:"Uranus",neptune:"Neptune"},c=L;var P={aries:"Aries",taurus:"Tauro",gemini:"G\xE9minis",cancer:"C\xE1ncer",leo:"Leo",virgo:"Virgo",libra:"Libra",scorpio:"Escorpio",sagittarius:"Sagitario",capricorn:"Capricornio",aquarius:"Acuario",pisces:"Piscis",fire:"Fuego",earth:"Tierra",air:"Aire",water:"Agua",cardinal:"Cardinal",fixed:"Fijo",mutable:"Mutable",mars:"Marte",venus:"Venus",mercury:"Mercurio",moon:"Luna",sun:"Sol",pluto:"Plut\xF3n",jupiter:"J\xFApiter",saturn:"Saturno",uranus:"Urano",neptune:"Neptuno"},p=P;var u={en:c,es:p};function U(I,S="en"){const e=R[I],m=u[S];if(!e||!u)return null;return{name:m[I],element:m[e.element],modality:m[e.modality],rulingPlanet:m[e.rulingPlanet],symbol:e.symbol}}function N(I="en"){return Object.keys(R).map((S)=>{const e={};return Object.entries(R[S]).forEach(([m,i])=>{const t=u[I][i];e[m]=t??i}),e})}export{U as getSignByName,N as getAllSigns,r as SIGNS,o as PLANETS,A as MODALITIES,E as ELEMENTS};
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "western-signs",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "description": "Explore topics related to the western world.",
6
+ "author": "Marc Mariné <shenobi@gmail.com>",
7
+ "type": "module",
8
+ "exports": {
9
+ ".": "./dist/index.js"
10
+ },
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "scripts": {
18
+ "build": "bun build.ts"
19
+ },
20
+ "devDependencies": {
21
+ "@semantic-release/changelog": "^6.0.3",
22
+ "@semantic-release/git": "^10.0.1",
23
+ "@types/bun": "latest",
24
+ "iso-639-1": "^3.1.2",
25
+ "semantic-release": "^24.0.0",
26
+ "upgradeps": "^2.0.6"
27
+ },
28
+ "peerDependencies": {
29
+ "typescript": "^5.5.3"
30
+ }
31
+ }